Example #1
0
        //
        // GET: /Master/PdtPln/

        public ActionResult Index()
        {
            var model = new PdtPlnSearchViewModel
            {
                Grid      = GenerateGrid(),
                YearMonth = DateTime.Now.ToString("MM/yyyy")
            };

            return(View(model));
        }
Example #2
0
        public ActionResult SearchByDate(PdtPlnSearchViewModel model, GridSettings gridSettings)
        {
            if (string.IsNullOrEmpty(gridSettings.SortField))
            {
                gridSettings.SortField = "F39_KndEptBgnDate";
                gridSettings.SortOrder = SortOrder.Asc;
            }
            var result = _pdtPlnDomain.SearchCriteria(model.YearMonth, model.KndLine, gridSettings);

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

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

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