Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
0
        /// <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;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获得大类型枚举
        /// </summary>
        /// <returns></returns>
        public EyouSoft.Model.EnumType.ComStructure.ProjectType GetProjectType()
        {
            EyouSoft.Model.EnumType.ComStructure.ProjectType ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.包含项目;
            switch (Type)
            {
            case "1":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.包含项目;
                break;

            case "2":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.含项目;
                break;

            case "3":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.购物安排;
                break;

            case "4":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.儿童安排;
                break;

            case "5":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.自费项目;
                break;

            case "6":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.注意事项;
                break;

            case "7":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.温馨提醒;
                break;

            case "8":
                ProjectType = EyouSoft.Model.EnumType.ComStructure.ProjectType.务标准;
                break;
            }
            return(ProjectType);
        }