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); }
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)); }