public ActionResult SuaKhachHang(KhachHangModel2 model) { try { IKhachHangService serviceKH = new KhachHangService(); serviceKH.SuaKhachHang(baseAddress, "khachhang/suakhachhang", model); return(RedirectToAction("DanhSachKhachHang")); } catch (Exception ex) { return(RedirectToAction("DanhSachKhachHang")); } }
public ActionResult SuaKhachHang(KhachHangModel2 model) { try { IKhachHangService serviceKH = new KhachHangService(); serviceKH.SuaKhachHang(baseAddress, "khachhang/suakhachhang", model); KhachHangModel khModel = serviceKH.GetKhachHangById(baseAddress, $"khachhang/getKhById?idKH={model.id}"); Session["KhachHang"] = khModel; return(Json(1)); } catch (Exception ex) { return(Json(0)); } }