//
        // GET: /Master/Material/

        public ActionResult Index()
        {
            var model = new MaterialSearchViewModel
            {
                Grid = GenerateGrid()
            };

            return(View(model));
        }
        public ActionResult SearchByName(MaterialSearchViewModel model, GridSettings gridSettings)
        {
            if (string.IsNullOrEmpty(gridSettings.SortField))
            {
                gridSettings.SortField = "F01_MaterialCode";
                gridSettings.SortOrder = SortOrder.Asc;
            }
            var result = _materialDomain.SearchCriteria(model.MaterialCode, gridSettings);

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