public ServiceToCompany ManageServiceToCompany(ServiceToCompany serviceToCompany)
        {
            var objServiceToCompany = new ServiceToCompanyService();

            switch (serviceToCompany.Method)
            {
            case "Insert":
                objServiceToCompany.Insert(serviceToCompany);
                break;

            case "Delete":
                objServiceToCompany.Delete(serviceToCompany);
                break;

            case "Update":
                objServiceToCompany.Update(serviceToCompany);
                break;

            case "GetAll":
                serviceToCompany.DataServiceToCompany = objServiceToCompany.GetAll();
                break;

            case "GetAllDataSet":
                serviceToCompany.ServiceToCompanyDataSet = objServiceToCompany.GetAllServiceToCompanyDataSet();
                break;

            case "CheckToAdd":
                serviceToCompany.isBool = objServiceToCompany.CheckToAdd(serviceToCompany);
                break;
            }
            return(serviceToCompany);
        }
Ejemplo n.º 2
0
 public bool CheckToAdd(ServiceToCompany serviceToCompany)
 {
     return(ServiceToCompaniesServices.Instance.CheckToAddServiceToCompanies(serviceToCompany.idService, serviceToCompany.idCompany));
 }
Ejemplo n.º 3
0
 public void Delete(ServiceToCompany serviceToCompany)
 {
     ServiceToCompaniesServices.Instance.DeleteServiceToCompanies(serviceToCompany.idService, serviceToCompany.idCompany);
 }
Ejemplo n.º 4
0
 public void Update(ServiceToCompany serviceToCompany)
 {
     ServiceToCompaniesServices.Instance.UpdateServiceToCompanies(serviceToCompany.Startdate, serviceToCompany.Enddate, serviceToCompany.Paid, serviceToCompany.Price, serviceToCompany.priceCost, serviceToCompany.idCompany, serviceToCompany.idService);
 }