Example #1
0
        /// <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);
        }
Example #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     EyouSoft.Model.ComStructure.MComProject model = new EyouSoft.Model.ComStructure.MComProject();
     model.CompanyId  = SiteUserInfo.CompanyId;
     model.Content    = txtContent.Text;
     model.IssueTime  = DateTime.Now;
     model.ItemType   = GetContainProjectType();
     model.Type       = GetProjectType();
     model.OperatorId = SiteUserInfo.UserId;
     if (new EyouSoft.BLL.ComStructure.BComProject().Add(model))
     {
         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('添加失败');"));
     }
 }
Example #3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (txtContent.Text == "")
     {
         EyouSoft.Common.Function.MessageBox.ResponseScript(this, "parent.tableToolbar._showMsg('内容不能为空');");
         return;
     }
     EyouSoft.Model.ComStructure.MComProject model = new EyouSoft.Model.ComStructure.MComProject();
     model.CompanyId  = SiteUserInfo.CompanyId;
     model.Id         = Id;
     model.Content    = txtContent.Text;
     model.ItemType   = GetContainProjectType();
     model.Type       = GetProjectType();
     model.OperatorId = SiteUserInfo.UserId;
     if (new EyouSoft.BLL.ComStructure.BComProject().Update(model))
     {
         EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("parent.tableToolbar._showMsg('修改成功');parent.Boxy.getIframeDialog('{0}').hide();window.parent.location.href='TourItemList.aspx?sl={1}&type={2}&itemtype={3}&memuid={4}';", Utils.GetQueryStringValue("iframeId"), SL, Type, ItemType, memuid));
     }
     else
     {
         EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("parent.tableToolbar._showMsg('修改失败')"));
     }
 }