public ActionResult Brand_add3UPdate(ShopBrand openshop) { DataAccess.ShopBrand moudel = this._shopBrandService.GetById(openshop.Id); moudel.Id = openshop.Id; moudel.BLS = openshop.BLS; moudel.CIC = openshop.CIC; this._shopBrandService.Update(moudel); return(RedirectToAction("Brand_add4")); }
public ActionResult Company_infoEidt(DataAccess.ShopBrand openshop) { var moudel = this._shopBrandService.GetById(openshop.Id); moudel.Id = openshop.Id; moudel.Address = openshop.Address; moudel.Url = openshop.Url; moudel.Rmark = openshop.Rmark; moudel.Logo = openshop.Logo; moudel.QRCode = openshop.QRCode; this._shopBrandService.Update(moudel); return(RedirectToAction("Company_info/" + moudel.Id)); }
public ActionResult Brand_add1(YG.SC.DataAccess.ShopBrand shopBrand) { DataAccess.ShopBrand moudel = new DataAccess.ShopBrand(); moudel.CreatTime = DateTime.Now; moudel.Recsts = 1; moudel.Name = shopBrand.Name; moudel.Abbreviation = shopBrand.Abbreviation; moudel.Url = shopBrand.Url; moudel.Address = shopBrand.Address; moudel.Rmark = shopBrand.Rmark; moudel.Logo = shopBrand.Logo; moudel.QRCode = shopBrand.QRCode; _shopBrandService.Insert(moudel); Customer customer = _iCustomerService.GetEntityById(UserId); customer.Companyid = moudel.Id; customer.Id = UserId; this._iCustomerService.Update(customer); //增加业态 List <ShopBrandAttributeValues> listattr = new List <ShopBrandAttributeValues>(); var attributesvalue = Request["selAttribute"].TrimEnd(','); if (!string.IsNullOrEmpty(attributesvalue)) { foreach (var item in attributesvalue.Split(',')) { ShopBrandAttributeValues bv = new ShopBrandAttributeValues() { BrandId = moudel.Id, Recsts = 1, AttributesId = Convert.ToInt32(item.Split('-')[0]), AttributeValuesId = Convert.ToInt32(item.Split('-')[1]), }; listattr.Add(bv); } } this._iShopAttributesServiceService.InsertList(listattr); ViewBag.attributesvalue = Request["selAttribute"]; return(RedirectToAction("Brand_add2/" + moudel.Id)); }
public ActionResult uploadimg(ShopBrand moudel) { string viewname = ""; if (moudel.Id != 0) { viewname = "Brand_add3"; var fileBLSName = UploadImgUtility.UploadImage(Request.Files["BLSfile"], Server.MapPath(CommonContorllers.FileUploadBrandBLSImgPath)); if (!string.IsNullOrEmpty(fileBLSName)) { moudel.BLS = CommonContorllers.FileUploadBrandBLSImgPath + fileBLSName; } var fileCICName = UploadImgUtility.UploadImage(Request.Files["CICfile"], Server.MapPath(CommonContorllers.FileUploadBrandCICImgPath)); if (!string.IsNullOrEmpty(fileCICName)) { moudel.CIC = CommonContorllers.FileUploadBrandCICImgPath + fileCICName; } } else { YG.SC.DataAccess.ShopBrand model = new DataAccess.ShopBrand(); var attrsTypes = this._iShopAttributesServiceService.GetListByAttributeId(9); ViewBag.shopType = attrsTypes; var fileLogoName = UploadImgUtility.UploadImage(Request.Files["Logofile"], Server.MapPath(CommonContorllers.FileUploadBrandLogoImgPath)); if (!string.IsNullOrEmpty(fileLogoName)) { moudel.Logo = CommonContorllers.FileUploadBrandLogoImgPath + fileLogoName; } var fileQRcodeName = UploadImgUtility.UploadImage(Request.Files["QRcodefile"], Server.MapPath(CommonContorllers.FileUploadBrandQRCodeImgPath)); if (!string.IsNullOrEmpty(fileQRcodeName)) { moudel.QRCode = CommonContorllers.FileUploadBrandQRCodeImgPath + fileQRcodeName; } ViewBag.attributesvalue = Request["selAttribute"]; viewname = "Brand_add1"; } return(View(viewname, moudel)); }