コード例 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tbDONTHUOCMAUCHITIETs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbDONTHUOCMAUCHITIETs(tbDONTHUOCMAUCHITIET tbDONTHUOCMAUCHITIET)
 {
     base.AddObject("tbDONTHUOCMAUCHITIETs", tbDONTHUOCMAUCHITIET);
 }
コード例 #2
0
 public static void UpdateDonthuocchitiet(string MADONTHUOCMAU, string MABACSI, string MATHUOC, string SOLUONG, string SOLANDUNG, string SOLUONGDUNG, DateTime NGAYTAO)
 {
     using (DB_HMS_Entities ds = new DB_HMS_Entities())
     {
         tbDONTHUOCMAUCHITIET pk = new tbDONTHUOCMAUCHITIET();
         var query = (from dss in ds.tbDONTHUOCMAUCHITIETs
                      where dss.MADONTHUOCMAU ==MADONTHUOCMAU && dss.MABACSI==MABACSI && dss.MATHUOC==MATHUOC
                      select dss).First();
         //query.MABENH = MABENH;
         query.SOLUONG =  Int32.Parse(SOLUONG) ;
         query.SOLANDUNG =  Int32.Parse(SOLANDUNG);
         query.SOLUONGDUNG =  Int32.Parse(SOLUONGDUNG);
         query.NGAYTAO = NGAYTAO;
         ds.SaveChanges();
     }
 }
コード例 #3
0
 /// <summary>
 /// Create a new tbDONTHUOCMAUCHITIET object.
 /// </summary>
 /// <param name="sTT">Initial value of the STT property.</param>
 /// <param name="mATHUOC">Initial value of the MATHUOC property.</param>
 /// <param name="mADONTHUOCMAU">Initial value of the MADONTHUOCMAU property.</param>
 public static tbDONTHUOCMAUCHITIET CreatetbDONTHUOCMAUCHITIET(global::System.Int32 sTT, global::System.String mATHUOC, global::System.String mADONTHUOCMAU)
 {
     tbDONTHUOCMAUCHITIET tbDONTHUOCMAUCHITIET = new tbDONTHUOCMAUCHITIET();
     tbDONTHUOCMAUCHITIET.STT = sTT;
     tbDONTHUOCMAUCHITIET.MATHUOC = mATHUOC;
     tbDONTHUOCMAUCHITIET.MADONTHUOCMAU = mADONTHUOCMAU;
     return tbDONTHUOCMAUCHITIET;
 }
コード例 #4
0
 public static void InsertDonthuocchitiet(string MADONTHUOCMAU, string MABACSI, string MATHUOC, string SOLUONG, string SOLANDUNG ,string SOLUONGDUNG, DateTime NGAYTAO)
 {
     using (DB_HMS_Entities ds = new DB_HMS_Entities())
     {
         tbDONTHUOCMAUCHITIET pk = new tbDONTHUOCMAUCHITIET();
         pk.MADONTHUOCMAU = MADONTHUOCMAU;
         pk.MABACSI = MABACSI;
         pk.MATHUOC = MATHUOC;
         pk.SOLUONG = Int32.Parse(SOLUONG);
         pk.SOLANDUNG = Int32.Parse(SOLANDUNG);
         pk.SOLUONGDUNG = Int32.Parse(SOLUONGDUNG);
         pk.NGAYTAO = NGAYTAO;
         ds.AddTotbDONTHUOCMAUCHITIETs(pk);
         ds.SaveChanges();
     }
 }