/// <summary> /// 保存 /// </summary> /// <returns></returns> private string PageSave() { string msg = string.Empty; //获得保存内容的类型 EyouSoft.Model.EnumType.ComStructure.ContainProjectType containProjectType = (EyouSoft.Model.EnumType.ComStructure.ContainProjectType)Utils.GetInt(Utils.GetQueryStringValue("proType")); EyouSoft.Model.EnumType.ComStructure.ProjectType projectType = Utils.GetQueryStringValue("type") == "" ? EyouSoft.Model.EnumType.ComStructure.ProjectType.包含项目 : (EyouSoft.Model.EnumType.ComStructure.ProjectType)Utils.GetInt(Utils.GetQueryStringValue("type")); string txtNewInfo = Utils.GetFormValue("txtNewInfo"); if (txtNewInfo.Trim() == "") { msg = UtilsCommons.AjaxReturnJson("0", "保存内容不能为空!"); return(msg); } EyouSoft.BLL.ComStructure.BComProject bll = new EyouSoft.BLL.ComStructure.BComProject(); EyouSoft.Model.ComStructure.MComProject model = new EyouSoft.Model.ComStructure.MComProject(); model.CompanyId = SiteUserInfo.CompanyId; model.Content = txtNewInfo; model.IssueTime = DateTime.Now; model.ItemType = containProjectType; model.OperatorId = SiteUserInfo.UserId; model.Type = projectType; if (bll.Add(model)) { msg = UtilsCommons.AjaxReturnJson("1", "保存成功!"); } else { msg = UtilsCommons.AjaxReturnJson("0", "保存失败!"); } return(msg); }
/// <summary> /// 页面初始化 /// </summary> protected void PageInit() { EyouSoft.Model.ComStructure.MComProject model = new EyouSoft.BLL.ComStructure.BComProject().GetModel(Id, SiteUserInfo.CompanyId); if (model != null) { txtContent.Text = model.Content; } }
/// <summary> /// 项目删除 /// </summary> protected void DelItem() { bool result = new EyouSoft.BLL.ComStructure.BComProject().Delete(Id, SiteUserInfo.CompanyId); if (result) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("tableToolbar._showMsg('删除成功');window.location.href='TourItemList.aspx?sl={0}&type={1}&itemtype={2}&memuid={3}';", SL, Type, ItemType, memuid)); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("tableToolbar._showMsg('删除失败');window.location.href='TourItemList.aspx?sl={0}&type={1}&itemtype={2}&memuid={3}';", SL, Type, ItemType, memuid)); } }
/// <summary> /// 页面初始化 /// </summary> protected void PageInit() { ReturnTitle(); EyouSoft.Model.EnumType.ComStructure.ProjectType ProjectType = GetProjectType(); EyouSoft.Model.EnumType.ComStructure.ContainProjectType ContainProjectType = GetContainProjectType(); IList <EyouSoft.Model.ComStructure.MComProject> list = null; if (string.IsNullOrEmpty(ItemType)) { list = new EyouSoft.BLL.ComStructure.BComProject().GetList(ProjectType, null, SiteUserInfo.CompanyId); } else { list = new EyouSoft.BLL.ComStructure.BComProject().GetList(ProjectType, ContainProjectType, SiteUserInfo.CompanyId); } this.repList.DataSource = list; this.repList.DataBind(); }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit() { EyouSoft.Model.EnumType.ComStructure.ContainProjectType?containProjectType = null; if (Utils.GetQueryStringValue("proType") != "") { containProjectType = (EyouSoft.Model.EnumType.ComStructure.ContainProjectType)Utils.GetInt(Utils.GetQueryStringValue("proType")); } EyouSoft.Model.EnumType.ComStructure.ProjectType projectType = Utils.GetQueryStringValue("type") == "" ? EyouSoft.Model.EnumType.ComStructure.ProjectType.包含项目 : (EyouSoft.Model.EnumType.ComStructure.ProjectType)Utils.GetInt(Utils.GetQueryStringValue("type")); EyouSoft.BLL.ComStructure.BComProject bll = new EyouSoft.BLL.ComStructure.BComProject(); IList <EyouSoft.Model.ComStructure.MComProject> list = bll.GetList(projectType, containProjectType, this.SiteUserInfo.CompanyId); if (list != null && list.Count > 0) { rpt_List.DataSource = list; rpt_List.DataBind(); } bll = null; list = null; }