Exemple #1
0
        public List <CompanyDatumEntity> GetCompanyData()
        {
            var companyData = new CompanyRootObjectEntity();

            try
            {
                companyData = AssignmentProxy.WebGet <CompanyRootObjectEntity>(string.Format("api/MyCompany/GetCompanyData"));
                log.Info("Company data fetched successfully to UI!!");
            }
            catch (Exception ex)
            {
                log.Error("GetCompanyData : Message" + ex.Message + "InnerException" + "" + ex.InnerException + "Source" + ex.Source);
            }
            return(companyData.Data.Data);
        }
Exemple #2
0
        public List <EmployeeHierarchy> GetPeopleData(string companyId)
        {
            var peopleData = new List <EmployeeHierarchy>();

            try
            {
                peopleData = AssignmentProxy.WebGet <List <EmployeeHierarchy> >(string.Format("api/MyCompany/GetPeopleData?companyId={0}", companyId));
                log.Info("People data fetched successfully to UI!!");
            }
            catch (Exception ex)
            {
                log.Error("GetPeopleData : Message" + ex.Message + "InnerException" + "" + ex.InnerException + "Source" + ex.Source);
            }
            return(peopleData);
        }
        public CompanyRootObjectEntity GetCompanyData()
        {
            var companyData = new CompanyRootObjectEntity();

            try
            {
                companyData = AssignmentProxy.WebGet <CompanyRootObjectEntity>(AssignmentConstants.BASE_SERVICE_URL);
                log.Info("Company data fetched from service successfully!!");
            }
            catch (Exception ex)
            {
                log.Error("GetCompanyData : Message" + ex.Message + "InnerException" + "" + ex.InnerException + "Source" + ex.Source);
            }

            return(companyData);
        }
Exemple #4
0
        public List <DepartmentDatumEntity> GetDepartmentData(string companyId)
        {
            var departmentData = new DepartmentRootObjectEntity();

            try
            {
                departmentData = AssignmentProxy.WebGet <DepartmentRootObjectEntity>(string.Format("api/MyCompany/GetDepartmentData?companyId={0}",
                                                                                                   companyId));
                log.Info("Department data fetched successfully to UI!!");
            }
            catch (Exception ex)
            {
                log.Error("GetDepartmentData : Message" + ex.Message + "InnerException" + "" + ex.InnerException + "Source" + ex.Source);
            }
            return(departmentData.Data.Data);
        }
        public DepartmentRootObjectEntity GetDepartmentData(string companyId)
        {
            var departmentData = new DepartmentRootObjectEntity();

            try
            {
                departmentData = AssignmentProxy.WebGet <DepartmentRootObjectEntity>(AssignmentConstants.BASE_SERVICE_URL + "/" + companyId +
                                                                                     AssignmentConstants.DEPARTMENT_SERVICE_URL);
                log.Info("Department data fetched from service successfully!!");
            }
            catch (Exception ex)
            {
                log.Error("GetDepartmentData : Message" + ex.Message + "InnerException" + "" + ex.InnerException + "Source" + ex.Source);
            }

            return(departmentData);
        }
        public List <EmployeeHierarchy> GetPeopleData(string companyId)
        {
            var peopleData      = new PeopleRootObjectEntity();
            var peopleHierarchy = new List <EmployeeHierarchy>();

            try
            {
                peopleData = AssignmentProxy.WebGet <PeopleRootObjectEntity>(AssignmentConstants.BASE_SERVICE_URL + "/" + companyId +
                                                                             AssignmentConstants.PEOPLE_SERVICE_URL);
                log.Info("People's data fetched from service successfully!!");

                peopleHierarchy = FindChildren(peopleData.Data.Data, null);
            }
            catch (Exception ex)
            {
                log.Error("GetPeopleData : Message" + ex.Message + "InnerException" + "" + ex.InnerException + "Source" + ex.Source);
            }

            return(peopleHierarchy);
        }