예제 #1
0
 public BOTonKhoTong()
 {
     TonKhoTong = new TONKHOTONG();
     Mon = new MENUMON();
 }
 /// <summary>
 /// Create a new TONKHOTONG object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="monID">Initial value of the MonID property.</param>
 /// <param name="khoID">Initial value of the KhoID property.</param>
 /// <param name="donViID">Initial value of the DonViID property.</param>
 /// <param name="soLuongTon">Initial value of the SoLuongTon property.</param>
 /// <param name="soLuongBan">Initial value of the SoLuongBan property.</param>
 /// <param name="soLuongNhap">Initial value of the SoLuongNhap property.</param>
 /// <param name="soLuongChuyen">Initial value of the SoLuongChuyen property.</param>
 /// <param name="soLuongHu">Initial value of the SoLuongHu property.</param>
 /// <param name="soLuongDieuChinh">Initial value of the SoLuongDieuChinh property.</param>
 /// <param name="soLuongMat">Initial value of the SoLuongMat property.</param>
 public static TONKHOTONG CreateTONKHOTONG(global::System.Int32 id, global::System.Int32 monID, global::System.Int32 khoID, global::System.Int32 donViID, global::System.Int32 soLuongTon, global::System.Int32 soLuongBan, global::System.Int32 soLuongNhap, global::System.Int32 soLuongChuyen, global::System.Int32 soLuongHu, global::System.Int32 soLuongDieuChinh, global::System.Int32 soLuongMat)
 {
     TONKHOTONG tONKHOTONG = new TONKHOTONG();
     tONKHOTONG.ID = id;
     tONKHOTONG.MonID = monID;
     tONKHOTONG.KhoID = khoID;
     tONKHOTONG.DonViID = donViID;
     tONKHOTONG.SoLuongTon = soLuongTon;
     tONKHOTONG.SoLuongBan = soLuongBan;
     tONKHOTONG.SoLuongNhap = soLuongNhap;
     tONKHOTONG.SoLuongChuyen = soLuongChuyen;
     tONKHOTONG.SoLuongHu = soLuongHu;
     tONKHOTONG.SoLuongDieuChinh = soLuongDieuChinh;
     tONKHOTONG.SoLuongMat = soLuongMat;
     return tONKHOTONG;
 }
예제 #3
0
 private Data.TONKHOTONG KiemTraTonKhoTong(FrameworkRepository<TONKHOTONG> frm, int KhoID, int MonID, int DonViID)
 {
     Data.TONKHOTONG item = null;
     if (frm.Query().Where(s => s.KhoID == KhoID && s.MonID == MonID && s.DonViID == DonViID).Count() == 0)
     {
         item = new TONKHOTONG();
         item.DonViID = DonViID;
         item.KhoID = KhoID;
         item.MonID = MonID;
         item.TenMonBaoCao = "";
         item.SoLuongBan = 0;
         item.SoLuongDieuChinh = 0;
         item.SoLuongHu = 0;
         item.SoLuongNhap = 0;
         item.SoLuongTon = 0;
         item.SoLuongMat = 0;
         item.SoLuongChuyen = 0;
         return item;
     }
     return frm.Query().Where(s => s.KhoID == KhoID && s.MonID == MonID && s.DonViID == DonViID).FirstOrDefault();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the TONKHOTONGs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTONKHOTONGs(TONKHOTONG tONKHOTONG)
 {
     base.AddObject("TONKHOTONGs", tONKHOTONG);
 }