public AccountingMethodVM EditAccountingMethod(AccountingMethodVM c)
 {
     DB.tblAccountingMethod AccountingMethod = IMSDB.tblAccountingMethods.Find(c.AccountingMethodId);
     if (AccountingMethod != null)
     {
         AccountingMethod.AccountingMethod   = c.AccountingMethod;
         AccountingMethod.IsActive           = c.IsActive;
         IMSDB.Entry(AccountingMethod).State = EntityState.Modified;
         IMSDB.SaveChanges();
     }
     return(c);
 }
 public AccountingMethodVM AddAccountingMethod(AccountingMethodVM c)
 {
     DB.tblAccountingMethod AccountingMethod = IMSDB.tblAccountingMethods.Add(
         new DB.tblAccountingMethod
     {
         AccountingMethod = c.AccountingMethod,
         IsActive         = c.IsActive
     });
     IMSDB.SaveChanges();
     c.AccountingMethodId = AccountingMethod.AccountingMethodId;
     return(c);
 }
Exemple #3
0
 public AccountingMethodVM EditAccountingMethod(AccountingMethodVM c)
 {
     return(_AccountingMethodDL.EditAccountingMethod(c));
 }
Exemple #4
0
 public AccountingMethodVM AddAccountingMethod(AccountingMethodVM c)
 {
     return(_AccountingMethodDL.AddAccountingMethod(c));
 }
 public int DeleteAccountingMethod(AccountingMethodVM c)
 {
     return(_AccountingMethodBL.DeleteAccountingMethod(c.AccountingMethodId));
 }