protected void lbSort_Click(object sender, EventArgs e) { LinkButton ImgbutSort = (LinkButton)sender; if (ImgbutSort != null) { //查出当前要排序的字段 DNNGo_PowerForms_Field objC = DNNGo_PowerForms_Field.FindByKeyForEdit(ImgbutSort.CommandArgument); mTips.IsPostBack = true;//回发时就要触发 if (ImgbutSort.ToolTip == "up") { DNNGo_PowerForms_Field.MoveField(objC, EnumMoveType.Up, ModuleId); //字段上移成功 mTips.LoadMessage("UpMoveFieldSuccess", EnumTips.Success, this, new String[] { "" }); } else { DNNGo_PowerForms_Field.MoveField(objC, EnumMoveType.Down, ModuleId); //字段下移成功 mTips.LoadMessage("DownMoveFieldSuccess", EnumTips.Success, this, new String[] { "" }); } //绑定一下 BindDataList(); } }
/// <summary> /// 列表上的项删除事件 /// </summary> protected void btnRemove_Click(object sender, EventArgs e) { try { LinkButton btnRemove = (LinkButton)sender; if (btnRemove != null && !String.IsNullOrEmpty(btnRemove.CommandArgument)) { DNNGo_PowerForms_Field Field = DNNGo_PowerForms_Field.FindByKeyForEdit(btnRemove.CommandArgument); if (Field != null && Field.ID > 0) { mTips.IsPostBack = true; if (Field.Delete() > 0) { //操作成功 mTips.LoadMessage("DeleteFieldSuccess", EnumTips.Success, this, new String[] { Field.Alias }); } else { //操作失败 mTips.LoadMessage("DeleteFieldError", EnumTips.Success, this, new String[] { Field.Alias }); } BindDataList(); } } } catch (Exception ex) { ProcessModuleLoadException(ex); } }
protected void cmdDelete_Click(object sender, EventArgs e) { try { //查出相关的信息,然后修改状态 DNNGo_PowerForms_Field ExtendFieldItem = DNNGo_PowerForms_Field.FindByKeyForEdit(FieldID); if (ExtendFieldItem != null && ExtendFieldItem.ID > 0) { if (ExtendFieldItem.Delete() > 0) { //字段删除成功 mTips.LoadMessage("DeleteFieldSuccess", EnumTips.Success, this, new String[] { ExtendFieldItem.Name }); } else { //字段删除失败 mTips.LoadMessage("DeleteFieldError", EnumTips.Error, this, new String[] { ExtendFieldItem.Name }); } } Response.Redirect(xUrl("FieldList")); } catch (Exception ex) { DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, 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; mTips.IsPostBack = true; for (int i = 0; i < Checkbox_Value_Array.Length; i++) { if (Int32.TryParse(Checkbox_Value_Array[i], out IDX)) { DNNGo_PowerForms_Field Field = DNNGo_PowerForms_Field.FindByKeyForEdit(IDX); if (Field != null && Field.ID > 0) { Field.Status = Status; if (Field.Update() > 0) { //操作成功 mTips.LoadMessage("UpdateFieldSuccess", EnumTips.Success, this, new String[] { Field.Alias }); } else { //操作失败 mTips.LoadMessage("UpdateFieldError", EnumTips.Success, this, new String[] { Field.Alias }); } } } } BindDataList(); } } catch (Exception ex) { ProcessModuleLoadException(ex); } }