private string Save(string action, string tid) { var model = new Model.MArticleClass { ClassName = Utils.GetFormValue(txtAreaName.UniqueID), SortRule = Utils.GetInt(Utils.GetFormValue(this.txtSort.UniqueID)), IsSystem = (Eyousoft_yhq.Model.ArticleType)Utils.GetInt(Utils.GetFormValue(this.hidIsSystme.UniqueID)) }; int r = 0; var bll = new BLL.OtherStructure.BArticleClass(); if (action == "edit") { model.ClassId = Utils.GetInt(tid); r = bll.Update(model) ? 1 : -2; } else { r = bll.Add(model) ? 1 : -2; } switch (r) { case 0: return(UtilsCommons.AjaxReturnJson("0", "url错误,请重新打开此窗口操作!")); case 1: return(UtilsCommons.AjaxReturnJson("1", "保存成功!")); default: return(UtilsCommons.AjaxReturnJson("0", "保存失败!")); } }
private string Save(string action, string tid) { var model = new Model.MArticleClass { ClassName = Utils.GetFormValue(txtAreaName.UniqueID), SortRule = Utils.GetInt(Utils.GetFormValue(this.txtSort.UniqueID)), IsSystem = (Eyousoft_yhq.Model.ArticleType)Utils.GetInt(Utils.GetFormValue(this.hidIsSystme.UniqueID)) }; int r = 0; var bll = new BLL.OtherStructure.BArticleClass(); if (action == "edit") { model.ClassId = Utils.GetInt(tid); r = bll.Update(model) ? 1 : -2; } else { r = bll.Add(model) ? 1 : -2; } switch (r) { case 0: return UtilsCommons.AjaxReturnJson("0", "url错误,请重新打开此窗口操作!"); case 1: return UtilsCommons.AjaxReturnJson("1", "保存成功!"); default: return UtilsCommons.AjaxReturnJson("0", "保存失败!"); } }
private void PageInit(string tid, string action) { if (action != "edit") return; var model = new BLL.OtherStructure.BArticleClass().GetModel(Utils.GetInt(tid)); if (model == null) return; txtAreaName.Text = model.ClassName; this.txtSort.Text = model.SortRule.ToString(); this.hidIsSystme.Value = ((int)model.IsSystem).ToString(); }
private void PageInit() { pageindex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); var list = new BLL.OtherStructure.BArticleClass().GetList(pagesize, pageindex, ref pagecount, null); UtilsCommons.Paging(pagesize, ref pageindex, pagecount); rptList.DataSource = list; rptList.DataBind(); BindExportPage(); }
private void PageInit(string tid, string action) { if (action != "edit") { return; } var model = new BLL.OtherStructure.BArticleClass().GetModel(Utils.GetInt(tid)); if (model == null) { return; } txtAreaName.Text = model.ClassName; this.txtSort.Text = model.SortRule.ToString(); this.hidIsSystme.Value = ((int)model.IsSystem).ToString(); }
private void PageInit() { pageindex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); var list = new BLL.OtherStructure.BArticleClass().GetList(pagesize, pageindex, ref pagecount, null); UtilsCommons.Paging(pagesize, ref pageindex, pagecount); rptList.DataSource = list; rptList.DataBind(); BindExportPage(); }