Пример #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tbPHONGKHAMs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbPHONGKHAMs(tbPHONGKHAM tbPHONGKHAM)
 {
     base.AddObject("tbPHONGKHAMs", tbPHONGKHAM);
 }
Пример #2
0
 /// <summary>
 /// cap nhat phong kham vao entities
 /// </summary>
 /// <param name="MAPHONGKHAM"></param>
 /// <param name="TENPHONG"></param>
 /// <param name="NGAYTAO"></param>
 /// <param name="TRANGTHAI"></param>
 public static void Updatephongkham(string MAPHONGKHAM, string TENPHONG, DateTime NGAYTAO, Boolean TRANGTHAI)
 {
     using (DB_HMS_Entities ds = new DB_HMS_Entities())
     {
         tbPHONGKHAM pk = new tbPHONGKHAM();
         var query = (from dss in ds.tbPHONGKHAMs
                      where dss.MAPHONGKHAM == MAPHONGKHAM
                      select dss).First();
         query.TENPHONG = TENPHONG;
         query.NGAYTAO = NGAYTAO;
         query.TRANGTHAI = TRANGTHAI;
         ds.SaveChanges();
     }
 }
Пример #3
0
 /// <summary>
 /// Create a new tbPHONGKHAM object.
 /// </summary>
 /// <param name="mAPHONGKHAM">Initial value of the MAPHONGKHAM property.</param>
 public static tbPHONGKHAM CreatetbPHONGKHAM(global::System.String mAPHONGKHAM)
 {
     tbPHONGKHAM tbPHONGKHAM = new tbPHONGKHAM();
     tbPHONGKHAM.MAPHONGKHAM = mAPHONGKHAM;
     return tbPHONGKHAM;
 }
Пример #4
0
 /// <summary>
 /// Them moi phong kham vao entities
 /// </summary>
 /// <param name="MAPHONGKHAM"></param>
 /// <param name="TENPHONG"></param>
 /// <param name="NGAYTAO"></param>
 /// <param name="TRANGTHAI"></param>
 public static void Insertphongkham(string MAPHONGKHAM, string TENPHONG, DateTime NGAYTAO, Boolean TRANGTHAI)
 {
     using (DB_HMS_Entities ds = new DB_HMS_Entities())
     {
         tbPHONGKHAM pk = new tbPHONGKHAM();
         pk.MAPHONGKHAM = MAPHONGKHAM;
         pk.TENPHONG = TENPHONG;
         pk.NGAYTAO = NGAYTAO;
         pk.TRANGTHAI = TRANGTHAI;
         ds.AddTotbPHONGKHAMs(pk);
         ds.SaveChanges();
     }
 }