コード例 #1
0
        public ActionResult ChinhSuaKhachHangThanThiet(string MaKH)
        {
            var model = KhachHangQueries.LayThongTinChiTiet(MaKH);

            ViewBag.MaLoaiKH = new SelectList(LoaiKhachHangQueries.LayDanhSachLoaiKhachHang(), "MaLoaiKH", "TenLoaiKH", model.MaLoaiKH);
            return(View(model));
        }
コード例 #2
0
        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"));
            }
        }
コード例 #3
0
        public ActionResult ThongTinChiTiet_KTT(string MaKH)
        {
            var model = KhachHangQueries.LayThongTinChiTiet(MaKH);

            return(View(model));
        }
コード例 #4
0
        public JsonResult GetThongTinKH(String maKhachHang)
        {
            var data = KhachHangQueries.LayThongTinChiTiet(maKhachHang);

            return(Json(new { data = data }, JsonRequestBehavior.AllowGet));
        }