Пример #1
0
        public ActionResult Create(FormCollection collection, CHITIETPHONG ct)
        {
            if (ModelState.IsValid)
            {
                int num;
                int.TryParse(collection["var2"], out num);
                ct.IDCT = num;

                if (cc.Create(ct))
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    ModelState.AddModelError("", "Lỗi khi thêm");
                }
            }
            ViewBag.var2 = new SelectList(cc.LoadThuePhong(0), "ID", "PHONG");
            return(View());
        }
Пример #2
0
 public bool capNhatChiTietPhong(CHITIETPHONG chiTietPhong)
 {
     return(dal_chiTietPhong.capNhatChiTietPhong(chiTietPhong));
 }
Пример #3
0
 public bool themChiTietPhong(CHITIETPHONG chiTietPhong)
 {
     return(dal_chiTietPhong.themChiTietPhong(chiTietPhong));
 }
Пример #4
0
 public bool Create(CHITIETPHONG ctphong)
 {
     return(DataProvider.Instance.ExcuteNonQuery("exec pInsertKhach @idCT , @CMND , @ten , @soDienThoai , @truongphong ", new object[] {
         ctphong.IDCT, ctphong.CMND, ctphong.HOTEN, ctphong.SDT, ctphong.TRUONGPHONG
     }) > 0);
 }