Click here to Skip to main content
15,905,238 members
Home / Discussions / C#
   

C#

 
AnswerRe: Pass string " Hello {0}" though MessageBox Pin
Abhishek Sur27-Oct-09 8:45
professionalAbhishek Sur27-Oct-09 8:45 
GeneralRe: Pass string " Hello {0}" though MessageBox Pin
I Believe In GOD27-Oct-09 10:18
I Believe In GOD27-Oct-09 10:18 
GeneralRe: Pass string " Hello {0}" though MessageBox Pin
Abhishek Sur27-Oct-09 10:20
professionalAbhishek Sur27-Oct-09 10:20 
AnswerRe: Pass string " Hello {0}" though MessageBox Pin
Mirko198027-Oct-09 22:52
Mirko198027-Oct-09 22:52 
GeneralRe: Pass string " Hello {0}" though MessageBox Pin
I Believe In GOD28-Oct-09 5:25
I Believe In GOD28-Oct-09 5:25 
QuestionSending emails from windows application on windows7 Pin
gottimukkala27-Oct-09 5:54
gottimukkala27-Oct-09 5:54 
AnswerRe: Sending emails from windows application on windows7 Pin
Dave Kreskowiak27-Oct-09 7:38
mveDave Kreskowiak27-Oct-09 7:38 
Questionerror 26: SQL server locating error Pin
Emmet_Brown27-Oct-09 3:59
Emmet_Brown27-Oct-09 3:59 
AnswerRe: error 26: SQL server locating error Pin
Covean27-Oct-09 4:10
Covean27-Oct-09 4:10 
GeneralRe: error 26: SQL server locating error Pin
Emmet_Brown27-Oct-09 4:19
Emmet_Brown27-Oct-09 4:19 
AnswerRe: error 26: SQL server locating error Pin
dan!sh 27-Oct-09 4:12
professional dan!sh 27-Oct-09 4:12 
GeneralRe: error 26: SQL server locating error Pin
Emmet_Brown27-Oct-09 4:22
Emmet_Brown27-Oct-09 4:22 
AnswerRe: error 26: SQL server locating error Pin
Covean27-Oct-09 4:25
Covean27-Oct-09 4:25 
AnswerRe: error 26: SQL server locating error Pin
Eddy Vluggen27-Oct-09 4:27
professionalEddy Vluggen27-Oct-09 4:27 
GeneralRe: error 26: SQL server locating error Pin
Emmet_Brown27-Oct-09 4:35
Emmet_Brown27-Oct-09 4:35 
GeneralRe: error 26: SQL server locating error Pin
Eddy Vluggen27-Oct-09 8:18
professionalEddy Vluggen27-Oct-09 8:18 
QuestionProblem in accessing files from one virtual directory to second virtual directory on GoDaddy Pin
chirag_chauhan27-Oct-09 2:56
chirag_chauhan27-Oct-09 2:56 
AnswerRe: Problem in accessing files from one virtual directory to second virtual directory on GoDaddy Pin
ragnaroknrol27-Oct-09 4:04
ragnaroknrol27-Oct-09 4:04 
GeneralRe: Problem in accessing files from one virtual directory to second virtual directory on GoDaddy Pin
chirag_chauhan27-Oct-09 15:26
chirag_chauhan27-Oct-09 15:26 
QuestionWhich HTML element under mouse cursor in WebBrowser control? Pin
tanton-gaston27-Oct-09 2:22
tanton-gaston27-Oct-09 2:22 
AnswerRe: Which HTML element under mouse cursor in WebBrowser control? Pin
Henry Minute27-Oct-09 3:30
Henry Minute27-Oct-09 3:30 
QuestionProblem wth datagrid [modified] Pin
Sider8927-Oct-09 2:15
Sider8927-Oct-09 2:15 
DataTable dt; 

private void Permissions_Load(object sender, EventArgs e){
                           dt = new DataTable();
                           dt.Columns.Add("Feature", typeof(string));
                           dt.Columns.Add("None", typeof(bool));
                           dt.Columns.Add("ReadOnly", typeof(bool));
                           dt.Columns.Add("ReadWrite", typeof(bool));

                           datagridview1.Datasource=dt;
}

private void btnSave_Click(object sender, EventArgs e){

/*On the grid when i'll click on the any checkbox I want to pass parameter to this function SetPermission( , , );
parameter will be from the two enumeratons below


Here is link of Picture <u>http://img9.imageshack.us/i/35025568.jpg/</u>
I'll explain it   in detail as I can
When I click on any checkbox here,I want to pass parameter in set function, for example like this: if I'll click on row Stores, Column read only's expedient checkbox item i want to pass SetPermission(1,1, ...) because in enumeration stores id is 1 and read only's id is 1 too.

SetPermission(?,?,?);*/
}

 public void SetPermission(Permission feature, PermissionType permission, int userID) {
                           SqlCommand cmd = new SqlCommand("Insert into Permissions          (UserID,Feature,Permission)Values(@UserID,@Feature,@Permission)", con);

                           cmd.Parameters.Add(new SqlParameter("UserID", userID));

 }



         public enum Permission : int
         {
                  Country = 0,
                  Store = 1,
                  City = 2
         }

         public enum PermissionType : byte
         {
                  None = 0,
                  ReadOnly = 1,
                  ReadWrite = 2
         }


C# Developer

modified on Tuesday, October 27, 2009 8:21 AM

AnswerRe: Problem wth datagrid Pin
dan!sh 27-Oct-09 2:21
professional dan!sh 27-Oct-09 2:21 
GeneralRe: Problem wth datagrid Pin
Sider8927-Oct-09 2:26
Sider8927-Oct-09 2:26 
GeneralRe: Problem wth datagrid Pin
dan!sh 27-Oct-09 2:33
professional dan!sh 27-Oct-09 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.