Ejemplo n.º 1
0
 public static void InsertToathuoc( string MABENHAN, string MATHUOC, string SOLUONG, string SOLANDUNG, string SOLUONGDUNG,DateTime NGAYTAO)
 {
     using (DB_HMS_Entities dk = new DB_HMS_Entities())
     {
         tbKETOATHUOC sl = new tbKETOATHUOC();
         sl.MABENHAN = MABENHAN;
         sl.SOLUONG = Int32.Parse(SOLUONG);
         sl.SOLANDUNG = Int32.Parse(SOLANDUNG);
         sl.SOLUONGDUNG = Int32.Parse(SOLUONGDUNG);
         sl.NGAYTAO = NGAYTAO;
         dk.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public static void UpdateToathuoc(string MABENHAN, string MATHUOC, string SOLUONG, string SOLANDUNG, string SOLUONGDUNG,DateTime NGAYTAO)
 {
     using (DB_HMS_Entities ds = new DB_HMS_Entities())
     {
         tbKETOATHUOC pk = new tbKETOATHUOC();
         var query = (from dss in ds.tbKETOATHUOCs
                      where dss.MABENHAN == MABENHAN
                      select dss).First();
         //query.MABENH = MABENH;
         query.MATHUOC = MATHUOC;
         query.SOLUONG = int.Parse(SOLUONG);
         query.SOLANDUNG = int.Parse(SOLANDUNG);
         query.SOLUONGDUNG = int.Parse(SOLUONGDUNG);
         query.NGAYTAO = NGAYTAO;
         ds.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tbKETOATHUOCs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbKETOATHUOCs(tbKETOATHUOC tbKETOATHUOC)
 {
     base.AddObject("tbKETOATHUOCs", tbKETOATHUOC);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new tbKETOATHUOC object.
 /// </summary>
 /// <param name="sTT">Initial value of the STT property.</param>
 public static tbKETOATHUOC CreatetbKETOATHUOC(global::System.Int32 sTT)
 {
     tbKETOATHUOC tbKETOATHUOC = new tbKETOATHUOC();
     tbKETOATHUOC.STT = sTT;
     return tbKETOATHUOC;
 }