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); } }
public void DeleteBillType(string billCode) { using (PersistentManager pm = new PersistentManager()) { BillTypeDao billTypeDao = new BillTypeDao(); billTypeDao.Delete(billCode); } }
public DataTable GetBillType() { using (PersistentManager pm = new PersistentManager()) { BillTypeDao billDao = new BillTypeDao(); return billDao.Find(); } }
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); } } }