Exemplo n.º 1
0
 public CKTD_DonVi getCKTD_DonViById(int iD)
 {
     try
     {
         CKTD_DonVi CKTD_DonVi = (CKTD_DonVi)session.Get <CKTD_DonVi>(iD);
         return(CKTD_DonVi);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 2
0
 public void xoaCKTD_DonVi(CKTD_DonVi CKTD_DonVi)
 {
     sessionManager.BeginTransaction();
     try
     {
         session.Delete(CKTD_DonVi);
         sessionManager.CommitTransaction();
     }
     catch (HibernateException ex)
     {
         throw new DataException(ex.Message, ex);
     }
 }
Exemplo n.º 3
0
 public void themCKTD_DonVi(CKTD_DonVi CKTD_DonVi)
 {
     sessionManager.BeginTransaction();
     try
     {
         session.Save(CKTD_DonVi);
         sessionManager.CommitTransaction();
         //session.Close();
     }
     catch (HibernateException ex)
     {
         throw new DataException(ex.Message, ex);
     }
 }