Click here to Skip to main content
15,889,876 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionBase element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 2:40
Musa Biralo26-Dec-08 2:40 
AnswerRe: Base element load twice in TreeView, please help. Pin
Not Active26-Dec-08 3:09
mentorNot Active26-Dec-08 3:09 
GeneralRe: Base element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 3:21
Musa Biralo26-Dec-08 3:21 
GeneralRe: Base element load twice in TreeView, please help. Pin
Not Active26-Dec-08 3:45
mentorNot Active26-Dec-08 3:45 
GeneralRe: Base element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 4:15
Musa Biralo26-Dec-08 4:15 
GeneralRe: Base element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 4:18
Musa Biralo26-Dec-08 4:18 
GeneralRe: Base element load twice in TreeView, please help. Pin
Not Active26-Dec-08 4:59
mentorNot Active26-Dec-08 4:59 
Questiondatagridview using c# Pin
kulandaivel_mca200726-Dec-08 0:08
kulandaivel_mca200726-Dec-08 0:08 
i bind one table in my datagridview


i have 4 check box in my datagridview...

one for present...
second one for absent...
third one for morning present...
fourth one for evening present...

if i check only one check box i get the following error...

// ERROR // Object reference not set to an instance of an object.

bcz i assigned check box value to one string variable...



string value11 =”aa” , value22 =”aa” , value33 =”aa” , value44 =”aa” ;
con27.Open();
int rows = dataGridView1.Rows.Count;
rows = rows - 1;


for (int i = 0; i < rows; i++)
{
SqlCommand cmd27 = new SqlCommand("sp_update_att_lkg", con27);
cmd27.CommandType = CommandType.StoredProcedure;

value11 = dataGridView1.Rows[i].Cells[0].Value.ToString();
value22 = dataGridView1.Rows[i].Cells[1].Value.ToString();
value33 = dataGridView1.Rows[i].Cells[2].Value.ToString();
value44 = dataGridView1.Rows[i].Cells[3].Value.ToString();

string value10 = dataGridView1.Rows[i].Cells[4].Value.ToString();// S_ID
string value6 = dataGridView1.Rows[i].Cells[5].Value.ToString();// name
string value7 = dataGridView1.Rows[i].Cells[6].Value.ToString();// class
string value8 = dataGridView1.Rows[i].Cells[7].Value.ToString();//section
string value9 = dataGridView1.Rows[i].Cells[8].Value.ToString();// scode
string value5 = dataGridView1.Rows[i].Cells[9].Value.ToString();// uid
string dt1 = dateTimePicker1.Text;
DateTime DT = DateTime.Parse(dt1); // ATTENDANCE

if (value11 == "True")
{
value11 = "present";
}
else
{
value11 = "absent";
}


cmd27.Parameters.Add(new SqlParameter("@puid", SqlDbType.Int));
cmd27.Parameters["@puid"].Value = value5;

cmd27.Parameters.Add(new SqlParameter("@pname", SqlDbType.VarChar));
cmd27.Parameters["@pname"].Value = value6;

cmd27.Parameters.Add(new SqlParameter("@pclass", SqlDbType.VarChar));
cmd27.Parameters["@pclass"].Value = value7;

cmd27.Parameters.Add(new SqlParameter("@psection", SqlDbType.VarChar ));
cmd27.Parameters["@psection"].Value = value8;

cmd27.Parameters.Add(new SqlParameter("@pcode", SqlDbType.VarChar));
cmd27.Parameters["@pcode"].Value = value9;

cmd27.Parameters.Add(new SqlParameter("@pattend",SqlDbType.DateTime));
cmd27.Parameters["@pattendance"].Value = DT;

cmd27.Parameters.Add(new SqlParameter("@pstatus", SqlDbType.VarChar));
cmd27.Parameters["@pstatus"].Value = value11;

cmd27.Parameters.Add(new SqlParameter("@ps_id", SqlDbType.VarChar));
cmd27.Parameters["@ps_id"].Value = value10;

cmd27.ExecuteNonQuery();
}





expecting suggestions...
QuestionRun .Net1.1 and 2.0 at same time Pin
Vince.Ro25-Dec-08 17:30
Vince.Ro25-Dec-08 17:30 
AnswerRe: Run .Net1.1 and 2.0 at same time Pin
Brij25-Dec-08 17:58
mentorBrij25-Dec-08 17:58 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro25-Dec-08 18:50
Vince.Ro25-Dec-08 18:50 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Abhijit Jana25-Dec-08 20:24
professionalAbhijit Jana25-Dec-08 20:24 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro25-Dec-08 22:42
Vince.Ro25-Dec-08 22:42 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Brij25-Dec-08 22:59
mentorBrij25-Dec-08 22:59 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro28-Dec-08 13:44
Vince.Ro28-Dec-08 13:44 
QuestionInterface and GetType() - works in C# but not in VB? Pin
David Hovey25-Dec-08 12:37
David Hovey25-Dec-08 12:37 
AnswerRe: Interface and GetType() - works in C# but not in VB? Pin
cterrinw27-Sep-09 19:32
cterrinw27-Sep-09 19:32 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
David Hovey27-Sep-09 19:37
David Hovey27-Sep-09 19:37 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
cterrinw27-Sep-09 20:48
cterrinw27-Sep-09 20:48 
AnswerRe: Interface and GetType() - works in C# but not in VB? Pin
BrianHoover2-Jan-10 1:04
BrianHoover2-Jan-10 1:04 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
David Hovey2-Jan-10 3:10
David Hovey2-Jan-10 3:10 
QuestionInterface code from C# to VB.NET Pin
David Hovey25-Dec-08 9:12
David Hovey25-Dec-08 9:12 
QuestionProblem with dot net (Window forms) user control in Vb6 application Pin
Nitin198125-Dec-08 6:42
Nitin198125-Dec-08 6:42 
AnswerRe: Problem with dot net (Window forms) user control in Vb6 application Pin
Not Active25-Dec-08 12:21
mentorNot Active25-Dec-08 12:21 
GeneralRe: Problem with dot net (Window forms) user control in Vb6 application Pin
Nitin198125-Dec-08 18:21
Nitin198125-Dec-08 18:21 

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.