Пример #1
0
        public ThanhToanPhong HoaDon(int id)
        {
            ThanhToanPhong tam = new ThanhToanPhong(DataProvider.Instance.ExcuteQuery("pTongTienKhachSan @id", new object[] { id }).Rows[0]);

            tam.Sddv = LoadDV(id);
            tam.TTKH = GetKHACHHANG(tam.CMND);
            return(tam);
        }
Пример #2
0
            public ThanhToanPhong HoaDon(int id, int detail = 0)
            {
                ThanhToanPhong tam = new ThanhToanPhong(DataProvider.Instance.ExcuteQuery("pTongTienKhachSan @id , @detail", new object[] { id, detail }).Rows[0]);

                tam.Sddv         = LoadSDDV(id);
                tam.TTKH         = GetKHACHHANG(tam.CMND);
                tam.Chitietphong = LoadChiTietPhong(tam.ID);
                tam.phong        = PGetPhong(tam.IDPHONG);
                int    t = 0;
                object c = DataProvider.Instance.ExcuteScalar("pTongTienDichVu @id ", new object[] { id });

                int.TryParse(c.ToString(), out t);
                tam.TongTienDichVu = t;
                return(tam);
            }
Пример #3
0
 public ActionResult Thanhtoan(FormCollection Collection, ThanhToanPhong thanhtoan)
 {
     if (ModelState.IsValid)
     {
         //int.TryParse(Collection["tong"].ToString(), out tong);
         //thanhtoan.TongTien = tong;
         if (cc.ThanhToan(cc.HoaDon(thanhtoan.ID)))
         {
             return(RedirectToAction("Index"));
         }
         else
         {
             ModelState.AddModelError("", "Lỗi");
         }
     }
     return(View());
 }
Пример #4
0
 public bool ThanhToan(ThanhToanPhong thanhtoan)
 {
     return(DataProvider.Instance.ExcuteNonQuery("pThanhToan @idCt , @TongTien ", new object[] { thanhtoan.ID, thanhtoan.TongTien + thanhtoan.TongTienDichVu }) > 0);
 }