public string GetCompanies()
        {
            var    objCompany = new ServiceCompanies();
            string JSONresult;

            JSONresult = JsonConvert.SerializeObject(objCompany.GetCompaniesDataTable(), Formatting.Indented);
            return(JSONresult);
        }
        public Companies ManageCompanies(Companies comp)
        {
            var objCompany = new ServiceCompanies();

            switch (comp.Method)
            {
            case "Insert":
                objCompany.Insert(comp);
                break;

            case "Update":
                objCompany.Update(comp);
                break;

            case "Delete":
                objCompany.Delete(comp);
                break;

            case "CheckCompanyNumber":
                comp.isBool = objCompany.CheckCompanyNumber(comp);
                break;

            case "GetCompanies":
                comp.stringData = objCompany.GetCompanies();
                break;

            case "GetAllCustomersToDropDown":
                comp.list = objCompany.GetAllCustomersToDropDown();
                break;

            case "GetCompaniesDataTable":
                comp.EmployeeTable = objCompany.GetCompaniesDataTable();
                break;

            case "GetCompaniesDataSet":
                comp.EmployeeDataSet = objCompany.GetCompaniesDataSet();
                break;
            }
            return(comp);
        }