예제 #1
0
 //删除人员
 protected void Delete_OnClick(object sender, EventArgs e)
 {
     CheckBox cb;
     LabMS.BLL.Staff staff = new LabMS.BLL.Staff();
     try
     {
         for (int i = 0; i < gvStaffList.Rows.Count; i++)
         {
             cb = (CheckBox)gvStaffList.Rows[i].FindControl("StaffCB");
             if (cb.Checked)
             {
                 string SID = gvStaffList.DataKeys[i].Value.ToString();
                 staff.Delete(int.Parse(SID));
             }
         }
         BindGridViewList(SearchString());
         LabMS.Common.JShelper.JSAlert(Page, "deleteSuccess", "删除成功!");
     }
     catch
     {
         LabMS.Common.JShelper.JSAlert(Page, "err", "删除失败!");
     }
 }
예제 #2
0
 //删除人员
 protected void Delete_OnClick(object sender, EventArgs e)
 {
     LabMS.BLL.Staff staff = new LabMS.BLL.Staff();
     try
     {
         staff.Delete(ID);
         LabMS.Common.JShelper.JSAlertAndRedirect(Page, "deleteSuccess", "删除成功!","ListStaff.aspx");
     }
     catch
     {
         LabMS.Common.JShelper.JSAlert(Page, "err", "删除失败!");
     }
 }