protected void cmdDeleteCategory_Click(object sender, EventArgs e) { try { Playngo_ClientZone_Jurisdiction item = CategoryItem; if (item.ID > 0 && item.Delete() > 0) { mTips.LoadMessage("DeleteCategorySuccess", EnumTips.Success, this, new String[] { item.Name }); } else { mTips.LoadMessage("DeleteCategoryError", EnumTips.Success, this, new String[] { item.Name }); } Response.Redirect(xUrl("Jurisdictions"), false); } catch (Exception ex) { ProcessModuleLoadException(ex); } }
/// <summary> /// 状态应用按钮事件 /// </summary> protected void btnApply_Click(object sender, EventArgs e) { try { Int32 Status = WebHelper.GetIntParam(Request, ddlStatus.UniqueID, -1); if (Status >= 0) { string Checkbox_Value = WebHelper.GetStringParam(Request, "Checkbox", ""); string[] Checkbox_Value_Array = Checkbox_Value.Split(','); Int32 IDX = 0; for (int i = 0; i < Checkbox_Value_Array.Length; i++) { if (Int32.TryParse(Checkbox_Value_Array[i], out IDX)) { Playngo_ClientZone_Jurisdiction item = Playngo_ClientZone_Jurisdiction.FindByKeyForEdit(IDX); if (item != null && item.ID > 0) { mTips.IsPostBack = true; if (item.Delete() > 0) { //mTips.LoadMessage("DeleteCategorySuccess", EnumTips.Success, this, new String[] { item.Name }); } else { //mTips.LoadMessage("DeleteCategoryError", EnumTips.Success, this, new String[] { item.Name }); } } } } BindDataList(); } } catch (Exception ex) { ProcessModuleLoadException(ex); } }
/// <summary> /// 列表上的项删除事件 /// </summary> protected void btnRemove_Click(object sender, EventArgs e) { try { LinkButton btnRemove = (LinkButton)sender; Playngo_ClientZone_Jurisdiction item = Playngo_ClientZone_Jurisdiction.FindByKeyForEdit(btnRemove.CommandArgument); mTips.IsPostBack = true; if (item.ID > 0 && item.Delete() > 0) { mTips.LoadMessage("DeleteCategorySuccess", EnumTips.Success, this, new String[] { item.Name }); } else { mTips.LoadMessage("DeleteCategoryError", EnumTips.Success, this, new String[] { item.Name }); } BindDataList(); } catch (Exception ex) { ProcessModuleLoadException(ex); } }