public ActionResult ChinhSuaKhachHangThanThiet(string MaKH) { var model = KhachHangQueries.LayThongTinChiTiet(MaKH); ViewBag.MaLoaiKH = new SelectList(LoaiKhachHangQueries.LayDanhSachLoaiKhachHang(), "MaLoaiKH", "TenLoaiKH", model.MaLoaiKH); return(View(model)); }
public ActionResult ChinhSuaKhachHang(KhachHangViewModel khachHang) { var model = KhachHangQueries.LayThongTinChiTiet(khachHang.MaKH); // ViewBag.MaLoaiKH = new SelectList(LoaiKhachHangQueries.LayDanhSachLoaiKhachHang(), "MaLoaiKH", "TenLoaiKH", model.MaLoaiKH); if (model.MaLoaiKH == "LKH2") { KhachHangQueries.CapNhatThongTinKhachHangThanThiet(khachHang); return(RedirectToAction("MenuDanhSachKhachHangThanThiet", "KhachHang")); } else { KhachHangQueries.CapNhatThongTinKhachHang(khachHang); return(RedirectToAction("MenuDanhSachKhachHang", "KhachHang")); } }
public ActionResult ThongTinChiTiet_KTT(string MaKH) { var model = KhachHangQueries.LayThongTinChiTiet(MaKH); return(View(model)); }
public JsonResult GetThongTinKH(String maKhachHang) { var data = KhachHangQueries.LayThongTinChiTiet(maKhachHang); return(Json(new { data = data }, JsonRequestBehavior.AllowGet)); }