Esempio n. 1
0
 public bool insertCTHoaDon(string mhd, string msp, int sl, float tien)
 {
     try
     {
         ct_hoadon ct = new ct_hoadon();
         ct.mahd = mhd;
         ct.masp = msp;
         ct.soluong = sl;
         ct.thanhtien = tien;
         db.ct_hoadons.InsertOnSubmit(ct);
         db.SubmitChanges();
         return true;
     }
     catch
     {
         return false;
     }
 }
 partial void Deletect_hoadon(ct_hoadon instance);
 partial void Updatect_hoadon(ct_hoadon instance);
 partial void Insertct_hoadon(ct_hoadon instance);
		private void detach_ct_hoadons(ct_hoadon entity)
		{
			this.SendPropertyChanging();
			entity.sanpham = null;
		}
		private void attach_ct_hoadons(ct_hoadon entity)
		{
			this.SendPropertyChanging();
			entity.hoadon = this;
		}