コード例 #1
0
        public JsonResult GetPurchaseOrderIndexes([DataSourceRequest] DataSourceRequest request, string nmvnTaskID)
        {
            this.purchaseOrderAPIRepository.RepositoryBag["NMVNTaskID"] = nmvnTaskID;
            ICollection <PurchaseOrderIndex> purchaseOrderIndexes = this.purchaseOrderAPIRepository.GetEntityIndexes <PurchaseOrderIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = purchaseOrderIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public ActionResult Options()
        {
            OptionViewModel optionViewModel = new OptionViewModel {
                GlobalFromDate = HomeSession.GetGlobalFromDate(this.HttpContext), GlobalToDate = HomeSession.GetGlobalToDate(this.HttpContext)
            };

            return(View(optionViewModel));
        }
コード例 #3
0
        public JsonResult GetDeliveryAdviceIndexes([DataSourceRequest] DataSourceRequest request, bool withExtendedSearch, DateTime extendedFromDate, DateTime extendedToDate, bool pendingOnly)
        {
            this.deliveryAdviceAPIRepository.RepositoryBag["PendingOnly"] = pendingOnly;
            ICollection <DeliveryAdviceIndex> deliveryAdviceIndexes = this.deliveryAdviceAPIRepository.GetEntityIndexes <DeliveryAdviceIndex>(User.Identity.GetUserId(), (withExtendedSearch? extendedFromDate: HomeSession.GetGlobalFromDate(this.HttpContext)), (withExtendedSearch? extendedToDate: HomeSession.GetGlobalToDate(this.HttpContext)));

            DataSourceResult response = deliveryAdviceIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public ActionResult Open(int?id, int?detailID)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Report report = this.reportRepository.GetEntityIndexes <Report>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext)).Where(w => w.ReportUniqueID == id).FirstOrDefault();

            if (report == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }


            //BEGIN: Cho nay: sau nay can phai bo di, vi lam nhu the nay khong hay ho gi ca. Thay vao do, se thua ke tu base controller -> de lay userid, locationid, location official name
            var Db = new ApplicationDbContext();

            string aspUserID = User.Identity.GetUserId();
            int    userID    = Db.Users.Where(w => w.Id == aspUserID).FirstOrDefault().UserID;


            int locationID = this.moduleRepository.GetLocationID(userID);
            //BEGIN: Cho nay: sau nay can phai bo di, vi lam nhu the nay khong hay ho gi ca. Thay vao do, se thua ke tu base controller -> de lay userid, locationid, location official name



            PrintViewModel printViewModel = new PrintViewModel()
            {
                Id = id, DetailID = detailID, PrintOptionID = report.PrintOptionID, LocationID = locationID, ReportPath = report.ReportURL
            };

            return(View(viewName: "Open", model: printViewModel));
        }
コード例 #5
0
        public ActionResult Searches()
        {
            //ViewBag.SelectedEntityID = id == null ? -1 : (int)id;
            //ViewBag.ShowDiscount = this.GenericService.GetShowDiscount();

            OptionViewModel optionViewModel = new OptionViewModel {
                GlobalFromDate = HomeSession.GetGlobalFromDate(this.HttpContext), GlobalToDate = HomeSession.GetGlobalToDate(this.HttpContext)
            };

            return(View(optionViewModel));
        }
コード例 #6
0
 public LogicMessageManager(HomeSession session)
 {
     this.m_session = session;
 }
コード例 #7
0
        public ActionResult Index()
        {
            MenuSession.SetModuleID(this.HttpContext, 9);

            //RequireJsOptions.Add("LocationID", this.baseService.LocationID, RequireJsOptionsScope.Page);
            RequireJsOptions.Add("NmvnModuleID", 9, RequireJsOptionsScope.Page);
            RequireJsOptions.Add("NmvnTaskID", 0, RequireJsOptionsScope.Page);

            return(View(this.reportRepository.GetEntityIndexes <Report>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext))));
        }
