예제 #1
0
        // GET: ProductManagement/ProductCertification
        public ActionResult Index()
        {
            ViewBag.ScreenId = "TCPR021F";
            var model = new ProductCertificationSearchViewModel
            {
                GridNormal    = GenerateGridNormal(),
                GridOutOfPlan = GenerateGridOutOfPlan(),
                GridSample    = GenerateGridSample()
            };

            return(View(model));
        }
예제 #2
0
        public ActionResult SearchByOutOfPlan(ProductCertificationSearchViewModel model, GridSettings gridSettings)
        {
            if (string.IsNullOrEmpty(gridSettings.SortField))
            {
                gridSettings.SortField = "F58_ProductCode";
                gridSettings.SortOrder = SortOrder.Asc;
            }
            var result = _prodCerDomain.SearchOutOfPlan(model.YearMonth, gridSettings);

            if (!result.IsSuccess)
            {
                return(Json(null, JsonRequestBehavior.AllowGet));
            }

            var response = Mapper.Map <GridResponse <ProductCertificationOutOfPlanItem> >(result.Data);

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