示例#1
0
        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));
        }
示例#2
0
        public ActionResult uploadPhoto(OpenShopPhoto moudel)
        {
            var fileName = UploadImgUtility.UploadBrangImg(Request.Files["OpenShopPhoto"], Server.MapPath(CommonContorllers.FileUploadOpenShopImgPath), Server.MapPath(CommonContorllers.FileUploadOpenShopSmallImgPath), Server.MapPath(CommonContorllers.FileUploadOpenShopSquareImgPath), Server.MapPath(CommonContorllers.FileUploadOpenShopRectangleImgPath));

            if (!string.IsNullOrEmpty(fileName))
            {
                moudel.Photo          = CommonContorllers.FileUploadOpenShopImgPath + fileName;
                moudel.PhotoSmall     = CommonContorllers.FileUploadOpenShopSmallImgPath + fileName;
                moudel.PhotoSquare    = CommonContorllers.FileUploadOpenShopSquareImgPath + fileName;
                moudel.PhotoRectangle = CommonContorllers.FileUploadOpenShopRectangleImgPath + fileName;
            }
            return(View("OpenShop_add2", moudel));
        }
示例#3
0
        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));
        }
示例#4
0
        public ActionResult PhotoAddPost(OpenShopPhoto Photo)
        {
            var fileName = UploadImgUtility.UploadBrangImg(Request.Files["OpenShopPhoto"], Server.MapPath(CommonContorllers.FileUploadOpenShopImgPath), Server.MapPath(CommonContorllers.FileUploadOpenShopSmallImgPath), Server.MapPath(CommonContorllers.FileUploadOpenShopSquareImgPath), Server.MapPath(CommonContorllers.FileUploadOpenShopRectangleImgPath));

            if (!string.IsNullOrEmpty(fileName))
            {
                Photo.Photo          = CommonContorllers.FileUploadOpenShopImgPath + fileName;
                Photo.PhotoSmall     = CommonContorllers.FileUploadOpenShopSmallImgPath + fileName;
                Photo.PhotoSquare    = CommonContorllers.FileUploadOpenShopSquareImgPath + fileName;
                Photo.PhotoRectangle = CommonContorllers.FileUploadOpenShopRectangleImgPath + fileName;
            }
            Photo.OpenShopId = _openShopId;
            Photo.Recsts     = 1;
            this._iOpenShopService.InsertPhoto(Photo);

            return(Redirect("~/Merchant/OpenShopPhoto?Id=" + _openShopId));
        }