예제 #1
0
파일: test.aspx.cs 프로젝트: kreeeeg/site
 protected void GvDeleting(object sender, GridViewDeleteEventArgs e)
 {
     int id;
     if (int.TryParse(string.Format("{0}", e.Keys["p_Id"]), out id))
     {
         Peoples = Peoples.Where(x => x.p_Id != id).ToList();
         comm_sqlDataContext mylinq = new comm_sqlDataContext();
         int bb = mylinq.deleterow(id);
         UpdateGrid();
     }
 }
예제 #2
0
 protected void goDelPeople(object sender, EventArgs e)
 {
     int id;
     People ff = Peoples[Convert.ToInt32(e_id.Value)];
     if (int.TryParse(string.Format("{0}", ff.p_Id), out id))
     {
         Peoples = Peoples.Where(x => x.p_Id != id).ToList();
         comm_sqlDataContext mylinq = new comm_sqlDataContext();
         int bb = mylinq.deleterow(id);
         UpdateGrid();
         mylinq.Connection.Close();
     }
     c_edit.Visible = false;
     c_ok.Visible = false;
     add.Visible = false;
     Table1.Visible = false;
     Table2.Visible = false;
     delete.Visible = false;
 }