示例#1
0
        private void LoadCombos()
        {
            OperationResult objOperationResult = new OperationResult();
            OrganizationBL  oOrganizationBL    = new OrganizationBL();

            Utils.LoadDropDownList(ddlTipoEmpresa, "Value1", "Id", _objSystemParameterBL.GetSystemParameterForCombo(ref objOperationResult, 103), DropDownListAction.All);
        }
示例#2
0
        public IHttpActionResult SaveOrganization(MultiDataModel multi)
        {
            OrganizationBE data   = JsonConvert.DeserializeObject <OrganizationBE>(multi.String1);
            var            result = OrganizationBL.SaveOrganization(data, multi.Int1, multi.Int2);

            return(Ok(result));
        }
        public IHttpActionResult UpdateAdminUserForParent(JObject jsonResult)
        {
            var data     = "";
            var identity = MyAuthorizationServerProvider.AuthenticateUser();

            if (identity != null)
            {
                string Message = string.Empty;
                UserBO objUser = new UserBO();

                if (identity.Role == ConstantMessages.Roles.companyadmin || identity.Role == ConstantMessages.Roles.superadmin)
                {
                    int ChildUserID = 0;
                    if (jsonResult.SelectToken("UserID") != null && jsonResult.SelectToken("UserID").ToString().Trim() != "")
                    {
                        ChildUserID = (int)jsonResult.SelectToken("UserID");

                        if (ValidateUserDetails(identity.Role, identity.CompId, jsonResult, out Message, out objUser, "update", ChildUserID))
                        {
                            objUser.UserID = identity.UserID;
                            objUser.CompId = identity.CompId;
                            objUser.Role   = identity.Role;

                            var ds = OrganizationBL.CreateUpdateAdminUser(objUser, 2, ChildUserID);
                            if (ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["ReturnCode"].ToString() == "1")
                            {
                                data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                                data = Utility.Successful(data);
                            }
                            else if (ds.Tables[0].Rows.Count > 0)
                            {
                                data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                                data = Utility.Failed(data);
                            }
                            else
                            {
                                data = Utility.API_Status("0", ConstantMessages.WebServiceLog.GenericErrorMsg);
                            }
                        }
                        else
                        {
                            data = Utility.API_Status("2", Message);
                        }
                    }
                    else
                    {
                        data = Utility.API_Status("2", "Please provide UserID");
                    }
                }
                else
                {
                    data = Utility.API_Status("3", "You do not have access for this functionality");
                }
            }
            else
            {
                data = Utility.AuthenticationError();
            }
            return(new APIResult(Request, data));
        }
示例#4
0
        public ActionResult UserProfile(string Id)
        {
            if (Id != null)
            {
                OrganizationBL organizationBL = new OrganizationBL();
                var            organization   = organizationBL.OrganizationList();

                var collection = organization.Select(s => new
                {
                    Name = s.Name,
                    ID   = s.OrganizationID
                }).ToList();

                UserProfileBL userProfile = new UserProfileBL();
                var           countries   = userProfile.GetCountries().Select(s => new
                {
                    Text  = s.CoutnryName,
                    Value = s.CountryID
                }).ToList();

                ViewBag.UserId          = Id;
                ViewBag.Organizations   = new SelectList(collection, "ID", "Name");
                ViewBag.CountryDropDown = new SelectList(countries, "Value", "Text");
                return(View());
            }
            else
            {
                return(View("Index"));
            }
        }
