示例#1
0
 public int InsertHoaDon(HoaDonBan hd)
 {
     try
     {
         db.HoaDonBans.InsertOnSubmit(hd);
         db.SubmitChanges();
     }
     catch
     {
         return -1;
     }
     return 1;
 }
示例#2
0
 public int UpdateHoaDonBan(HoaDonBan hd)
 {
     try
     {
         HoaDonBan d = db.HoaDonBans.SingleOrDefault(n => n.id == hd.id);
         d.idtthoadon = hd.idtthoadon;
         db.SubmitChanges();
     }
     catch
     {
         return -1;
     }
     return 1;
 }
示例#3
0
 partial void DeleteHoaDonBan(HoaDonBan instance);
示例#4
0
 partial void UpdateHoaDonBan(HoaDonBan instance);
示例#5
0
 partial void InsertHoaDonBan(HoaDonBan instance);
示例#6
0
		private void detach_HoaDonBans(HoaDonBan entity)
		{
			this.SendPropertyChanging();
			entity.TTHoaDon = null;
		}
示例#7
0
		private void attach_HoaDonBans(HoaDonBan entity)
		{
			this.SendPropertyChanging();
			entity.TTHoaDon = this;
		}