public JsonResult UpdateCategory(string category_code, string category_name, string category_state, string category_note) { AjaxResultModel Result = new AjaxResultModel(); try { TB_CATEGORIES t = Categories_Service.GetById(category_code); t.CategoryName = category_name; t.CategoryState = category_state; t.CategoryNote = category_note; if (Categories_Service.Update(t)) { Result.Code = 000; Result.Result = "Thành công"; } else { Result.Code = 001; Result.Result = "Không thành công"; } } catch (Exception Ex) { Result.Code = 2000; Result.Result = "Có lỗi xảy ra. Vui lòng thử lại sau hoặc liên hệ với người quản trị."; CORE.Helpers.IOHelper.WriteLog(StartUpPath, IpAddress, "UpdatePassword :", Ex.Message, Ex.ToString()); } return(Json(Result)); }
public PartialViewResult _CategoryListDetail(string categoryCode = "") { int height = (int)(Request.Browser.ScreenPixelsHeight * 0.85); TB_CATEGORIES sup = Categories_Service.GetById(categoryCode); ViewBag.Category = sup; return(PartialView(height)); }