示例#5
0
        private void LoadCombos()
        {
            OperationResult objOperationResult = new OperationResult();
            OrganizationBL  oOrganizationBL    = new OrganizationBL();
            ServiceBL       oServiceBL         = new ServiceBL();

            Utils.LoadDropDownList(ddlEmpresaCliente, "Value1", "Id", oOrganizationBL.GetAllOrganizations(ref objOperationResult), DropDownListAction.All);

            if (((ClientSession)Session["objClientSession"]).i_ProfesionId == (int)TipoProfesional.Evaluador)
            {
                //Llenar combo consultorio
                int Nodo  = 9;
                int RolId = int.Parse(((ClientSession)Session["objClientSession"]).i_RoleId.ToString());

                // Obtener permisos de cada examen de un rol especifico
                var componentProfile = oServiceBL.GetRoleNodeComponentProfileByRoleNodeId(Nodo, RolId);

                var _componentListTemp = oServiceBL.GetAllComponents(ref objOperationResult);

                Session["componentListTemp"] = _componentListTemp;
                var xxx = _componentListTemp.FindAll(p => p.Value4 != -1);

                List <KeyValueDTO> groupComponentList = xxx.GroupBy(x => x.Value4).Select(group => group.First()).ToList();

                groupComponentList.AddRange(_componentListTemp.ToList().FindAll(p => p.Value4 == -1));
                // Remover los componentes que no estan asignados al rol del usuario
                var results = groupComponentList.FindAll(f => componentProfile.Any(t => t.v_ComponentId == f.Value2));


                Utils.LoadDropDownList(ddlConsultorio, "Value1", "Value4", results, DropDownListAction.Select);
                ddlConsultorio.SelectedIndex = 1;
                Session["CategoriaId"]       = ddlConsultorio.SelectedValue.ToString();
                MostrarOcultarBotonesGrilla(ddlConsultorio.SelectedValue.ToString());
            }
            else if (((ClientSession)Session["objClientSession"]).i_ProfesionId == (int)TipoProfesional.Auditor)
            {
                //Llenar combo consultorio
                int Nodo  = 9;
                int RolId = int.Parse(((ClientSession)Session["objClientSession"]).i_RoleId.ToString());

                // Obtener permisos de cada examen de un rol especifico
                var componentProfile = oServiceBL.GetRoleNodeComponentProfileByRoleNodeId(Nodo, RolId);

                var _componentListTemp = oServiceBL.GetAllComponents(ref objOperationResult);

                Session["componentListTemp"] = _componentListTemp;
                var xxx = _componentListTemp.FindAll(p => p.Value4 != -1);

                List <KeyValueDTO> groupComponentList = xxx.GroupBy(x => x.Value4).Select(group => group.First()).ToList();

                groupComponentList.AddRange(_componentListTemp.ToList().FindAll(p => p.Value4 == -1));
                // Remover los componentes que no estan asignados al rol del usuario
                var results = groupComponentList.FindAll(f => componentProfile.Any(t => t.v_ComponentId == f.Value2));

                //ddlConsultorio.Enabled = false;
                Utils.LoadDropDownList(ddlConsultorio, "Value1", "Value4", results, DropDownListAction.All);
            }
        }
示例#6
0
        private void LoadComboBox()
        {
            OrganizationBL  oOrganizationBL    = new OrganizationBL();
            OperationResult objOperationResult = new OperationResult();
            var             _DocType           = _objDataHierarchyBL.GetDataHierarchyForCombo(ref objOperationResult, 106);

            Utils.LoadDropDownList(ddlDocType, "Description", "Id", _DocType, DropDownListAction.Select);
            Utils.LoadDropDownList(ddlSexType, "Value1", "Id", _objSystemParameterBL.GetSystemParameterForCombo(ref objOperationResult, 100), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlEmpresaCliente, "Value1", "Id", oOrganizationBL.GetAllOrganizations_(ref objOperationResult), DropDownListAction.Select);
        }
