Пример #1
0
        public JsonResult EditProfile1()
        {
            string CompanyName        = Request.Params["CompanyName"] ?? "";
            string CompanyAddress     = Request.Params["CompanyAddress"] ?? "";
            string strCompanyRegionId = Request.Params["CompanyRegionId"] ?? "";

            strCompanyRegionId = string.IsNullOrWhiteSpace(strCompanyRegionId) ? Request.Params["NewCompanyRegionId"] : strCompanyRegionId;
            int CompanyRegionId = 0;

            if (!int.TryParse(strCompanyRegionId, out CompanyRegionId))
            {
                CompanyRegionId = 0;
            }

            string CompanyEmployeeCount = Request.Params["CompanyEmployeeCount"] ?? "";
            string BusinessLicenseCert  = Request.Params["BusinessLicenseCert"] ?? "";
            string ProductCert          = Request.Params["ProductCert"] ?? "";
            string OtherCert            = Request.Params["OtherCert"] ?? "";

            var info = new ShopCompanyInfo
            {
                ShopId               = CurrentSellerManager.ShopId,
                CompanyName          = CompanyName,
                CompanyAddress       = CompanyAddress,
                CompanyRegionId      = CompanyRegionId,
                CompanyEmployeeCount = (CompanyEmployeeCount)int.Parse(CompanyEmployeeCount)
            };
            var cert = new ShopLicenseCert
            {
                ShopId = CurrentSellerManager.ShopId,
                BusinessLicenseCert = BusinessLicenseCert,
                ProductCert         = ProductCert,
                OtherCert           = OtherCert
            };

            ShopApplication.SetCompanyInfo(info);
            ShopApplication.SetLicenseCert(cert);
            return(Json(new { success = true }));
        }
Пример #2
0
 public JsonResult Edit2(ShopLicenseCert cert)
 {
     cert.ShopId = CurrentShop.Id;
     ShopApplication.SetLicenseCert(cert);
     return(Json(new { success = true }));
 }
Пример #3
0
 public static void SetLicenseCert(ShopLicenseCert model)
 {
     Service.SetLicenseCert(model);
     ClearCacheShop(model.ShopId);
 }