Esempio n. 1
0
 public bool insertCTPhieuNhap(string mpn, string msp, int sl, float gia, float tien)
 {
     try
     {
         ct_phieunhap ct = new ct_phieunhap();
         ct.mapn = mpn;
         ct.masp = msp;
         ct.soluong = sl;
         ct.gia = gia;
         ct.thanhtien = tien;
         db.ct_phieunhaps.InsertOnSubmit(ct);
         db.SubmitChanges();
         return true;
     }
     catch
     {
         return false;
     }
 }
 partial void Deletect_phieunhap(ct_phieunhap instance);
 partial void Updatect_phieunhap(ct_phieunhap instance);
 partial void Insertct_phieunhap(ct_phieunhap instance);
		private void detach_ct_phieunhaps(ct_phieunhap entity)
		{
			this.SendPropertyChanging();
			entity.sanpham = null;
		}
		private void attach_ct_phieunhaps(ct_phieunhap entity)
		{
			this.SendPropertyChanging();
			entity.phieunhap = this;
		}