示例#7
0
/*
 *      public CustomerContactOrganizationEntity GetCustomerContactOrganization(int customerContactOrganizationID)
 *      {
 *          try
 *          {
 *              OrganizationBL organizationBL = new OrganizationBL();
 *
 *              DataSet ds = _customerContactOrganizationDA.GetCustomerContactOrganization(customerContactOrganizationID);
 *              if ((ds.Tables != null) && (ds.Tables.Contains(SII.HCD.Administrative.Entities.TableNames.CustomerContactOrganizationTable)) && (ds.Tables[SII.HCD.Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows.Count > 0))
 *              {
 *                  int organizationID = SIIConvert.ToInteger(ds.Tables[SII.HCD.Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows[0]["OrganizationID"].ToString(), 0);
 *                  int contactTypeID = SIIConvert.ToInteger(ds.Tables[SII.HCD.Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows[0]["ContactTypeID"].ToString(), 0);
 *
 *                  DataSet ds2;
 *
 #region Contact Types
 *                  ds2 = _contactTypeDA.GetContactTypeByID(contactTypeID);
 *                  if ((ds2 != null) && (ds2.Tables.Contains(SII.HCD.Administrative.Entities.TableNames.ContactTypeTable)))
 *                  {
 *                      DataTable dt = ds2.Tables[SII.HCD.Administrative.Entities.TableNames.ContactTypeTable].Copy();
 *                      ds.Tables.Add(dt);
 *                  }
 #endregion
 *
 #region Organization
 *                  if (organizationID <= 0)
 *                  {
 *                      throw new Exception(Properties.Resources.ERROR_CustomerContactOrganizationNotFound);
 *                  }
 *                  SII.HCD.BackOffice.Entities.OrganizationEntity myOrganization = organizationBL.GetOrganization(organizationID);
 #endregion
 *
 *                  CustomerContactOrganizationAdvancedAdapter customerContactOrganizationAdapter = new CustomerContactOrganizationAdvancedAdapter();
 *                  CustomerContactOrganizationEntity result = customerContactOrganizationAdapter.GetInfo(ds.Tables[SII.HCD.Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows[0], ds);
 *                  result.Organization = myOrganization;
 *                  LOPDLogger.Write(EntityNames.CustomerContactOrganizationEntityName, customerContactOrganizationID, ActionType.View);
 *                  return result;
 *              }
 *              else
 *                  return null;
 *          }
 *          catch (Exception ex)
 *          {
 *              if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.Service)) throw;
 *              return null;
 *          }
 *      }
 */
        public CustomerContactOrganizationEntity GetCustomerContactOrganization(int customerContactOrganizationID)
        {
            try
            {
                OrganizationBL organizationBL = new OrganizationBL();
                DataSet        ds             = _customerContactOrganizationDA.GetCustomerContactOrganization(customerContactOrganizationID);

                if ((ds.Tables != null) && (ds.Tables.Contains(Administrative.Entities.TableNames.CustomerContactOrganizationTable)) && (ds.Tables[Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows.Count > 0))
                {
                    int organizationID = SIIConvert.ToInteger(ds.Tables[Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows[0]["OrganizationID"].ToString(), 0);

                    #region Organization
                    if (organizationID <= 0)
                    {
                        throw new Exception(Properties.Resources.ERROR_CustomerContactOrganizationNotFound);
                    }

                    SII.HCD.BackOffice.Entities.OrganizationEntity myOrganization = null;
                    var HiloOrganization = System.Threading.Tasks.Task.Factory.StartNew(() => myOrganization = organizationBL.GetOrganization(organizationID));

                    DataSet ds2 = new DataSet();
                    foreach (DataTable oTabla in ds.Tables)
                    {
                        if (oTabla.Rows.Count > 0)
                        {
                            ds2.Tables.Add(oTabla.Copy());
                        }
                    }
                    #endregion

                    CustomerContactOrganizationAdvancedAdapter customerContactOrganizationAdapter = new CustomerContactOrganizationAdvancedAdapter();
                    CustomerContactOrganizationEntity          result = customerContactOrganizationAdapter.GetInfo(ds.Tables[Administrative.Entities.TableNames.CustomerContactOrganizationTable].Rows[0], ds2);
                    HiloOrganization.Wait();
                    result.Organization = myOrganization;

                    LOPDLogger.Write(EntityNames.CustomerContactOrganizationEntityName, customerContactOrganizationID, ActionType.View);
                    ds.Dispose();
                    ds2.Dispose();
                    return(result);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.Service))
                {
                    throw;
                }
                return(null);
            }
        }
        public IHttpActionResult CreateAdminUser(JObject jsonResult)
        {
            var data     = "";
            var identity = MyAuthorizationServerProvider.AuthenticateUser();

            if (identity != null)
            {
                string Message = string.Empty;
                UserBO objUser = new UserBO();

                if (identity.Role == ConstantMessages.Roles.superadmin)//identity.Role == ConstantMessages.Roles.companyadmin ||
                {
                    if (ValidateUserDetails(identity.Role, identity.CompId, jsonResult, out Message, out objUser, "create", Convert.ToInt32(identity.UserID)))
                    {
                        objUser.UserID = identity.UserID;
                        objUser.CompId = identity.CompId;
                        objUser.Role   = identity.Role;

                        var ds = OrganizationBL.CreateUpdateAdminUser(objUser, 1, 0);
                        if (ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["ReturnCode"].ToString() == "1")
                        {
                            data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                            data = Utility.Successful(data);

                            EmailHelper.GetEmailContent(Convert.ToInt32(ds.Tables[0].Rows[0]["InsertedID"]), 0, EmailHelper.Functionality.CREATE_ORG, "", "");
                        }
                        else if (ds.Tables[0].Rows.Count > 0)
                        {
                            data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                            data = Utility.Failed(data);
                        }
                        else
                        {
                            data = Utility.API_Status("0", "No data found");
                        }
                    }
                    else
                    {
                        data = Utility.API_Status("2", Message);
                    }
                }
                else
                {
                    data = Utility.API_Status("3", "You do not have access for this functionality");
                }
            }
            else
            {
                data = Utility.AuthenticationError();
            }
            return(new APIResult(Request, data));
        }
        public IHttpActionResult GetAdminUserDetailsForParent(JObject jsonResult)
        {
            var data     = "";
            var identity = MyAuthorizationServerProvider.AuthenticateUser();

            if (identity != null)
            {
                string Message = string.Empty;
                UserBO objUser = new UserBO();

                int ChildUserID = 0;
                if (identity.Role == ConstantMessages.Roles.superadmin)
                {
                    objUser.UserID = identity.UserID;
                    objUser.CompId = identity.CompId;
                    objUser.Role   = identity.Role;

                    if (jsonResult.SelectToken("UserID") != null && jsonResult.SelectToken("UserID").ToString().Trim() != "")
                    {
                        ChildUserID = (int)jsonResult.SelectToken("UserID");

                        var ds = OrganizationBL.GetAdminUserDetails(objUser, ChildUserID);
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                            data = Utility.Successful(data);
                        }
                        else
                        {
                            data = Utility.API_Status("0", "No data found");
                        }
                    }
                    else
                    {
                        data = Utility.API_Status("2", "Please provide UserID");
                    }
                }
                else
                {
                    data = Utility.API_Status("3", "You do not have access for this functionality");
                }
            }
            else
            {
                data = Utility.AuthenticationError();
            }
            return(new APIResult(Request, data));
        }
        public IHttpActionResult GetCountry(JObject requestParams)
        {
            var data = "";
            var ds   = OrganizationBL.GetCountry(0);

            if (ds.Tables.Count > 0)
            {
                data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                data = Utility.Successful(data);
            }
            else
            {
                data = Utility.API_Status("2", "No data found");
            }

            return(new APIResult(Request, data));
        }
        public IHttpActionResult GetAdminUserDetails(JObject requestParams)
        {
            var data     = "";
            var identity = MyAuthorizationServerProvider.AuthenticateUser();

            if (identity != null)
            {
                string Message = string.Empty;
                UserBO objUser = new UserBO();

                int ChildUserID = 0;
                if (identity.Role == ConstantMessages.Roles.companyadmin)
                {
                    objUser.UserID = identity.UserID;
                    objUser.CompId = identity.CompId;
                    objUser.Role   = identity.Role;

                    ChildUserID = Convert.ToInt32(identity.UserID);
                    var ds = OrganizationBL.GetAdminUserDetails(objUser, ChildUserID);
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                        data = Utility.Successful(data);
                    }
                    else
                    {
                        data = Utility.API_Status("0", "No data found");
                    }
                }
                else
                {
                    data = Utility.API_Status("3", "You do not have access for this functionality");
                }
            }
            else
            {
                data = Utility.AuthenticationError();
            }
            return(new APIResult(Request, data));
        }
