public ActionResult Form(string id)
        {
            var theData = id.IsNullOrEmpty() ? new productTagModel() : _product_tagBusiness.GetTheProductTagModel(id);

            ViewData["ImagesDatas1"] = new ImagesBusiness().GetFilePath(id, "img_url", theData.img_url);
            return(View(theData));
        }
Esempio n. 2
0
        public ActionResult Form(string id)
        {
            var theData = id.IsNullOrEmpty() ? new members_audit() : _members_auditBusiness.GetTheData(id);

            var _ImagesBusiness = new ImagesBusiness();

            ViewData["ImagesDatas2"] = _ImagesBusiness.GetFilePath(id, "commodity_photo", theData.image_group);
            return(View(theData));
        }
        public ActionResult Form(string id)
        {
            var theData         = id.IsNullOrEmpty() ? new dictionary() : _dictionaryBusiness.GetTheData(id);
            var _ImagesBusiness = new ImagesBusiness();

            ViewData["ImagesDatas1"] = _ImagesBusiness.GetFilePath(id, "images", theData.images);

            return(View(theData));
        }
Esempio n. 4
0
        public ActionResult Form(int?id)
        {
            var theProduct = id == null ? new product() : _productBusiness.GetTheData(id);
            List <product_date> theProductData = id == null ? new List <product_date>() : _product_dateBusiness.GetDataList(id);

            ViewData["theProduct"]       = theProduct;
            ViewData["theProductData"]   = theProductData;
            ViewData["emptyProductData"] = new product_date();
            var _ImagesBusiness = new ImagesBusiness();

            ViewData["ImagesDatas1"] = _ImagesBusiness.GetFilePath(id, "images", theProduct.images);
            ViewData["ImagesDatas2"] = _ImagesBusiness.GetFilePath(id, "logo", theProduct.logo);
            return(View());
        }
Esempio n. 5
0
        public ActionResult Form(int?id)
        {
            var theProduct = id == null ? new product() : _productBusiness.GetTheData(id);

            ViewData["theProduct"] = theProduct;

            List <product_date> theProductData = id == null ? new List <product_date>() : _product_dateBusiness.GetDataList(id);

            ViewData["theProductData"] = theProductData;

            var _ImagesBusiness = new ImagesBusiness();
            List <ImagesData>           allImageDatas          = new List <ImagesData>();
            List <product_Introduction> theProductIntroduction = id == null ? new List <product_Introduction>()
            {
                new product_Introduction()
                {
                    days = 1
                }
            } : _product_IntroductionBusiness.GetDataList(id);

            if (theProductIntroduction == null || theProductIntroduction.Count == 0)
            {
                theProductIntroduction = new List <product_Introduction>()
                {
                    new product_Introduction()
                    {
                        Id = "", days = 1
                    }
                };
            }
            else
            {
                var IntroductionImages = new Dictionary <string, List <ImagesData> >()
                {
                };
                foreach (var item in theProductIntroduction)
                {
                    allImageDatas.AddRange(_ImagesBusiness.GetFilePath(id, item.Id, item.picture));
                }
                ViewData["IntroductionImages"] = IntroductionImages;
            }
            ViewData["theProductIntroduction"] = theProductIntroduction;

            ViewData["emptyProductData"] = new product_date();

            allImageDatas.AddRange(_ImagesBusiness.GetFilePath(id, "images", theProduct.images));
            allImageDatas.AddRange(_ImagesBusiness.GetFilePath(id, "logo", theProduct.logo));
            ViewData["allImageDatas"] = allImageDatas;
            return(View());
        }
 public UploadFileController()
 {
     _ImagesBusiness = new ImagesBusiness();
 }