Пример #1
0
 public void SaveBillType(string billCode, string billName, int billType, int taskLevel, string memo)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         BillTypeDao billTypeDao = new BillTypeDao();
         billTypeDao.Update(billCode, billName, billType, taskLevel, memo);
     }
 }
Пример #2
0
 public void DeleteBillType(string billCode)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         BillTypeDao billTypeDao = new BillTypeDao();
         billTypeDao.Delete(billCode);
     }
 }
Пример #3
0
 public DataTable GetBillType()
 {
     using (PersistentManager pm = new PersistentManager())
     {
         BillTypeDao billDao = new BillTypeDao();
         return billDao.Find();
     }
 }
Пример #4
0
 public void AddBillType(string billCode, string billName, int billType, int taskLevel, string memo)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         try
         {
             pm.BeginTransaction();
             BillTypeDao billTypeDao = new BillTypeDao();
             if (billTypeDao.Find(billCode) == 0)
                 billTypeDao.Insert(billCode, billName, billType, taskLevel, memo);
             else
                 throw new Exception("��Ʒ�Ѵ��ڣ����������롣");
             pm.Commit();
         }
         catch (Exception e)
         {
             pm.Rollback();
             throw new Exception(e.Message);
         }
     }
 }