示例#12
0
 private void renderGridViewHelper(string id, string organizationName = "", string isContracted = "", string opeCode = "", string branchCode = "")
 {
     using (OrganizationBL Organization = new OrganizationBL())
     {
         Nullable <bool> bContracted = new bool();
         bContracted = null;
         if (!String.IsNullOrEmpty(isContracted))
         {
             //if user selected a value than update bool otherwise let it go as null
             if (isContracted.ToLower().IndexOf("please select") < 0)
             {
                 bContracted = (isContracted == "True") ? true : false;
             }
         }
         ListResults  = Organization.GetOrganizationsBySearchParms(id, bContracted, organizationName, opeCode, branchCode).ToList();
         iRecordCount = ListResults.Count();
         if (ListResults.Count() > 0)
         {
             if (iRecordCount == 1)
             {
                 OrganizationGridView.DataSource = ListResults;
                 OrganizationGridView.DataBind();
                 OrganizationGridView.SelectedIndex = 0; //select the only existing row
                 this.OrganizationRow_Click();
             }
             else
             {
                 _sortDirection = "ASC";
                 sortExpression = "OrganizationName";
                 this.SortHelper("OrganizationName", 0);
             }
         }
         else
         {
             ShowMessage(sMSG_NOORGANIZATIONFOUND);
         }
     }
 }
        public IHttpActionResult GetAdminUsers()
        {
            var data     = "";
            var identity = MyAuthorizationServerProvider.AuthenticateUser();

            if (identity != null)
            {
                UserBO objUser = new UserBO();

                if (identity.Role == ConstantMessages.Roles.companyadmin || identity.Role == ConstantMessages.Roles.superadmin)
                {
                    objUser.UserID = identity.UserID;
                    objUser.CompId = identity.CompId;
                    objUser.Role   = identity.Role;

                    var ds = OrganizationBL.GetAdminUsers(objUser);
                    if (ds.Tables.Count > 0)
                    {
                        data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                        data = Utility.Successful(data);
                    }
                    else
                    {
                        data = Utility.API_Status("2", "No user found");
                    }
                }
                else
                {
                    data = Utility.API_Status("3", "You do not have access for this functionality");
                }
            }
            else
            {
                data = Utility.AuthenticationError();
            }
            return(new APIResult(Request, data));
        }
        public IHttpActionResult BindRole(JObject requestParams)
        {
            var data     = "";
            var identity = MyAuthorizationServerProvider.AuthenticateUser();

            if (identity != null)
            {
                var ds = OrganizationBL.GetRole(identity.Role, identity.RoleID);
                if (ds.Tables.Count > 0)
                {
                    data = Utility.ConvertDataSetToJSONString(ds.Tables[0]);
                    data = Utility.Successful(data);
                }
                else
                {
                    data = Utility.API_Status("2", "No data found");
                }
            }
            else
            {
                data = Utility.AuthenticationError();
            }
            return(new APIResult(Request, data));
        }
        public ActionResult index()
        {
            OrganizationBL test = new OrganizationBL();

            return(View(test.OrganizationList()));
        }
