public string AddEdit(crm_Countries model) { //Variables ActionResultModel resultModel = new ActionResultModel(); crm_Countries res = null; // lưu data return(JsonConvert.SerializeObject(resultModel)); }
public ActionResult Create(int id = 0) { //Variables crm_Countries model = null; if (id > 0) { model = _countryService.GetCountryById(id); } else { model = new crm_Countries(); } return(View(model)); }
/// <summary> /// View customer's information /// </summary> /// <param name="id">id of customer</param> /// <returns></returns> public ActionResult ViewDetail(int id = 0) { //variables crm_Countries country = null; CustomerContactModel model = null; model = _customerService.GetCustomerInfor(id); if (model == null) { return(RedirectToAction("Index")); } country = _countryService.GetCountryById(model.CountryId.HasValue?model.CountryId.Value:0); model.CountryName = country == null ? "" : country.CountryName; return(View(model)); }