Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.个人中心_文档管理_栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.个人中心_文档管理_栏目, true);
            }

            grantadd    = CheckGrant(global::Common.Enum.TravelPermission.个人中心_文档管理_新增);
            grantdel    = CheckGrant(global::Common.Enum.TravelPermission.个人中心_文档管理_删除);
            grantmodify = CheckGrant(global::Common.Enum.TravelPermission.个人中心_文档管理_修改);
            grantload   = CheckGrant(global::Common.Enum.TravelPermission.个人中心_文档管理_下载文档);

            pdBll = new EyouSoft.BLL.PersonalCenterStructure.PersonDocument(SiteUserInfo);
            if (!IsPostBack)
            {
                type = Utils.GetQueryStringValue("type");
                switch (type)
                {
                case "domdel":
                    DomDel();
                    break;

                default:
                    DataInit();
                    break;
                }
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!CheckGrant(global::Common.Enum.TravelPermission.个人中心_文档管理_下载文档))
     {
         Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.个人中心_文档管理_下载文档, false);
     }
     pdModel = new EyouSoft.Model.PersonalCenterStructure.PersonDocument();
     pdBll   = new EyouSoft.BLL.PersonalCenterStructure.PersonDocument(SiteUserInfo);
     if (!IsPostBack)
     {
         DomBind();
     }
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     pdModel = new EyouSoft.Model.PersonalCenterStructure.PersonDocument();
     pdBll   = new EyouSoft.BLL.PersonalCenterStructure.PersonDocument(SiteUserInfo);
     type    = Utils.GetQueryStringValue("type");
     if (IsPostBack)
     {
         Save();
     }
     else
     {
         DomBind();
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            EyouSoft.Model.PersonalCenterStructure.PersonDocument pdModel = new EyouSoft.Model.PersonalCenterStructure.PersonDocument();
            pdModel.DocumentName = Utils.GetFormValue("domname");
            pdModel.CreateTime   = DateTime.Now;
            pdModel.OperatorName = SiteUserInfo.ContactInfo.ContactName;
            pdModel.CompanyId    = CurrentUserCompanyID;
            pdModel.OperatorId   = SiteUserInfo.ID;
            if (Request.Files.Count > 0)
            {
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                bool   result      = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["upfile"], "UserCenterFile", out filepath, out oldfilename);
                if (result)
                {
                    pdModel.FilePath = filepath;
                }
            }
            EyouSoft.BLL.PersonalCenterStructure.PersonDocument pdBll = new EyouSoft.BLL.PersonalCenterStructure.PersonDocument(SiteUserInfo);
            bool res = false;

            res = pdBll.Add(pdModel);

            string conti = Utils.GetFormValue("continue");

            if (res)
            {
                if (conti == "continue")
                {
                    MessageBox.ShowAndCloseReload(this, "保存成功!");
                }
                else
                {
                    MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide();window.parent.location.reload();", "保存成功", Utils.GetQueryStringValue("iframeId")));
                }
            }
            else
            {
                MessageBox.ShowAndReturnBack(this, "保存失败!", 1);
            }
        }