public CompanyTypeVM AddCompanyType(CompanyTypeVM c)
 {
     DB.tblCompanyType CompanyType = IMSDB.tblCompanyTypes.Add(
         new DB.tblCompanyType
     {
         CompanyType = c.CompanyType,
         IsActive    = c.IsActive
     });
     IMSDB.SaveChanges();
     c.CompanyTypeId = CompanyType.CompanyTypeId;
     return(c);
 }
 public CompanyTypeVM EditCompanyType(CompanyTypeVM c)
 {
     DB.tblCompanyType CompanyType = IMSDB.tblCompanyTypes.Find(c.CompanyTypeId);
     if (CompanyType != null)
     {
         CompanyType.CompanyType        = c.CompanyType;
         CompanyType.IsActive           = c.IsActive;
         IMSDB.Entry(CompanyType).State = EntityState.Modified;
         IMSDB.SaveChanges();
     }
     return(c);
 }
 public CompanyTypeVM EditCompanyType(CompanyTypeVM c)
 {
     return(_CompanyTypeDL.EditCompanyType(c));
 }
 public CompanyTypeVM AddCompanyType(CompanyTypeVM c)
 {
     return(_CompanyTypeDL.AddCompanyType(c));
 }
Beispiel #5
0
 public int DeleteCompanyType(CompanyTypeVM c)
 {
     return(_CompanyTypeBL.DeleteCompanyType(c.CompanyTypeId));
 }