Exemplo n.º 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));
        }
Exemplo n.º 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
            }));
        }
Exemplo n.º 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));
     }
 }
Exemplo n.º 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));
        }
Exemplo n.º 5
0
        public PartialViewResult Publish()
        {
            var pubResult = new ProUploadService(this).Publish().ToArray();

            return(PartialView("_PublishPartial", pubResult));
        }
Exemplo n.º 6
0
        public PartialViewResult Validate()
        {
            var valResult = new ProUploadService(this).Validate();

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