public ActionResult Company_Case(int Id = 0) { ShopBrandPhoto Photo = new ShopBrandPhoto(); Photo.BrandId = Id; return(View(Photo)); }
public ActionResult Brand_add2(int Id = 0) { ShopBrandPhoto Photo = new ShopBrandPhoto(); Photo.BrandId = Id; return(View(Photo)); }
public ActionResult EditPhoto(ShopBrandPhoto moudel) { var fileName = UploadImgUtility.UploadBrangImg(Request.Files["BrandPhoto"], Server.MapPath(CommonContorllers.FileUploadBrandImgPath), Server.MapPath(CommonContorllers.FileUploadBrandSmallImgPath), Server.MapPath(CommonContorllers.FileUploadBrandSquareImgPath), Server.MapPath(CommonContorllers.FileUploadBrandRectangleImgPath)); if (!string.IsNullOrEmpty(fileName)) { moudel.Photo = CommonContorllers.FileUploadBrandImgPath + fileName; moudel.PhotoSmall = CommonContorllers.FileUploadBrandSmallImgPath + fileName; moudel.PhotoSquare = CommonContorllers.FileUploadBrandSquareImgPath + fileName; moudel.PhotoRectangle = CommonContorllers.FileUploadBrandRectangleImgPath + fileName; } return(View("Company_Case", moudel)); }
public ActionResult PhotoEditPost(ShopBrandPhoto Photo) { var entity = this._IShopBrandService.GetPhotoById(Photo.Id); var fileName = UploadImgUtility.UploadBrangImg(Request.Files["OpenShopPhoto"], Server.MapPath(CommonContorllers.FileUploadBrandImgPath), Server.MapPath(CommonContorllers.FileUploadBrandSmallImgPath), Server.MapPath(CommonContorllers.FileUploadBrandSquareImgPath), Server.MapPath(CommonContorllers.FileUploadBrandRectangleImgPath)); if (!string.IsNullOrEmpty(fileName)) { entity.Photo = CommonContorllers.FileUploadBrandImgPath + fileName; entity.PhotoSmall = CommonContorllers.FileUploadBrandSmallImgPath + fileName; entity.PhotoSquare = CommonContorllers.FileUploadBrandSquareImgPath + fileName; entity.PhotoRectangle = CommonContorllers.FileUploadBrandRectangleImgPath + fileName; } this._IShopBrandService.UpdatePhoto(entity); return(Redirect("~/Customer/OpenShopPhoto?Id=" + _brandId)); }
public ActionResult PhotoAddPost(ShopBrandPhoto Photo) { var fileName = UploadImgUtility.UploadBrangImg(Request.Files["OpenShopPhoto"], Server.MapPath(CommonContorllers.FileUploadBrandImgPath), Server.MapPath(CommonContorllers.FileUploadBrandSmallImgPath), Server.MapPath(CommonContorllers.FileUploadBrandSquareImgPath), Server.MapPath(CommonContorllers.FileUploadBrandRectangleImgPath)); if (!string.IsNullOrEmpty(fileName)) { Photo.Photo = CommonContorllers.FileUploadBrandImgPath + fileName; Photo.PhotoSmall = CommonContorllers.FileUploadBrandSmallImgPath + fileName; Photo.PhotoSquare = CommonContorllers.FileUploadBrandSquareImgPath + fileName; Photo.PhotoRectangle = CommonContorllers.FileUploadBrandRectangleImgPath + fileName; } Photo.BrandId = _brandId; Photo.Recsts = 1; this._IShopBrandService.InsertPhoto(Photo); return(Redirect("~/Customer/OpenShopPhoto?Id=" + _brandId)); }
public ActionResult Brand_add2img(ShopBrandPhoto BPhoto) { if (BPhoto.Id == 0) { BPhoto.Recsts = 1; this._shopBrandService.InsertPhoto(BPhoto); } else { ShopBrandPhoto model = this._shopBrandService.GetPhotoById(BPhoto.Id); model.Id = BPhoto.Id; model.title = BPhoto.title != null ? BPhoto.title : model.title; model.Rmark = BPhoto.Rmark != null ? BPhoto.Rmark : model.Rmark; model.Photo = BPhoto.Photo != null ? BPhoto.Photo : model.Photo; model.PhotoSmall = BPhoto.PhotoSmall != null ? BPhoto.PhotoSmall : model.PhotoSmall; model.PhotoSquare = BPhoto.PhotoSquare != null ? BPhoto.PhotoSquare : model.PhotoSquare; model.PhotoRectangle = BPhoto.PhotoRectangle != null ? BPhoto.PhotoRectangle : model.PhotoRectangle; model.Recsts = 1; this._shopBrandService.UpdatePhoto(model); } return(RedirectToAction("Brand_add2/" + BPhoto.BrandId)); }
public ActionResult PhotoAdd(ShopBrandPhoto shopBrand) { return(View()); }