コード例 #8
0
        public JsonResult GetGoodsArrivalIndexes([DataSourceRequest] DataSourceRequest request, string nmvnTaskID, bool withExtendedSearch, DateTime extendedFromDate, DateTime extendedToDate, bool pendingOnly)
        {
            this.goodsArrivalAPIRepository.RepositoryBag["NMVNTaskID"]  = nmvnTaskID;
            this.goodsArrivalAPIRepository.RepositoryBag["PendingOnly"] = pendingOnly;
            ICollection <GoodsArrivalIndex> goodsArrivalIndexes = this.goodsArrivalAPIRepository.GetEntityIndexes <GoodsArrivalIndex>(User.Identity.GetUserId(), (withExtendedSearch ? extendedFromDate : HomeSession.GetGlobalFromDate(this.HttpContext)), (withExtendedSearch ? extendedToDate : HomeSession.GetGlobalToDate(this.HttpContext)));

            DataSourceResult response = goodsArrivalIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #9
0
        public JsonResult GetBlendingInstructionIndexes([DataSourceRequest] DataSourceRequest request, bool withExtendedSearch, DateTime extendedFromDate, DateTime extendedToDate, int filterOptionID, int labOptionID)
        {
            this.blendingInstructionAPIRepository.RepositoryBag["LabOptionID"]    = labOptionID;
            this.blendingInstructionAPIRepository.RepositoryBag["FilterOptionID"] = filterOptionID;
            ICollection <BlendingInstructionIndex> blendingInstructionIndexes = this.blendingInstructionAPIRepository.GetEntityIndexes <BlendingInstructionIndex>(User.Identity.GetUserId(), (withExtendedSearch ? extendedFromDate : HomeSession.GetGlobalFromDate(this.HttpContext)), (withExtendedSearch ? extendedToDate : HomeSession.GetGlobalToDate(this.HttpContext)));

            DataSourceResult response = blendingInstructionIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #10
0
        public JsonResult GetPlannedOrderIndexes([DataSourceRequest] DataSourceRequest request, string nmvnTaskID, bool withExtendedSearch, DateTime extendedFromDate, DateTime extendedToDate, int dateOptionID, int filterOptionID)
        {
            this.plannedOrderAPIRepository.RepositoryBag["NMVNTaskID"]     = nmvnTaskID;
            this.plannedOrderAPIRepository.RepositoryBag["DateOptionID"]   = dateOptionID;
            this.plannedOrderAPIRepository.RepositoryBag["FilterOptionID"] = filterOptionID;
            ICollection <PlannedOrderIndex> plannedOrderIndexes = this.plannedOrderAPIRepository.GetEntityIndexes <PlannedOrderIndex>(User.Identity.GetUserId(), (withExtendedSearch ? extendedFromDate : HomeSession.GetGlobalFromDate(this.HttpContext)), (withExtendedSearch ? extendedToDate : HomeSession.GetGlobalToDate(this.HttpContext)));

            DataSourceResult response = plannedOrderIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #11
0
        public ActionResult Viewer(int?id, int?detailID)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            ReportIndex reportIndex = this.reportAPIRepository.GetEntityIndexes <ReportIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext)).Where(w => w.ReportUniqueID == id).FirstOrDefault();

            if (reportIndex == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            PrintViewModel printViewModel = new PrintViewModel()
            {
                Id = id, DetailID = detailID, PrintOptionID = reportIndex.PrintOptionID, LocationID = this.reportService.LocationID, ReportPath = reportIndex.ReportURL
            };

            printViewModel.FromDate = HomeSession.GetReportFromDate(this.HttpContext);
            printViewModel.ToDate   = HomeSession.GetReportToDate(this.HttpContext);

            return(View(viewName: "Viewer", model: printViewModel));
        }
コード例 #12
0
        public JsonResult GetUserIndexes([DataSourceRequest] DataSourceRequest request, bool showInActiveUsers)
        {
            this.userAPIRepository.RepositoryBag["ActiveOption"] = showInActiveUsers ? -1 : 0;
            ICollection <UserIndex> userIndexes = this.userAPIRepository.GetEntityIndexes <UserIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = userIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #13
0
        public JsonResult GetHandlingUnitIndexes([DataSourceRequest] DataSourceRequest request)
        {
            ICollection <HandlingUnitIndex> handlingUnitIndexes = this.handlingUnitAPIRepository.GetEntityIndexes <HandlingUnitIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = handlingUnitIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #14
0
        public virtual ActionResult Index(int?id)
        {
            ViewBag.SelectedEntityID = id == null ? -1 : (int)id;
            ViewBag.ShowDiscount     = this.GenericService.GetShowDiscount();

            TSimpleViewModel simpleViewModel = new TSimpleViewModel()
            {
                GlobalFromDate = HomeSession.GetGlobalFromDate(this.HttpContext), GlobalToDate = HomeSession.GetGlobalToDate(this.HttpContext)
            };

            return(View(this.InitViewModel(simpleViewModel)));
        }
コード例 #15
0
        public JsonResult GetFinishedItemIndexes([DataSourceRequest] DataSourceRequest request)
        {
            ICollection <FinishedItemIndex> semifinishedItemIndexes = this.semifinishedItemAPIRepository.GetEntityIndexes <FinishedItemIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = semifinishedItemIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #16
0
        public JsonResult GetGoodsReceiptIndexes([DataSourceRequest] DataSourceRequest request, string nmvnTaskID, int moduleDetailID)
        {
            this.goodsReceiptAPIRepository.RepositoryBag["NMVNTaskID"]     = nmvnTaskID;
            this.goodsReceiptAPIRepository.RepositoryBag["ModuleDetailID"] = moduleDetailID;
            ICollection <GoodsReceiptIndex> goodsReceiptIndexes = this.goodsReceiptAPIRepository.GetEntityIndexes <GoodsReceiptIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = goodsReceiptIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #17
0
        public JsonResult GetPackageIssueIndexes([DataSourceRequest] DataSourceRequest request)
        {
            ICollection <PackageIssueIndex> packageIssueIndexes = this.packageIssueAPIRepository.GetEntityIndexes <PackageIssueIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = packageIssueIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #18
0
        public JsonResult GetSemifinishedHandoverIndexes([DataSourceRequest] DataSourceRequest request, int nmvnTaskID)
        {
            this.semifinishedHandoverAPIRepository.RepositoryBag["NMVNTaskID"] = nmvnTaskID;
            ICollection <SemifinishedHandoverIndex> semifinishedHandoverIndexes = this.semifinishedHandoverAPIRepository.GetEntityIndexes <SemifinishedHandoverIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext));

            DataSourceResult response = semifinishedHandoverIndexes.ToDataSourceResult(request);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }