Esempio n. 1
0
 public bool UpdateBill(int Mabill)
 {
     try
     {
         HOADON bill = new HOADON();
         bill = _qlcfEf.HOADONs.SingleOrDefault(u => u.ID == Mabill);
         DateTime now = DateTime.Now;
         bill.trangthai = 1;
         bill.CheckOut  = now;
         _qlcfEf.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Esempio n. 2
0
        public static void updateHD(string maHD, HOADON hd)
        {
            string sql = "update HOADON set maKH='" + hd.MaKH + "',maSP='" + hd.Masp + "',gia='" + hd.Gia + "',soLuong='" + hd.SoLuong + "',ngayLap='" + hd.NgayLap + "' where maHD='" + maHD + "'";

            dbConnectionData.ExcuteNonQuery(sql);
        }
Esempio n. 3
0
        public static void insertHD(HOADON hd)
        {
            string sql = "insert into HoaDon values('" + hd.MaHD + "','" + hd.MaKH + "','" + hd.Masp + "','" + hd.Gia + "','" + hd.SoLuong + "','" + hd.NgayLap + "')";

            dbConnectionData.ExcuteNonQuery(sql);
        }