Beispiel #1
0
 private void SaveKho()
 {
     if (Check())
     {
         try
         {
             ConnectionUtil.Instance.BeginTransaction();
             if (frmKho.isAdd)
             {
                 DMKhoDataProvider.Insert(SetKhoInfo());
                 ConnectionUtil.Instance.CommitTransaction();
             }
             else
             {
                 DMKhoDataProvider.Update(SetKhoInfo());
                 ConnectionUtil.Instance.CommitTransaction();
             }
         }
         catch (Exception)
         {
             ConnectionUtil.Instance.RollbackTransaction();
             throw;
         }
     }
 }