Ejemplo n.º 1
0
        protected void InitSave()
        {
            cominit();
            cModel.PersonInfo.ContactTel    = Utils.GetFormValue("CompanyTEl");
            cModel.PersonInfo.ContactMobile = Utils.GetFormValue("CompanyPhone");

            //页头
            if (Request.Files["PrintTop"] != null)
            {
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                bool   result      = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["PrintTop"], "zutuanFile", out filepath, out oldfilename);
                if (result)
                {
                    cptModel.PageHeadFile = filepath;
                }
            }
            //模板页
            if (Request.Files["PrintTemplate"] != null)
            {
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                bool   result      = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["PrintTemplate"], "zutuanFile", out filepath, out oldfilename);
                if (result)
                {
                    cptModel.TemplateFile = filepath;
                }
            }
            //页脚
            if (Request.Files["PrintFooter"] != null)
            {
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                bool   result      = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["PrintFooter"], "zutuanFile", out filepath, out oldfilename);
                if (result)
                {
                    cptModel.PageFootFile = filepath;
                }
            }
            //公章
            if (Request.Files["PrintCachet"] != null)
            {
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                bool   result      = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["PrintCachet"], "zutuanFile", out filepath, out oldfilename);
                if (result)
                {
                    cptModel.CustomerStamp = filepath;
                }
            }

            bool res = cBll.UpDateSampleCompanyUserInfo(cModel);

            res = cBll.UpdateSampleCustomerConfig(cptModel);
            if (res)
            {
                MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide();window.parent.location.reload();", "保存成功", Utils.GetQueryStringValue("iframeId")));
            }
        }