Esempio n. 1
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);
            }
        }
Esempio n. 2
0
        private void LoadComboBox()
        {
            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);
        }
Esempio n. 3
0
        private void LoadComboBox()
        {
            OperationResult objOperationResult = new OperationResult();

            Utils.LoadDropDownList(ddlTipoESO, "Value1", "Id", _objSystemParameterBL.GetSystemParameterForCombo(ref objOperationResult, 118), DropDownListAction.All);

            Utils.LoadDropDownList(ddlEmpresa, "Value1", "Id", oOrganizationBL.GetAllOrganizations(ref objOperationResult), DropDownListAction.All);
            var o = _objProtocolBL.DevolverProtocolosPorEmpresaOnly("-1");

            Utils.LoadDropDownList(ddlProtocolo, "Value1", "Id", o, DropDownListAction.Select);
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OperationResult objOperationResult = new OperationResult();
                btnAgregar.OnClientClick            = winEdit.GetSaveStateReference(hfRefresh.ClientID) + winEdit.GetShowReference("FRM052.aspx");
                btnDescargarPlantilla.OnClientClick = Window1.GetSaveStateReference(hfRefresh.ClientID) + Window1.GetShowReference("FRM050B.aspx");
                dpFechaInicio.SelectedDate          = DateTime.Now;

                Utils.LoadDropDownList(ddlEmpresaCliente, "Value1", "Id", oOrganizationBL.GetAllOrganizations(ref objOperationResult), DropDownListAction.All);
                var o = oProtocolBL.DevolverProtocolosPorEmpresaOnly("-1");
                Utils.LoadDropDownList(ddlProtocoloId, "Value1", "Id", o, DropDownListAction.Select);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OperationResult objOperationResult  = new OperationResult();
                DataHierarchyBL _objDataHierarchyBL = new DataHierarchyBL();
                dpFechaInicio.SelectedDate = DateTime.Now.AddDays(-1); //DateTime.Parse("25/07/2014");
                dpFechaFin.SelectedDate    = DateTime.Now;             // DateTime.Parse("25/07/2014");

                var TipoUsuario = ((ClientSession)Session["objClientSession"]).i_SystemUserTypeId;

                if (TipoUsuario == 1)
                {
                    Utils.LoadDropDownList(ddlCustomerOrganization, "Value1", "Id", oOrganizationBL.GetAllOrganizations(ref objOperationResult), DropDownListAction.All);
                }
                else
                {
                    var RolId = ((ClientSession)Session["objClientSession"]).i_RoleId;
                    if (RolId == 1)
                    {
                        var clientOrganization = oOrganizationBL.GetJoinOrganizationAndLocationALL(ref objOperationResult);
                        Utils.LoadDropDownList(ddlCustomerOrganization, "Value1", "Id", clientOrganization, DropDownListAction.Select);
                    }
                    else
                    {
                        var clientOrganization = oOrganizationBL.GetJoinOrganizationAndLocation(ref objOperationResult, ((ClientSession)Session["objClientSession"]).i_SystemUserId);
                        Utils.LoadDropDownList(ddlCustomerOrganization, "Value1", "Id", clientOrganization, DropDownListAction.Select);
                    }
                }


                Utils.LoadDropDownList(ddlProtocolo, "Value1", "Id", oOrganizationBL.GetProtocolsByOrganizationForCombo(ref objOperationResult, "-1", "-1", null), DropDownListAction.Select);
                Utils.LoadDropDownList(ddlConsultorio, "Description", "Description2", _objDataHierarchyBL.GetDataHierarchyForCombo(ref objOperationResult, 124), DropDownListAction.Select);
                Utils.LoadDropDownList(ddlGrupoEtario, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 224, null), DropDownListAction.Select);

                Utils.LoadDropDownList(ddlGESO, "Value1", "Id", BLL.Utils.GetGESO(ref objOperationResult, null), DropDownListAction.Select);
                Utils.LoadDropDownList(ddlTipoESO, "Value1", "Id", _objSystemParameterBL.GetSystemParameterForCombo(ref objOperationResult, 118), DropDownListAction.Select);
                Utils.LoadDropDownList(ddlGenero, "Value1", "Id", _objSystemParameterBL.GetSystemParameterForCombo(ref objOperationResult, 100), DropDownListAction.Select);
                List <Sigesoft.Node.WinClient.BE.DiagnosticsByAgeGroup> l = new List <Sigesoft.Node.WinClient.BE.DiagnosticsByAgeGroup>();
            }
        }