- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
public void chkStatus_OnCheckedChanged(object sender, EventArgs e)
{
CheckBox chkStatus = (CheckBox)sender;
GridViewRow row = (GridViewRow)chkStatus.NamingContainer;
string cid = row.Cells[1].Text;
bool status = chkStatus.Checked;
string constr = @"Server=.\SQLEXPRESS;Database=TestDB;uid=waqas;pwd=sql;";
string query = "UPDATE Categories SET Approved = @Approved WHERE CategoryID = @CategoryID";
SqlConnection con = new SqlConnection(constr);
SqlCommand com = new SqlCommand(query, con);
com.Parameters.Add("@Approved", SqlDbType.Bit).Value = status;
com.Parameters.Add("@CategoryID", SqlDbType.Int).Value = cid;
con.Open();
com.ExecuteNonQuery();
con.Close();
LoadData();
}
in4man 23.06.2011 15:16 # −1
bugmenot 23.06.2011 16:12 # +4
GovnoCAD
absolut 23.06.2011 16:41 # 0
Lure Of Chaos 24.06.2011 17:13 # 0
guest 24.06.2011 19:29 # +2
guest 24.06.2011 22:54 # 0
guest 25.06.2011 01:48 # 0
SmackMyBitchUp 25.06.2011 07:02 # +2
guest 25.06.2011 12:24 # −1
guest 25.06.2011 12:55 # −1
guest 25.06.2011 13:46 # −1
in4man 25.06.2011 23:05 # −1
dosGovno 26.06.2011 00:26 # −1
in4man 26.06.2011 17:05 # −1
guest 26.06.2011 17:33 # 0
in4man 23.06.2011 17:07 # −2
dosGovno 26.06.2011 00:26 # +3
in4man 26.06.2011 17:05 # −2
guest 26.06.2011 17:32 # +4
in4man 29.06.2011 14:08 # 0
dosGovno 26.06.2011 17:36 # 0
ДОО
in4man 29.06.2011 14:10 # 0
guest8 09.04.2019 11:02 # −999
guest8 12.04.2019 14:25 # −999