Example #1
0
        private dynamic GetModels(HttpContext context)
        {
            dynamic model = new BidClinchScan();

            try { model.Id = int.Parse(context.Request.Form["Id"].ToString()); }
            catch { }
            model.FK_BidId = int.Parse(context.Request.Form["FK_BidId"].ToString());
            model.ScanName = context.Request.Form["ScanName"].ToString();
            string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/biscan/" + model.FK_BidId + "/", 0);

            if (!string.IsNullOrEmpty(ImgName))
            {
                string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/biscan/" + model.FK_BidId + "/" + ImgName);
                string pdfUrl = "~/Super/Scan/biscan/" + model.FK_BidId + "/";
                new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                model.ScanUrl = ImgName.Split('.')[0] + ".pdf";
            }
            else
            {
                model.ScanUrl = context.Request.Form["ScanUrl"].ToString();
            }
            model.Editor     = adminUser.AdminName;
            model.CreateDate = DateTime.Now;
            return(model);
        }
Example #2
0
        //
        private dynamic GetModels(HttpContext context)
        {
            LiceTranScan model = new LiceTranScan();

            try { model.Id = int.Parse(context.Request.Form["Id"].ToString()); }
            catch { }
            model.FK_LiceTranId            = int.Parse(context.Request.Form["FK_LiceTranId"].ToString());
            model.FK_UploadTypeIndicatorId = int.Parse(context.Request.Form["FK_UploadTypeIndicatorId"].ToString());
            string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/lt/" + model.FK_LiceTranId + "/", 0);
            string imgUrl  = HttpContext.Current.Server.MapPath("~/Super/Scan/lt/" + model.FK_LiceTranId + "/" + ImgName);
            string pdfUrl  = "~/Super/Scan/lt/" + model.FK_LiceTranId + "/";

            new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
            model.ScanUrl    = ImgName.Split('.')[0] + ".pdf";
            model.UploadName = UserName;
            model.UploadDate = DateTime.Now;
            return(model);
        }
Example #3
0
        //
        private dynamic GetVeriUserModel(HttpContext context)
        {
            dynamic model = new WebUserVeri();

            try
            {
                try { model.Id = int.Parse(context.Request.Form["Id"].ToString()); }
                catch { }
                model.LoginName = context.Request.Form["LoginName"].ToString();
                model.LoginPass = context.Request.Form["LoginPass"].ToString();
                model.UserName  = context.Request.Form["UserName"].ToString();
                model.UserTel   = context.Request.Form["UserTel"].ToString();
                model.UserEmail = context.Request.Form["UserEmail"].ToString();
                try { model.UserStatus = int.Parse(context.Request.Form["UserStatus"].ToString()); }
                catch { }
                try { model.LoginDate = DateTime.Parse(context.Request.Form["LoginDate"].ToString()); }
                catch { }
                try { model.LoginnNum = int.Parse(context.Request.Form["LoginnNum"].ToString()); }
                catch { }
                try { model.OutDate = DateTime.Parse(context.Request.Form["OutDate"].ToString()); }
                catch { }
                try { model.Veri = int.Parse(context.Request.Form["Veri"].ToString()); }
                catch { }
                try { model.MemberTypeId = int.Parse(context.Request.Form["MemberTypeId"].ToString()); }
                catch { }
                model.VeriName   = context.Request.Form["VeriName"].ToString();
                model.VeriSex    = context.Request.Form["VeriSex"].ToString();
                model.VeriIDCard = context.Request.Form["VeriIDCard"].ToString();
                if (!string.IsNullOrEmpty(context.Request.Form["VeriIDCard"].ToString()))
                {
                    string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/us/" + model.LoginName + "/", 0);
                    if (!string.IsNullOrEmpty(ImgName))
                    {
                        string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/us/" + model.LoginName + "/" + ImgName);
                        string pdfUrl = "~/Super/Scan/us/" + model.LoginName + "/";
                        new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.VeriIDCardScan = ImgName.Split('.')[0] + ".pdf";
                    }
                    else
                    {
                        model.VeriIDCardScan = context.Request.Form["tVeriIDCardScan"].ToString();
                    }
                }
                model.OrgCode             = context.Request.Form["OrgCode"].ToString();
                model.VeriAddress         = context.Request.Form["VeriAddress"].ToString();
                model.VeriTel             = context.Request.Form["VeriTel"].ToString();
                model.VeriCorporate       = context.Request.Form["VeriCorporate"].ToString();
                model.VeriCorporateIDCard = context.Request.Form["VeriCorporateIDCard"].ToString();
                if (!string.IsNullOrEmpty(context.Request.Form["VeriCorporateIDCard"].ToString()))
                {
                    string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/us/" + model.LoginName + "/", 0);
                    if (!string.IsNullOrEmpty(ImgName))
                    {
                        string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/us/" + model.LoginName + "/" + ImgName);
                        string pdfUrl = "~/Super/Scan/us/" + model.LoginName + "/";
                        new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.VeriCorporateIDCardScan = ImgName.Split('.')[0] + ".pdf";
                    }
                    else
                    {
                        model.VeriCorporateIDCardScan = context.Request.Form["tVeriCorporateIDCardScan"].ToString();
                    }
                }
                model.VeriCreditCode = context.Request.Form["VeriCreditCode"].ToString();
                if (!string.IsNullOrEmpty(context.Request.Form["VeriCreditCode"].ToString()))
                {
                    string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/us/" + model.LoginName + "/", 0);
                    if (!string.IsNullOrEmpty(ImgName))
                    {
                        string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/us/" + model.LoginName + "/" + ImgName);
                        string pdfUrl = "~/Super/Scan/us/" + model.LoginName + "/";
                        new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.VeriCreditCodeScan = ImgName.Split('.')[0] + ".pdf";
                    }
                    else
                    {
                        model.VeriCreditCodeScan = context.Request.Form["tVeriCreditCodeScan"].ToString();
                    }
                }
                try { model.VeriStatus = int.Parse(context.Request.Form["VeriStatus"].ToString()); }
                catch { }
                try { model.AuditType = int.Parse(context.Request.Form["AuditType"].ToString()); }
                catch { }
                model.VeriCheckName = context.Request.Form["VeriCheckName"].ToString();
                try { model.VeriApplyDate = DateTime.Parse(context.Request.Form["VeriApplyDate"].ToString()); }
                catch { }
                try { model.VeriCheckDate = DateTime.Parse(context.Request.Form["VeriCheckDate"].ToString()); }
                catch { }
                return(model);
            }
            catch (Exception ex)
            {
                SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
                return(model);
            }
        }