コード例 #1
0
        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"));
            }
        }
コード例 #2
0
        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));
            }
        }