Exemplo n.º 1
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);
        }