예제 #1
0
        public ActionResult GetCategory(string Id)
        {
            CategoryViewModel model;

            if (!string.IsNullOrEmpty(Id))
            {
                var res = _categoryMasterService.GetCategory(Convert.ToDecimal(Id));
                model = AutoMapper.Mapper.Map <CategoryMaster, CategoryViewModel>(res);
            }
            else
            {
                model = new CategoryViewModel();
            }

            return(PartialView("AddEditCategory", model));
        }