示例#16
0
        public IHttpActionResult SearchOrganizations(string value)
        {
            var result = OrganizationBL.SearchOrganizations(value);

            return(Ok(result));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lbltodos.Text = "Seleccionar Todos";
            List <ServiceComponentList> serviceComponents  = new List <ServiceComponentList>();
            OrganizationBL              oOrganizationBL    = new OrganizationBL();
            OperationResult             objOperationResult = new OperationResult();
            List <ServiceComponentList> ListaFinalOrdena   = new List <ServiceComponentList>();
            List <ServiceComponentList> ListaOrdenada      = new List <ServiceComponentList>();


            _serviceId = Request.QueryString["_serviceId"].ToString();
            _pacientId = Request.QueryString["_pacientId"].ToString();
            _customerOrganizationName = Request.QueryString["_customerOrganizationName"].ToString();
            _personFullName           = Request.QueryString["_personFullName"].ToString();
            _flagPantalla             = int.Parse(Request.QueryString["flagPantalla"].ToString());
            _EmpresaClienteId         = Request.QueryString["_EmpresaClienteId"].ToString();
            _Eso = int.Parse(Request.QueryString["Eso"].ToString());

            //Trae todos los examenes o componentes que el trabajador var a pasar
            serviceComponents = _serviceBL.GetServiceComponentsForManagementReport(_serviceId);

            // Agregar Reportes en duro(pdf)
            #region Reportes
            serviceComponents.Add(new ServiceComponentList {
                Orden = 1, v_ComponentName = "CONSENTIMIENTO INFORMADO ", v_ComponentId = Constants.CONSENTIMIENTO_INFORMADO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 2, v_ComponentName = "CERTIFICADO APTITUD SIN Diagnósticos ", v_ComponentId = Constants.INFORME_CERTIFICADO_APTITUD_SIN_DX
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 2, v_ComponentName = "CERTIFICADO APTITUD EMPRESARIAL ", v_ComponentId = Constants.INFORME_CERTIFICADO_APTITUD_EMPRESARIAL
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 2, v_ComponentName = "CERTIFICADO APTITUD", v_ComponentId = Constants.INFORME_CERTIFICADO_APTITUD
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 3, v_ComponentName = "FICHA MÉDICA DEL TRABAJADOR 1", v_ComponentId = Constants.INFORME_FICHA_MEDICA_TRABAJADOR
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 4, v_ComponentName = "FICHA MÉDICA DEL TRABAJADOR 2", v_ComponentId = Constants.INFORME_FICHA_MEDICA_TRABAJADOR_2
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 4, v_ComponentName = "FICHA MÉDICA DEL TRABAJADOR 3", v_ComponentId = Constants.INFORME_FICHA_MEDICA_TRABAJADOR_3
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 27, v_ComponentName = "INFORME DE LABORATORIO", v_ComponentId = Constants.INFORME_LABORATORIO_CLINICO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANEXO 16 Coimolache", v_ComponentId = Constants.INFORME_ANEXO_16_COIMOLACHE
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANEXO 16 Yanacocha", v_ComponentId = Constants.INFORME_ANEXO_16_YANACOCHA
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANEXO 16 Pacasmayo", v_ComponentId = Constants.INFORME_ANEXO_16_PACASMAYO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANEXO 16 MINSUR SAN RAFAEL", v_ComponentId = Constants.INFORME_ANEXO_16_MINSURSANRAFAEL
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANEXO 16 Shahuindo", v_ComponentId = Constants.INFORME_ANEXO_16_SHAHUINDO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANEXO 16 Gold Field", v_ComponentId = Constants.INFORME_ANEXO_16_GOLD_FIELD
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 6, v_ComponentName = "ANTECEDENTE PATOLOGICO", v_ComponentId = Constants.INFORME_ANTECEDENTE_PATOLOGICO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 48, v_ComponentName = "DECLARACION CI", v_ComponentId = Constants.INFORME_DECLARACION_CI
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 51, v_ComponentName = "INFORME ESPIROMETRIA", v_ComponentId = Constants.INFORME_ESPIROMETRIA
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 52, v_ComponentName = "APTITUD YANACOCHA", v_ComponentId = Constants.APTITUD_YANACOCHA
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 53, v_ComponentName = "INFORME MEDICO OCUPACIONAL COSAPI", v_ComponentId = Constants.INFORME_MEDICO_OCUPACIONAL_COSAPI
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 54, v_ComponentName = "CERTIFICADO DE APTITUD MEDICO OCUPACIONAL COSAPI", v_ComponentId = Constants.CERTIFICADO_APTITUD_MEDICO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 72, v_ComponentName = "INFORME MEDICO SALUD OCUPACIONAL - EXAMEN ANUAL", v_ComponentId = Constants.INFORME_MEDICO_SALUD_OCUPACIONAL_EXAMEN_MEDICO_ANUAL
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 73, v_ComponentName = "ANEXO 8 INFORME MEDICO OCUPASIONAL", v_ComponentId = Constants.ANEXO_8_INFORME_MEDICO_OCUPACIONAL
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 74, v_ComponentName = "INFORME RESULTADOS EVALUACION MEDICA - AUTORIZACION", v_ComponentId = Constants.INFORME_RESULTADOS_EVALUACION_MEDICA
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 75, v_ComponentName = "AGLUTINACIONES KOH SECRECION CIELO AZUL", v_ComponentId = Constants.AGLUTINACIONES_KOH_SECRECION
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 76, v_ComponentName = "PARASITOLOGICO COPROCULTIVO CIELO AZUL", v_ComponentId = Constants.PARASITOLOGICO_COPROCULTIVO_CIELO_AZUL
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 77, v_ComponentName = "MARCOBRE PASE MÉDICO", v_ComponentId = Constants.MARCOBRE_PASE_MEDICO
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 77, v_ComponentName = "DECLARACIÓN JURADA", v_ComponentId = Constants.DECLARACION_JURADA
            });

            serviceComponents.Add(new ServiceComponentList {
                Orden = 78, v_ComponentName = "ENTREGA DE EXAMEN MEDICO OCUPACIONAL", v_ComponentId = Constants.ENTREGA_DE_XAMEN_MEDICO_OCUPACIONAL
            });

            serviceComponents.Add(new ServiceComponentList {
                Orden = 79, v_ComponentName = "EV. MED. SAN MARTIN - INFORME RESULTADOS", v_ComponentId = Constants.EVALUACION_MEDICO_SAN_MARTIN_INFORME
            });

            serviceComponents.Add(new ServiceComponentList {
                Orden = 80, v_ComponentName = "DECLARACION JURADA EMPO YANACOCHA", v_ComponentId = Constants.Declaracion_Jurada_EMPO_YANACOCHA
            });
            serviceComponents.Add(new ServiceComponentList {
                Orden = 81, v_ComponentName = "DECLARACION JURADA EMO SECURITAS", v_ComponentId = Constants.Declaracion_Jurada_EMO_SECURITAS
            });

            #endregion



            //?????
            ListaOrdenada = ConsolidadoReportes.OrderBy(p => p.Orden).ToList();

            //Obtiene la configuración de orden de reportes de la empresa seleccionada
            var ListaOrdenReportes = oOrganizationBL.GetOrdenReportes(ref objOperationResult, _EmpresaClienteId);

            if (ListaOrdenReportes.Count > 0)
            {
                ListaOrdenada = new List <ServiceComponentList>();
                ServiceComponentList oServiceComponentList = null;

                foreach (var item in ListaOrdenReportes)
                {
                    oServiceComponentList = new ServiceComponentList();
                    oServiceComponentList.v_ComponentName = item.v_NombreReporte;
                    oServiceComponentList.v_ComponentId   = item.v_ComponenteId + "|" + item.i_NombreCrystalId;
                    ListaOrdenada.Add(oServiceComponentList);
                }

                foreach (var item in ListaOrdenada)
                {
                    var array = item.v_ComponentId.Split('|');
                    foreach (var item1 in serviceComponents)
                    {
                        if (array[0].ToString() == item1.v_ComponentId)
                        {
                            ListaFinalOrdena.Add(item);
                        }
                    }
                }

                chkregistros.DataTextField  = "v_ComponentName";
                chkregistros.DataValueField = "v_ComponentId";
                chkregistros.DataSource     = ListaFinalOrdena;
                chkregistros.DataBind();
            }

            else
            {
                chkregistros.DataTextField  = "v_ComponentName";
                chkregistros.DataValueField = "v_ComponentId";
                chkregistros.DataSource     = serviceComponents;
                chkregistros.DataBind();
            }
        }