Exemple #1
0
 public void PostBill(Datphong datphong)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.SP_THEMDAT(datphong.Ngaydat.ToString(), datphong.MaNV, datphong.CMT, datphong.Ghichu);
     }
 }
Exemple #2
0
        public void PutBill(long iddat, Datphong bill)
        {
            using (QLKhachsanEntities entity = new QLKhachsanEntities())
            {
                var bi = entity.Datphongs.FirstOrDefault(e => e.IDDAT.Equals(iddat));
                bi.IDDAT   = bill.IDDAT;
                bi.Ngaydat = bill.Ngaydat;
                bi.MaNV    = bill.MaNV;
                bi.CMT     = bill.CMT;
                bi.Ghichu  = bill.Ghichu;

                entity.SaveChanges();
            }
        }