Esempio n. 1
0
        public ActionResult Create([Bind(Include = "ID,HOTEN,CMND,GIOITINH,DIACHI,DT")] KHACHHANG kHACHHANG)
        {
            if (ModelState.IsValid)
            {
                int t = QLKHACH_BUS.them(kHACHHANG);
                if (t != 0)
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(View(kHACHHANG));
        }
Esempio n. 2
0
        // GET: KHACHHANG/Edit/5
        public ActionResult Edit(int id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            KHACHHANG kHACHHANG = QLKHACH_BUS.find(id);

            if (kHACHHANG == null)
            {
                return(HttpNotFound());
            }

            return(View(kHACHHANG));
        }
Esempio n. 3
0
 // GET: KHACHHANG
 public ActionResult Index()
 {
     return(View(QLKHACH_BUS.load()));
 }