コード例 #1
0
 public void XuliTachBan()
 {
     int banHang = this.BanHang.BANHANG.BanHangID;
     this.BanHang.TachBan(this);
     TACHBAN tachBan = new TACHBAN();
     tachBan.NhanVienID = mTransit.NhanVien.NhanVienID;
     tachBan.BanHangID = banHang;
     tachBan.ThoiGian = DateTime.Now;            
     foreach (var item in _ListBan)
     {
         CHITIETTACHBAN chitiet = new CHITIETTACHBAN();                
         chitiet.BanHangID = item.BANHANG.BanHangID;
         tachBan.CHITIETTACHBANs.Add(chitiet);      
     }
     if (this.BanHang._ListChiTietBanHang.Count>0)
     {
         CHITIETTACHBAN chitiet = new CHITIETTACHBAN();                
         chitiet.BanHangID = this.BanHang.BANHANG.BanHangID;
         tachBan.CHITIETTACHBANs.Add(chitiet);
     }
     mKaraokeEntities.TACHBANs.AddObject(tachBan);
     mKaraokeEntities.SaveChanges();
 }
コード例 #2
0
 /// <summary>
 /// Create a new TACHBAN object.
 /// </summary>
 /// <param name="tachBanID">Initial value of the TachBanID property.</param>
 /// <param name="visual">Initial value of the Visual property.</param>
 /// <param name="deleted">Initial value of the Deleted property.</param>
 /// <param name="edit">Initial value of the Edit property.</param>
 public static TACHBAN CreateTACHBAN(global::System.Int32 tachBanID, global::System.Boolean visual, global::System.Boolean deleted, global::System.Boolean edit)
 {
     TACHBAN tACHBAN = new TACHBAN();
     tACHBAN.TachBanID = tachBanID;
     tACHBAN.Visual = visual;
     tACHBAN.Deleted = deleted;
     tACHBAN.Edit = edit;
     return tACHBAN;
 }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the TACHBANs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTACHBANs(TACHBAN tACHBAN)
 {
     base.AddObject("TACHBANs", tACHBAN);
 }