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()); }
public bool capNhatChiTietPhong(CHITIETPHONG chiTietPhong) { return(dal_chiTietPhong.capNhatChiTietPhong(chiTietPhong)); }
public bool themChiTietPhong(CHITIETPHONG chiTietPhong) { return(dal_chiTietPhong.themChiTietPhong(chiTietPhong)); }
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); }