Пример #1
0
        public JsonResult Upload()
        {
            HttpContextBase context = ControllerContext.HttpContext;

            UploadFile(context);
            ProductUploadInfo[] array = new ProUploadService(_fileFullPath, this).Stage().ToArray <ProductUploadInfo>();
            return(Json(array).EnsureContentType(context.Request));
        }
Пример #2
0
        public ActionResult List(PagerRequest request)
        {
            int totalCount;
            var jobs = new ProUploadService(this).JobList(request.PageIndex, request.PageSize, out totalCount);

            return(View(new Pager <ProductUploadJob>(request, totalCount)
            {
                Data = jobs
            }));
        }
Пример #3
0
 public ActionResult Detail(ProductUploadInfo updatedModel, int?groupId)
 {
     if (ModelState.IsValid)
     {
         var model = new ProUploadService(this).ItemDetailUpdate(updatedModel);
         return(View(model));
     }
     else
     {
         return(View(updatedModel));
     }
 }
Пример #4
0
        public ActionResult Display(int?id)
        {
            PrepareBulkUpload();

            if (id != null)
            {
                JobId = id.Value;
            }
            ProUploadService helpService = new ProUploadService(this);
            var job = helpService.Job(id);

            ViewBag.UploadedProducts = helpService.List(id);
            ViewBag.UploadedImages   = helpService.ListImages(id);
            SetGroupIdIfNeed(id);
            return(View(job));
        }
Пример #5
0
        public PartialViewResult Publish()
        {
            var pubResult = new ProUploadService(this).Publish().ToArray();

            return(PartialView("_PublishPartial", pubResult));
        }
Пример #6
0
        public PartialViewResult Validate()
        {
            var valResult = new ProUploadService(this).Validate();

            return(PartialView("_ValidatePartial", valResult));
        }