/// <summary>
 /// Deprecated Method for adding a new object to the tbTHUOCs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbTHUOCs(tbTHUOC tbTHUOC)
 {
     base.AddObject("tbTHUOCs", tbTHUOC);
 }
Exemple #2
0
 /// <summary>
 /// Thêm thuốc xuống database
 /// </summary>
 /// <param name="MATHUOC"></param>
 /// <param name="TENTHUONGMAI"></param>
 /// <param name="TENBIETDUOC"></param>
 /// <param name="CACHDUNG"></param>
 /// <param name="DONVI"></param>
 /// <param name="DONVIDUNG"></param>
 /// <param name="GHICHU"></param>
 /// <param name="TRANGTHAI"></param>
 public static void InsertMedicine(string MATHUOC, string TENTHUONGMAI, string TENBIETDUOC, string CACHDUNG, string DONVI, string DONVIDUNG, string GHICHU, Boolean TRANGTHAI)
 {
     using (DB_HMS_Entities dk = new DB_HMS_Entities())
     {
         tbTHUOC med = new tbTHUOC();
         med.MATHUOC = MATHUOC;
         med.TENTHUONGMAI = TENTHUONGMAI;
         med.TENBIETDUOC = TENBIETDUOC;
         med.CACHDUNG = CACHDUNG;
         med.DONVI = DONVI;
         med.DONVIDUNG = DONVIDUNG;
         med.GHICHU = GHICHU;
         med.TRANGTHAI = TRANGTHAI;
         dk.AddTotbTHUOCs(med);
         dk.SaveChanges();
     }
 }
 /// <summary>
 /// Create a new tbTHUOC object.
 /// </summary>
 /// <param name="mATHUOC">Initial value of the MATHUOC property.</param>
 /// <param name="tENTHUONGMAI">Initial value of the TENTHUONGMAI property.</param>
 public static tbTHUOC CreatetbTHUOC(global::System.String mATHUOC, global::System.String tENTHUONGMAI)
 {
     tbTHUOC tbTHUOC = new tbTHUOC();
     tbTHUOC.MATHUOC = mATHUOC;
     tbTHUOC.TENTHUONGMAI = tENTHUONGMAI;
     return tbTHUOC;
 }