/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BtnDel_Click(object sender, EventArgs e) { string dlist = ControlTools.CheckCbx(GVData, "CheckSelect", "LabVisible"); if (_systemRolesBll.GetModel(int.Parse(dlist)) == null) { Alert("该项已经不存在"); return; } string[] listid = dlist.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries); int id = 0; if (listid.Length > 0) { for (int i = 0; i < listid.Length; i++) { if (new Haikan.SchoolProjectsCore.MDB.BLL.SystemUser().GetList("RoleID=" + listid[i]).Tables[0].Rows.Count > 0) { id += 1; } } } if (id <= 0) { _systemRolesBll.DeleteList(dlist); Bind(); } else { Alert("所选部门中有存在用户的部门,不能删除,请重新选择!"); } }
/// <summary> /// 修改,默认修改选中的第一个复选框的条目 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ImgBtnModify_Click(object sender, ImageClickEventArgs e) { string checkStr = ControlTools.CheckCbx(this.GVData, "CheckSelect", "LabVisible"); string[] checkStrArray = checkStr.Split(','); // 默认修改选中的第一个复选框的条目 Response.Redirect("SystemUserAdd.aspx?ID=" + checkStrArray[0] + "&TypeID=All"); }
/// <summary> /// 点击修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ImgBtnModify_Click(object sender, ImageClickEventArgs e) { if (ActionValidator("SystemRolesModify")) { string checkStr = ControlTools.CheckCbx(GVData, "CheckSelect", "LabVisible"); string[] checkStrArray = checkStr.Split(','); if (checkStrArray[0] == "") { Alert("选择项不能为空!"); return; } Response.Redirect("SystemRolesAdd.aspx?ID=" + checkStrArray[0]); } }
/// <summary> /// 删除企业 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BtnDel_Click(object sender, EventArgs e) { if (ActionValidator("EnterpriseDel")) { string dlist = ControlTools.CheckCbx(GVData, "CheckSelect", "LabVisible"); if (_eenterprisesBll.GetModel(int.Parse(dlist)) != null && !_eenterprisesBll.DeleteList(dlist)) { Alert("删除选中记录时发生错误!请重新登陆后重试!!"); } else { Alert("删除成功!"); // 重新绑定数据 Bind(); } AddSystemLog("用户删除用户信息", "删除"); } }
/// <summary> /// 删除用户 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BtnDel_Click(object sender, EventArgs e) { if (ActionValidator("SystemUserDel")) { string dlist = ControlTools.CheckCbx(this.GVData, "CheckSelect", "LabVisible"); if (!_userBll.DeleteList(dlist)) { Alert("删除选中记录时发生错误!请重新登陆后重试!!"); } else { Alert("删除成功!"); // 重新绑定数据 Bind(); } AddSystemLog("用户删除用户信息", "删除"); } }
/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BtnDel_Click(object sender, EventArgs e) { string dlist = ControlTools.CheckCbx(GVData, "CheckSelect", "LabVisible"); var hFile = _hFileBll.GetModel(int.Parse(dlist)); hFile.FileID = int.Parse(ControlTools.CheckCbx(GVData, "CheckSelect", "LabVisible")); if (hFile.IsDele == "0") { hFile.IsDele = "1"; } if (_hFileBll.Update(hFile)) { Bind(); } else { Alert("标记删除失败!"); } }
/// <summary> /// 删除财务信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void del_OnServerClick(object sender, EventArgs e) { if (ActionValidator("FinancialDel")) { string dlist = ControlTools.CheckCbx(GVData, "CheckSelect", "LabVisible"); if (_financialBLL.GetModel(int.Parse(dlist)) != null && !_financialBLL.DeleteList(dlist)) { Alert("删除选中记录时发生错误!请重新登陆后重试!!"); } else { Alert("删除成功!"); Bind(); } AddSystemLog("用户删除财务信息", "删除"); } else { Alert("没有权限删除"); } }