Exemple #1
0
 public CustomerTypeVM EditCustomerType(CustomerTypeVM c)
 {
     DB.tblCustomerType CustomerType = IMSDB.tblCustomerTypes.Find(c.CustomerTypeId);
     if (CustomerType != null)
     {
         CustomerType.CustomerType       = c.CustomerType;
         CustomerType.IsActive           = c.IsActive;
         IMSDB.Entry(CustomerType).State = EntityState.Modified;
         IMSDB.SaveChanges();
     }
     return(c);
 }
Exemple #2
0
 public CustomerTypeVM AddCustomerType(CustomerTypeVM c)
 {
     DB.tblCustomerType CustomerType = IMSDB.tblCustomerTypes.Add(
         new DB.tblCustomerType
     {
         CustomerType = c.CustomerType,
         IsActive     = c.IsActive
     });
     IMSDB.SaveChanges();
     c.CustomerTypeId = CustomerType.CustomerTypeId;
     return(c);
 }
 public CustomerTypeVM EditCustomerType(CustomerTypeVM c)
 {
     return(_CustomerTypeDL.EditCustomerType(c));
 }
 public CustomerTypeVM AddCustomerType(CustomerTypeVM c)
 {
     return(_CustomerTypeDL.AddCustomerType(c));
 }
 public int DeleteCustomerType(CustomerTypeVM c)
 {
     return(_CustomerTypeBL.DeleteCustomerType(c.CustomerTypeId));
 }