private void btnOK_Click(object sender, EventArgs e)
        {
            SystemParameterBL _objProxy          = new SystemParameterBL();
            OperationResult   objOperationResult = new OperationResult();

            systemparameterDto objEntity = new systemparameterDto();

            // Populate the entity
            objEntity.i_GroupId = 146;

            objEntity.i_ParameterId = _objProxy.GetSystemParameterMaxParameterId(146);
            ParameterId             = objEntity.i_ParameterId;
            objEntity.v_Value1      = txtPeligro.Text;
            EppName                       = txtPeligro.Text;
            objEntity.i_Sort              = null;
            objEntity.v_Value2            = "";
            objEntity.v_Field             = "";
            objEntity.i_ParentParameterId = 16;


            // Save the data
            _objProxy.AddSystemParameter(ref objOperationResult, objEntity, Globals.ClientSession.GetAsList());

            this.Close();
        }
        private void frmSeleccionarNombreCrystal_Load(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();

            SystemParameterBL oSystemParameterBL = new SystemParameterBL();

            //Obtner Id del Padre , grupo 123
            var o = oSystemParameterBL.ObtenerIdPadreDataHierarchy(ref objOperationResult, _ComponenteId);


            Utils.LoadDropDownList(cboNombreReporte, "Value1", "Id", BLL.Utils.GetDataHierarchyByParentIdForCombo(ref objOperationResult, 123, o.i_ItemId, ""), DropDownListAction.Select);
        }
        private void LoadTreeEPP(int pintItemId)
        {
            OperationResult            objOperationResult     = new OperationResult();
            SystemParameterBL          objSystemParameterBL   = new SystemParameterBL();
            List <SystemParameterList> objSystemParameterList = new List <SystemParameterList>();

            treeViewEPP.Nodes.Clear();
            TreeNode nodePrimary = null;

            objSystemParameterList = objSystemParameterBL.GetSystemParametersPagedAndFiltered(ref objOperationResult, 0, null, "", "i_GroupId==" + pintItemId, 0);

            foreach (var item in objSystemParameterList)
            {
                switch (item.i_ParentParameterId.ToString())
                {
                    #region Add Main Nodes
                case "-1":     // 1. Add Main nodes:
                    nodePrimary      = new TreeNode();
                    nodePrimary.Text = item.v_Value1;
                    nodePrimary.Name = item.i_ParameterId.ToString();
                    treeViewEPP.Nodes.Add(nodePrimary);
                    break;

                    #endregion
                default:     // 2. Add Option nodes:
                    foreach (TreeNode tnitem in treeViewEPP.Nodes)
                    {
                        TreeNode tnOption = SelectChildrenRecursive(tnitem, item.i_ParentParameterId.ToString());

                        if (tnOption != null)
                        {
                            TreeNode childNode = new TreeNode();
                            childNode.Text = item.v_Value1;
                            childNode.Name = item.i_ParameterId.ToString();
                            tnOption.Nodes.Add(childNode);
                            break;
                        }
                    }
                    break;
                }
            }
            treeViewEPP.ExpandAll();
        }
        private void frmReporteCargoFactura_Load(object sender, EventArgs e)
        {
            ReporteCargoFactura        oReporteCargoFactura = new ReporteCargoFactura();
            List <ReporteCargoFactura> Lista = new List <ReporteCargoFactura>();
            OperationResult            objOperationResult = new OperationResult();
            SystemParameterBL          oSystemParameterBL = new SystemParameterBL();

            var rp            = new Reports.crCargoFactura();
            var MedicalCenter = new ServiceBL().GetInfoMedicalCenterSede();

            var Parametro = BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 259, null);

            oReporteCargoFactura.LogoEmpresaPropietaria        = MedicalCenter.b_Image;
            oReporteCargoFactura.RazonSocialEmpresaPropietaria = MedicalCenter.v_Name;
            oReporteCargoFactura.FechaActual               = DateTime.Now.ToString("dd/MMMM/yyyy");
            oReporteCargoFactura.SedeEmpresaPropietaria    = MedicalCenter.v_Sede;
            oReporteCargoFactura.RazonSocialEmpresaCliente = Empresa;
            oReporteCargoFactura.Mes                       = Mes;
            oReporteCargoFactura.Fecha                     = Fecha;
            oReporteCargoFactura.NroFactura                = NroFactura;
            oReporteCargoFactura.NroTrabajadores           = NroTrabajadores;
            oReporteCargoFactura.EmailRepresentanteLegalEP = MedicalCenter.v_Mail;
            oReporteCargoFactura.EmailContactoEP           = MedicalCenter.v_EmailContacto;
            oReporteCargoFactura.Parametro                 = Parametro[0].Value1 + " - " + Parametro[0].Value2;
            oReporteCargoFactura.AnioMes                   = DateTime.Now.ToString("yyyy/MM");
            oSystemParameterBL.ActualizarValorParametro(256, int.Parse(Parametro[0].Value2.ToString()));

            Lista.Add(oReporteCargoFactura);

            DataSet   ds = new DataSet();
            DataTable dt = Sigesoft.Node.WinClient.BLL.Utils.ConvertToDatatable(Lista);

            dt.TableName = "dtCargoFactura";
            ds.Tables.Add(dt);
            rp.SetDataSource(ds);

            crystalReportViewer1.ReportSource = rp;
            crystalReportViewer1.Show();
        }
Exemple #5
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (cboMedico.SelectedValue.ToString() == "-1")
            {
                MessageBox.Show("Seleccionar un médico tratante", " ¡ VALIDACIÓN!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            if (_auxiliaryExams == null)
            {
                _auxiliaryExams = new List <ServiceComponentList>();
            }

            // Save ListView / recorrer la lista de examenes seleccionados
            foreach (ListViewItem item in lvExamenesSeleccionados.Items)
            {
                var fields           = item.SubItems;
                var ComponentId      = fields[1].Text.Split('|');
                var NombreComponente = fields[0].Text.Split('|');



                MedicalExamBL objComponentBL  = new MedicalExamBL();
                componentDto  objComponentDto = new componentDto();

                OperationResult objOperationResult = new OperationResult();
                foreach (var scid in ComponentId)
                {
                    var conCargoA = -1;
                    if (_type == "Hospi")
                    {
                        var oFrmType = new frmType();
                        oFrmType.ShowDialog();

                        if (oFrmType._conCargoA == "Médico")
                        {
                            conCargoA = 1;
                        }
                        else
                        {
                            conCargoA = 2;
                        }
                    }

                    objComponentDto = objComponentBL.GetMedicalExam(ref objOperationResult, scid);
                    SystemParameterBL oSp = new SystemParameterBL();
                    var o = oSp.GetSystemParameter(ref objOperationResult, 116, int.Parse(objComponentDto.i_CategoryId.ToString()));
                    //Lógica de Aumento de Precio Base

                    var porcentajes = o.v_Field.Split('-');

                    float p1 = porcentajes[0] == null ? 0 : float.Parse(porcentajes[0].ToString());

                    float p2 = porcentajes[1] == null ? 0 : float.Parse(porcentajes[1].ToString());

                    float pb          = objComponentDto.r_BasePrice.Value;
                    var   precio_base = pb + (pb * p1 / 100) + (pb * p2 / 100);
                    //FormPrecioComponente frm = new FormPrecioComponente("", "", "");
                    //frmConfigSeguros frm1 = new frmConfigSeguros(0, 0, 0, "", "");
                    ServiceComponentList auxiliaryExam          = new ServiceComponentList();
                    servicecomponentDto  objServiceComponentDto = new servicecomponentDto();
                    ServiceBL            _ObjServiceBL          = new ServiceBL();
                    TicketBL             oTicketBL = new TicketBL();
                    if (_modo == "ASEGU")
                    {
                        #region OLD Logica antigua
                        #region Conexion SAM
                        //ConexionSigesoft conectasam = new ConexionSigesoft();
                        //conectasam.opensigesoft();
                        #endregion
                        #region Query
                        //var componente = NombreComponente[0].ToString();
                        //var cadena1 = "select PL.i_EsDeducible, PL.i_EsCoaseguro, PL.d_Importe, PL.d_ImporteCo from [dbo].[plan] PL where PL.v_IdUnidadProductiva='" + lineId + "' and PL.v_ProtocoloId='" + _protocolId + "' ";
                        //SqlCommand comando = new SqlCommand(cadena1, connection: conectasam.conectarsigesoft);
                        //SqlDataReader lector = comando.ExecuteReader();
                        //int deducible = 0;
                        //int coaseguro = 0;
                        //decimal? importe = 0;
                        //decimal? importeCo = 0;
                        //while (lector.Read())
                        //{
                        //    deducible = int.Parse(lector.GetValue(0).ToString()); coaseguro = int.Parse(lector.GetValue(1).ToString()); importe = decimal.Parse(lector.GetValue(2).ToString()); importeCo = decimal.Parse(lector.GetValue(3).ToString());
                        //}
                        //lector.Close();
                        //string factores = ""; string aseguradoraName = ""; string organizationId = "";
                        //var factorGlobal = "";
                        //var cadena2 = "select PR.r_PriceFactor, OO.v_Name, PR.v_CustomerOrganizationId from Organization OO inner join protocol PR On PR.v_AseguradoraOrganizationId = OO.v_OrganizationId where PR.v_ProtocolId ='" + _protocolId + "'";
                        //comando = new SqlCommand(cadena2, connection: conectasam.conectarsigesoft);
                        //lector = comando.ExecuteReader();
                        //while (lector.Read())
                        //{
                        //    factores = lector.GetValue(0).ToString();
                        //    var factorArray = factores.Split('|');// factores[0].ToString().Split('|');
                        //    factorGlobal = factorArray[0];
                        //    aseguradoraName = lector.GetValue(1).ToString();
                        //    organizationId = lector.GetValue(2).ToString();
                        //}
                        //lector.Close();
                        //string empresa = "";
                        //var cadena3 = "select v_Name from Organization OO  where OO.v_OrganizationId ='" + organizationId + "'";
                        //comando = new SqlCommand(cadena3, connection: conectasam.conectarsigesoft);
                        //lector = comando.ExecuteReader();
                        //while (lector.Read())
                        //{
                        //    empresa = lector.GetValue(0).ToString();
                        //}
                        //lector.Close();
                        #endregion
                        #region Lógica PARA SABER SI ES DEDUCIBLE O COASEGURO
                        //if (rbNuevaConsulta.Checked)// QUIERE DECIR QUE ES UNA NUEVA ATENCION Y DEBE SER CONSIDERADO COMO DEDUCIBLE SIN FACTOR
                        //{
                        //    factorGlobal = "1";
                        //    coaseguro = 0;
                        //    importeCo = null;
                        //}
                        //else if (rbAdicional.Checked) // QUIERE DECIR QUE ES UN COMPONENTE ADICIONAL Y DEBE SER CONSIDERADO COMO COASEGURO CON FACTOR
                        //{
                        //    deducible = 0;
                        //    importe = null;
                        //}
                        #endregion
                        #region Formulario
                        //precio_base = (float)objComponentDto.r_PriceSegus;// se cambia el precio inicial por el SEGUS
                        //frmConfigSeguros frm1 = new frmConfigSeguros(deducible, coaseguro, importe, precio_base.ToString(), factorGlobal, importeCo);
                        //frm1.Text = aseguradoraName + " / " + empresa;
                        //frm1.ShowDialog();
                        #endregion
                        #endregion

                        #region Obteniendo los campos de la BD
                        ConexionSigesoft conectasam = new ConexionSigesoft();
                        conectasam.opensigesoft();
                        var           componente      = NombreComponente[0].ToString();
                        var           cadena          = "select i_KindOfService from  component where v_ComponentId='" + objComponentDto.v_ComponentId + "'";
                        SqlCommand    comando         = new SqlCommand(cadena, connection: conectasam.conectarsigesoft);
                        SqlDataReader lector          = comando.ExecuteReader();
                        int           i_KindOfService = 0;
                        while (lector.Read())
                        {
                            try
                            {
                                i_KindOfService = int.Parse(lector.GetValue(0).ToString());
                            }
                            catch (Exception exception)
                            {
                                MessageBox.Show(exception.Message, " ¡ ERROR !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                return;
                            }
                        }
                        lector.Close();
                        var cadena1 = "select PL.i_PlanId, PL.i_EsCoaseguro, PL.d_Importe, PL.d_ImporteCo " +
                                      "from [dbo].[plan] PL " +
                                      "where PL.v_IdUnidadProductiva='" + lineId + "' and PL.v_ProtocoloId='" + _protocolId + "' ";
                        comando = new SqlCommand(cadena1, connection: conectasam.conectarsigesoft);
                        lector  = comando.ExecuteReader();
                        string PlanId = ""; int coaseguro = 0; decimal?importe = 0; decimal?importeCo = 0;
                        while (lector.Read())
                        {
                            try
                            {
                                PlanId    = lector.GetValue(0).ToString();
                                coaseguro = int.Parse(lector.GetValue(1).ToString());
                                importe   = decimal.Parse(lector.GetValue(2).ToString());
                                importeCo = decimal.Parse(lector.GetValue(3).ToString());
                            }
                            catch (Exception exception)
                            {
                                MessageBox.Show(exception.Message, " ¡ ERROR !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                return;
                            }
                        }
                        lector.Close();
                        string factores = ""; string aseguradoraName = ""; string organizationId = ""; var factorGlobal = "";
                        var    cadena2 = "select PR.r_PriceFactor, OO.v_Name, PR.v_CustomerOrganizationId " +
                                         "from Organization OO " +
                                         "inner join protocol PR On PR.v_AseguradoraOrganizationId = OO.v_OrganizationId " +
                                         "where PR.v_ProtocolId ='" + _protocolId + "'";
                        comando = new SqlCommand(cadena2, connection: conectasam.conectarsigesoft);
                        lector  = comando.ExecuteReader();
                        while (lector.Read())
                        {
                            try
                            {
                                factores = lector.GetValue(0).ToString();
                                var factorArray = factores.Split('|');// factores[0].ToString().Split('|');
                                factorGlobal    = factorArray[0];
                                aseguradoraName = lector.GetValue(1).ToString();
                                organizationId  = lector.GetValue(2).ToString();
                            }
                            catch (Exception exception)
                            {
                                MessageBox.Show(exception.Message, " ¡ ERROR !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                return;
                            }
                        }
                        lector.Close();
                        #endregion

                        #region Según el tipo de componente se hace el calculo
                        switch (i_KindOfService)
                        {
                        //CLINICA
                        case 1:
                        {
                            if (objComponentDto.r_PriceSegus != 0)
                            {
                                objServiceComponentDto.r_Price            = objComponentDto.r_PriceSegus;
                                objServiceComponentDto.d_SaldoPaciente    = importe;
                                objServiceComponentDto.d_SaldoAseguradora = (decimal)objComponentDto.r_PriceSegus - importe;
                            }
                            else
                            {
                                frmConfigSeguros frm1 = new frmConfigSeguros("1");
                                frm1.ShowDialog();
                                objServiceComponentDto.r_Price            = (float)frm1.nuevoPrecio;
                                objServiceComponentDto.d_SaldoPaciente    = importe;
                                objServiceComponentDto.d_SaldoAseguradora = frm1.nuevoPrecio - importe;
                            }
                        }
                        break;

                        //SERVICIOS AUXILIARES
                        case 2:
                        {
                            if (objComponentDto.r_PriceSegus != 0)
                            {
                                objServiceComponentDto.r_Price            = objComponentDto.r_PriceSegus * float.Parse(factorGlobal);
                                objServiceComponentDto.d_SaldoPaciente    = importeCo * (decimal)objServiceComponentDto.r_Price / 100;
                                objServiceComponentDto.d_SaldoAseguradora = (100 - importeCo) * (decimal)objServiceComponentDto.r_Price / 100;
                            }
                            else
                            {
                                frmConfigSeguros frm1 = new frmConfigSeguros(factorGlobal);
                                frm1.ShowDialog();
                                objServiceComponentDto.r_Price            = (float)frm1.nuevoPrecio;
                                objServiceComponentDto.d_SaldoPaciente    = importeCo * frm1.nuevoPrecio / 100;
                                objServiceComponentDto.d_SaldoAseguradora = (100 - importeCo) * frm1.nuevoPrecio / 100;
                            }
                        }
                        break;

                        //HONORARIOS MÉDICOS Y/O QUIRURGICOS
                        case 3:
                        {
                            if (objComponentDto.r_PriceSegus != 0)
                            {
                                objServiceComponentDto.r_Price            = objComponentDto.r_PriceSegus * float.Parse(factorGlobal);
                                objServiceComponentDto.d_SaldoPaciente    = importeCo * (decimal)objServiceComponentDto.r_Price / 100;
                                objServiceComponentDto.d_SaldoAseguradora = (100 - importeCo) * (decimal)objServiceComponentDto.r_Price / 100;
                            }
                            else
                            {
                                frmConfigSeguros frm1 = new frmConfigSeguros(factorGlobal);
                                frm1.ShowDialog();
                                objServiceComponentDto.r_Price            = (float)frm1.nuevoPrecio;
                                objServiceComponentDto.d_SaldoPaciente    = importeCo * frm1.nuevoPrecio / 100;
                                objServiceComponentDto.d_SaldoAseguradora = (100 - importeCo) * frm1.nuevoPrecio / 100;
                            }
                        }
                        break;
                        }
                        #endregion



                        objServiceComponentDto.v_ServiceId              = _serviceId;
                        objServiceComponentDto.i_ExternalInternalId     = (int)Common.ComponenteProcedencia.Interno;
                        objServiceComponentDto.i_ServiceComponentTypeId = 1;
                        objServiceComponentDto.i_IsVisibleId            = 1;
                        objServiceComponentDto.i_IsInheritedId          = (int)Common.SiNo.NO;
                        objServiceComponentDto.d_StartDate              = null;
                        objServiceComponentDto.d_EndDate                  = null;
                        objServiceComponentDto.i_index                    = 1;
                        objServiceComponentDto.v_ComponentId              = scid;
                        objServiceComponentDto.i_IsInvoicedId             = (int)Common.SiNo.NO;
                        objServiceComponentDto.i_ServiceComponentStatusId = (int)Common.ServiceStatus.PorIniciar;
                        objServiceComponentDto.i_QueueStatusId            = (int)Common.QueueStatusId.LIBRE;
                        objServiceComponentDto.i_Iscalling                = (int)Common.Flag_Call.NoseLlamo;
                        objServiceComponentDto.i_Iscalling_1              = (int)Common.Flag_Call.NoseLlamo;
                        objServiceComponentDto.i_IsManuallyAddedId        = (int)Common.SiNo.NO;
                        objServiceComponentDto.i_IsRequiredId             = (int)Common.SiNo.SI;
                        objServiceComponentDto.v_IdUnidadProductiva       = txtUnidProdId.Text;
                        objServiceComponentDto.i_MedicoTratanteId         = int.Parse(cboMedico.SelectedValue.ToString());
                        if (rbNuevaConsulta.Checked)
                        {
                            objServiceComponentDto.i_TipoDesc = 1;
                        }
                        else if (rbAdicional.Checked)
                        {
                            objServiceComponentDto.i_TipoDesc = 2;
                        }

                        _ObjServiceBL.AddServiceComponent(ref objOperationResult, objServiceComponentDto, Globals.ClientSession.GetAsList());
                        #region Update a service agrega el PlanId
                        cadena1 = "update service set " +
                                  "i_PlanId = '" + PlanId + "' " +
                                  "where v_ServiceId = '" + _serviceId + "' ";
                        comando = new SqlCommand(cadena1, connection: conectasam.conectarsigesoft);
                        lector  = comando.ExecuteReader();
                        lector.Close();
                        #endregion
                    }
                    else
                    {
                        FormPrecioComponente frm = new FormPrecioComponente(NombreComponente[0].ToString(), precio_base.ToString(), "");
                        frm.ShowDialog();
                        objServiceComponentDto.i_ConCargoA              = conCargoA;
                        objServiceComponentDto.v_ServiceId              = _serviceId;
                        objServiceComponentDto.i_ExternalInternalId     = (int)Common.ComponenteProcedencia.Interno;
                        objServiceComponentDto.i_ServiceComponentTypeId = 1;
                        objServiceComponentDto.i_IsVisibleId            = 1;
                        objServiceComponentDto.i_IsInheritedId          = (int)Common.SiNo.NO;
                        objServiceComponentDto.d_StartDate              = null;
                        objServiceComponentDto.d_EndDate                  = null;
                        objServiceComponentDto.i_index                    = 1;
                        objServiceComponentDto.r_Price                    = frm.Precio;
                        objServiceComponentDto.v_ComponentId              = scid;
                        objServiceComponentDto.i_IsInvoicedId             = (int)Common.SiNo.NO;
                        objServiceComponentDto.i_ServiceComponentStatusId = (int)Common.ServiceStatus.PorIniciar;
                        objServiceComponentDto.i_QueueStatusId            = (int)Common.QueueStatusId.LIBRE;
                        //objServiceComponentDto.i_IsRequiredId = (int)Common.SiNo.SI;
                        objServiceComponentDto.i_Iscalling          = (int)Common.Flag_Call.NoseLlamo;
                        objServiceComponentDto.i_Iscalling_1        = (int)Common.Flag_Call.NoseLlamo;
                        objServiceComponentDto.i_IsManuallyAddedId  = (int)Common.SiNo.NO;
                        objServiceComponentDto.i_IsRequiredId       = (int)Common.SiNo.SI;
                        objServiceComponentDto.v_IdUnidadProductiva = objComponentDto.v_IdUnidadProductiva;
                        objServiceComponentDto.i_MedicoTratanteId   = int.Parse(cboMedico.SelectedValue.ToString());
                        objServiceComponentDto.d_SaldoPaciente      = 0;
                        objServiceComponentDto.d_SaldoAseguradora   = 0;
                        _ObjServiceBL.AddServiceComponent(ref objOperationResult, objServiceComponentDto, Globals.ClientSession.GetAsList());
                    }
                }

                //Actualizo si son examenes adicionales
                if (_DataSource.Count > 0)
                {
                    new AdditionalExamBL().UpdateAdditionalExamByComponentIdAndServiceId(ComponentId[0], _serviceId,
                                                                                         Globals.ClientSession.i_SystemUserId);
                }
            }

            MessageBox.Show("Se grabo correctamente", " ¡ INFORMACIÓN !", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.DialogResult = DialogResult.OK;
        }
        private void btnMoveEPP_Click(object sender, EventArgs e)
        {
            OperationResult     objOperationResult     = new OperationResult();
            SystemParameterBL   objSystemParameterBL   = new SystemParameterBL();
            SystemParameterList objSystemParameterList = new SystemParameterList();
            TypeOfEEPList       objTypeOfEEP           = new TypeOfEEPList();

            if (treeViewEPP.SelectedNode == null)
            {
                return;
            }

            //Si la lista temporal es null se la setea con una lista vacia
            if (_TempTypeOfEEPList == null)
            {
                _TempTypeOfEEPList = new List <TypeOfEEPList>();
            }

            int ParameterId = int.Parse(treeViewEPP.SelectedNode.Name.ToString());

            History.frmOtroEPP frmOtroEpp = new History.frmOtroEPP();
            string             OtroEpp    = "";

            if (ParameterId == 16)
            {
                frmOtroEpp.ShowDialog();

                OtroEpp = frmOtroEpp.EppName;
                objSystemParameterList = objSystemParameterBL.GetParentNameSystemParameter(ref objOperationResult, frmOtroEpp.ParameterId);
            }
            else
            {
                objSystemParameterList = objSystemParameterBL.GetParentNameSystemParameter(ref objOperationResult, ParameterId);
            }


            History.frmEppPercentage frm = new History.frmEppPercentage(objSystemParameterList.v_Value1, 0);
            frm.ShowDialog();

            if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                if (objSystemParameterList != null)
                {
                    TypeOfEEPList findResult = new TypeOfEEPList();
                    //Busco en la lista temporal si ya se agrego el item seleccionado
                    if (ParameterId == 16)
                    {
                        findResult = _TempTypeOfEEPList.Find(p => p.i_TypeofEEPId == frmOtroEpp.ParameterId);
                    }
                    else
                    {
                        findResult = _TempTypeOfEEPList.Find(p => p.i_TypeofEEPId == ParameterId);
                    }



                    if (findResult == null)
                    {
                        objTypeOfEEP.v_TypeofEEPId = Guid.NewGuid().ToString();

                        if (ParameterId == 16)
                        {
                            objTypeOfEEP.i_TypeofEEPId   = frmOtroEpp.ParameterId;
                            objTypeOfEEP.v_TypeofEEPName = OtroEpp;
                        }
                        else
                        {
                            objTypeOfEEP.i_TypeofEEPId   = ParameterId;
                            objTypeOfEEP.v_TypeofEEPName = objSystemParameterList.v_Value1;
                        }


                        objTypeOfEEP.r_Percentage   = frm._Porcentage;
                        objTypeOfEEP.i_RecordStatus = (int)RecordStatus.Agregado;
                        objTypeOfEEP.i_RecordType   = (int)RecordType.Temporal;
                        _TempTypeOfEEPList.Add(objTypeOfEEP);
                    }
                    else
                    {
                        if (findResult.i_RecordStatus == (int)RecordStatus.EliminadoLogico)
                        {
                            if (findResult.i_RecordType == (int)RecordType.NoTemporal)// El registro Tiene in ID de BD
                            {
                                findResult.i_TypeofEEPId   = ParameterId;
                                findResult.v_TypeofEEPName = objSystemParameterList.v_Value1;
                                findResult.r_Percentage    = frm._Porcentage;
                                findResult.i_RecordStatus  = (int)RecordStatus.Grabado;
                            }
                            else if (findResult.i_RecordType == (int)RecordType.Temporal) // El registro tiene un ID temporal [GUID]
                            {
                                findResult.i_TypeofEEPId   = ParameterId;
                                findResult.v_TypeofEEPName = objSystemParameterList.v_Value1;
                                findResult.r_Percentage    = frm._Porcentage;
                                findResult.i_RecordStatus  = (int)RecordStatus.Agregado;
                            }
                        }
                        else
                        {
                            MessageBox.Show("Por favor seleccione otro item. ya existe", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            return;
                        }
                    }
                    var dataList = _TempTypeOfEEPList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);

                    // Cargar grilla
                    grdDataEPP.DataSource = new TypeOfEEPList();
                    grdDataEPP.DataSource = dataList;
                    grdDataEPP.Refresh();
                }
            }
        }
        private void btnMoveDanger_Click(object sender, EventArgs e)
        {
            OperationResult     objOperationResult     = new OperationResult();
            SystemParameterBL   objSystemParameterBL   = new SystemParameterBL();
            SystemParameterList objSystemParameterList = new SystemParameterList();

            WorkstationDangersList objWorkstationDangers = new WorkstationDangersList();

            if (treeViewDangers.SelectedNode == null)
            {
                return;
            }
            //Si la lista temporal es null se la setea con una lista vacia
            if (_TempWorkstationDangersList == null)
            {
                _TempWorkstationDangersList = new List <WorkstationDangersList>();
            }

            int ParameterId = int.Parse(treeViewDangers.SelectedNode.Name.ToString());

            History.frmOtroPeligro frmOtroPeligro = new History.frmOtroPeligro();
            string OtroDangrer = "";

            if (ParameterId == 35)
            {
                frmOtroPeligro.ShowDialog();


                OtroDangrer            = frmOtroPeligro.DangerName;
                objSystemParameterList = objSystemParameterBL.GetParentNameSystemParameter(ref objOperationResult, frmOtroPeligro.ParameterId, 145);
            }
            else
            {
                objSystemParameterList = objSystemParameterBL.GetParentNameSystemParameter(ref objOperationResult, ParameterId, 145);
            }


            History.frmRuidoPopup frm = new History.frmRuidoPopup();

            if (objSystemParameterList != null)
            {
                WorkstationDangersList findResult = new WorkstationDangersList();
                //Busco en la lista temporal si ya se agrego el item seleccionado
                if (ParameterId == 35)
                {
                    findResult = _TempWorkstationDangersList.Find(p => p.i_DangerId == frmOtroPeligro.ParameterId);
                }
                else
                {
                    findResult = _TempWorkstationDangersList.Find(p => p.i_DangerId == ParameterId);
                }


                if (findResult == null)
                {
                    // Levantar popup para registrar datos propios de ruido
                    if (ParameterId == (int)PeligrosEnElPuesto.Ruido)
                    {
                        frm.ShowDialog();

                        if (frm.DialogResult == DialogResult.Cancel)
                        {
                            return;
                        }

                        objWorkstationDangers.v_TimeOfExposureToNoise = frm.FuenteRuido;
                        objWorkstationDangers.i_NoiseLevel            = frm.NivelRuidoId;
                        objWorkstationDangers.i_NoiseSource           = frm.TiempoExposicionRuidoId;
                    }

                    objWorkstationDangers.v_WorkstationDangersId = Guid.NewGuid().ToString();

                    objWorkstationDangers.v_ParentName = objSystemParameterList.v_Value1;
                    if (ParameterId == 35)
                    {
                        objWorkstationDangers.v_DangerName = OtroDangrer;
                        objWorkstationDangers.i_DangerId   = frmOtroPeligro.ParameterId;
                    }
                    else
                    {
                        objWorkstationDangers.i_DangerId   = ParameterId;
                        objWorkstationDangers.v_DangerName = treeViewDangers.SelectedNode.Text.ToString();
                    }

                    objWorkstationDangers.i_RecordStatus = (int)RecordStatus.Agregado;
                    objWorkstationDangers.i_RecordType   = (int)RecordType.Temporal;
                    _TempWorkstationDangersList.Add(objWorkstationDangers);
                }
                else
                {
                    // Levantar popup para registrar datos propios de ruido
                    if (ParameterId == (int)PeligrosEnElPuesto.Ruido)
                    {
                        if (findResult.i_RecordStatus == (int)RecordStatus.EliminadoLogico)
                        {
                            frm.ShowDialog();

                            if (frm.DialogResult == DialogResult.Cancel)
                            {
                                return;
                            }
                        }
                        else
                        {
                            MessageBox.Show("Por favor seleccione otro item. ya existe", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            return;
                        }
                    }

                    if (findResult.i_RecordStatus == (int)RecordStatus.EliminadoLogico)
                    {
                        if (findResult.i_RecordType == (int)RecordType.NoTemporal)// El registro Tiene in ID de BD
                        {
                            findResult.i_DangerId   = ParameterId;
                            findResult.v_DangerName = objSystemParameterList.v_Value1;
                            findResult.v_DangerName = treeViewDangers.SelectedNode.Text.ToString();

                            findResult.v_TimeOfExposureToNoise = frm.FuenteRuido;
                            findResult.i_NoiseLevel            = frm.NivelRuidoId;
                            findResult.i_NoiseSource           = frm.TiempoExposicionRuidoId;

                            findResult.i_RecordStatus = (int)RecordStatus.Grabado;
                        }
                        else if (findResult.i_RecordType == (int)RecordType.Temporal) // El registro tiene un ID temporal [GUID]
                        {
                            findResult.i_DangerId   = ParameterId;
                            findResult.v_DangerName = objSystemParameterList.v_Value1;
                            findResult.v_DangerName = treeViewDangers.SelectedNode.Text.ToString();

                            findResult.v_TimeOfExposureToNoise = frm.FuenteRuido;
                            findResult.i_NoiseLevel            = frm.NivelRuidoId;
                            findResult.i_NoiseSource           = frm.TiempoExposicionRuidoId;

                            findResult.i_RecordStatus = (int)RecordStatus.Agregado;
                        }
                    }
                    else
                    {
                        MessageBox.Show("Por favor seleccione otro item. ya existe", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                }
                var dataList = _TempWorkstationDangersList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);
                //var peopleInOrder = people.OrderBy(person => person.LastName);

                // Cargar grilla
                grdDataDangers.DataSource = new WorkstationDangersList();
                grdDataDangers.DataSource = dataList;
                grdDataDangers.Refresh();
            }
        }
        public BoardExamsCustom CallingPacient(BoardExamsCustom data)
        {
            MessageCustom _Message = new MessageCustom();

            List <Dropdownlist> ListaCetegorias = new SystemParameterBL().GetParametroByGrupoId(116);
            var ListaExamenesPrevios            = new SystemParameterBL().GetParametroByGrupoId(306).Find(p => p.Value2 == data.CategoryId);

            if (ListaExamenesPrevios != null)
            {
                var consultorioPrevio = int.Parse(ListaExamenesPrevios.Field);

                if (consultorioPrevio == -1)
                {
                    var examenesNoCulminados = new ServiceBl().GetServiceComponentsCulminados(data.ServiceId);
                    if (examenesNoCulminados == null)
                    {
                        _Message.Error   = true;
                        _Message.Status  = 400;
                        _Message.Message = "Sucedio un error generando las consultas, por favor refresque y vuelva a intentar.";
                        data.Message     = _Message;
                        return(data);
                    }
                    var exam = examenesNoCulminados.FindAll(p => p.i_CategoryId != data.CategoryId);

                    if (exam.Count != 0)
                    {
                        _Message.Error   = true;
                        _Message.Status  = 200;
                        _Message.Message = "Este paciente debe primero CULIMINAR TODOS los examenes anteriores.";
                        data.Message     = _Message;
                        return(data);
                    }
                }

                var listaExamenesProtocolo = new ServiceBl().GetServiceComponents(data.ServiceId).Find(p => p.i_CategoryId == consultorioPrevio);
                if (listaExamenesProtocolo == null)
                {
                    _Message.Error   = true;
                    _Message.Status  = 400;
                    _Message.Message = "Sucedio un error generando las consultas, por favor refresque y vuelva a intentar.";
                    data.Message     = _Message;
                    return(data);
                }
                if (listaExamenesProtocolo != null)
                {
                    var examenesNoCulminados = new ServiceBl().GetServiceComponentsCulminados(data.ServiceId);
                    if (examenesNoCulminados == null)
                    {
                        _Message.Error   = true;
                        _Message.Status  = 400;
                        _Message.Message = "Sucedio un error generando las consultas, por favor refresque y vuelva a intentar.";
                        data.Message     = _Message;
                        return(data);
                    }
                    var result = examenesNoCulminados.Find(p => p.i_CategoryId == consultorioPrevio);

                    if (result != null)
                    {
                        _Message.Error  = true;
                        _Message.Status = 200;
                        int field = int.Parse(ListaExamenesPrevios.Field);
                        _Message.Message = "Este paciente debe primero CULIMINAR  el examen " + ListaCetegorias.Find(p => p.Id == field).Value;
                        data.Message     = _Message;
                        return(data);
                    }
                }
            }

            if (data.Piso != -1)
            {
                var ResultPiso = new ServiceBl().PermitirLlamar(data.ServiceId, data.Piso);
                if (!ResultPiso)
                {
                    _Message.Error   = true;
                    _Message.Status  = 200;
                    _Message.Message = "El Paciente tiene consultorios por culminar, antes de ser llamado por este. Verifíquelo en unos minutos";
                    data.Message     = _Message;
                    return(data);
                }
            }

            if (data.ServiceStatusId == (int)ServiceStatus.EsperandoAptitud)
            {
                _Message.Error   = true;
                _Message.Status  = 200;
                _Message.Message = "Este paciente ya tiene el servicio en espera de Aptitud, no puede ser llamado.";
                data.Message     = _Message;
                return(data);
            }
            var           oServiceComponentList = new ServiceBl().GetServiceComponentByCategoryId(data.CategoryId, data.ServiceId);
            List <string> _ServiceComponentId   = new List <string>();

            foreach (var item in oServiceComponentList)
            {
                _ServiceComponentId.Add(item.v_ServiceComponentId);
            }
            bool resultOff = new ServiceDal().UpdateServiceComponentOfficeLlamando(_ServiceComponentId, data.Oficina);

            if (!resultOff)
            {
                _Message.Error   = true;
                _Message.Status  = 500;
                _Message.Message = "Sucedio un error actualizando la llamada, vuelva a intentar por favor.";
                data.Message     = _Message;
                return(data);
            }
            _Message.Error  = false;
            _Message.Status = 200;
            data.Message    = _Message;
            return(data);
        }
Exemple #9
0
        private void UcCuestNordico_Load(object sender, EventArgs e)
        {
            cbo1Cuello.Name = "N009-CSN00000001";
            cbo1Hombro.Name = "N009-CSN00000002";
            cbo1Dorsal.Name = "N009-CSN00000003";
            cbo1Codo.Name   = "N009-CSN00000004";
            cbo1Mano.Name   = "N009-CSN00000005";

            cbo1HombroDir.Name = "N009-CSN00000006";
            cbo1CodoDir.Name   = "N009-CSN00000007";
            cbo1ManoDir.Name   = "N009-CSN00000008";

            txt2Cuello.Name = "N009-CSN00000009";
            txt2Hombro.Name = "N009-CSN00000010";
            txt2Dorsal.Name = "N009-CSN0000001";
            txt2Codo.Name   = "N009-CSN00000012";
            txt2Mano.Name   = "N009-CSN00000013";

            cbo3Cuello.Name = "N009-CSN00000014";
            cbo3Hombro.Name = "N009-CSN00000015";
            cbo3Dorsal.Name = "N009-CSN00000016";
            cbo3Codo.Name   = "N009-CSN00000017";
            cbo3Mano.Name   = "N009-CSN00000018";

            cbo4Cuello.Name = "N009-CSN00000019";
            cbo4Hombro.Name = "N009-CSN00000020";
            cbo4Dorsal.Name = "N009-CSN00000021";
            cbo4Codo.Name   = "N009-CSN00000022";
            cbo4Mano.Name   = "N009-CSN00000023";

            cbo5Cuello.Name = "N009-CSN00000024";
            cbo5Hombro.Name = "N009-CSN00000025";
            cbo5Dorsal.Name = "N009-CSN00000026";
            cbo5Codo.Name   = "N009-CSN00000027";
            cbo5Mano.Name   = "N009-CSN00000028";

            cbo6Cuello.Name = "N009-CSN00000029";
            cbo6Hombro.Name = "N009-CSN00000030";
            cbo6Dorsal.Name = "N009-CSN00000031";
            cbo6Codo.Name   = "N009-CSN00000032";
            cbo6Mano.Name   = "N009-CSN00000033";

            cbo7Cuello.Name = "N009-CSN00000034";
            cbo7Hombro.Name = "N009-CSN00000035";
            cbo7Dorsal.Name = "N009-CSN00000036";
            cbo7Codo.Name   = "N009-CSN00000037";
            cbo7Mano.Name   = "N009-CSN00000038";

            cbo8Cuello.Name = "N009-CSN00000039";
            cbo8Hombro.Name = "N009-CSN00000040";
            cbo8Dorsal.Name = "N009-CSN00000041";
            cbo8Codo.Name   = "N009-CSN00000042";
            cbo8Mano.Name   = "N009-CSN00000043";

            cbo9Cuello.Name = "N009-CSN00000044";
            cbo9Hombro.Name = "N009-CSN00000045";
            cbo9Dorsal.Name = "N009-CSN00000046";
            cbo9Codo.Name   = "N009-CSN00000047";
            cbo9Mano.Name   = "N009-CSN00000048";

            cbo10Cuello.Name = "N009-CSN00000049";
            cbo10Hombro.Name = "N009-CSN00000050";
            cbo10Dorsal.Name = "N009-CSN00000051";
            cbo10Codo.Name   = "N009-CSN00000052";
            cbo10Mano.Name   = "N009-CSN00000053";

            txt11Cuello.Name = "N009-CSN00000054";
            txt11Hombro.Name = "N009-CSN00000055";
            txt11Dorsal.Name = "N009-CSN0000056";
            txt11Codo.Name   = "N009-CSN00000057";
            txt11Mano.Name   = "N009-CSN00000058";

            #region BindCombos
            OperationResult   objOperationResult   = new OperationResult();
            SystemParameterBL objSystemParameterBl = new SystemParameterBL();

            Utils.LoadDropDownList(cbo1Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1HombroDir, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 246), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1CodoDir, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 246), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo1ManoDir, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 246), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo3Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo3Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo3Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo3Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo3Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo4Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo4Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo4Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo4Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo4Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo5Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 243), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo5Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 243), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo5Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 243), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo5Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 243), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo5Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 243), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo6Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo6Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo6Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo6Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo6Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo7Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo7Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo7Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo7Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo7Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 244), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo8Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo8Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo8Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo8Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo8Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo9Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo9Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo9Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo9Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo9Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 111), DropDownListAction.Select);

            Utils.LoadDropDownList(cbo10Cuello, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 245), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo10Hombro, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 245), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo10Dorsal, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 245), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo10Codo, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 245), DropDownListAction.Select);
            Utils.LoadDropDownList(cbo10Mano, "Value1", "Id", objSystemParameterBl.GetSystemParameterForCombo(ref objOperationResult, 245), DropDownListAction.Select);


            cbo1Cuello.SelectedValue = "0";
            cbo1Hombro.SelectedValue = "0";
            cbo1Dorsal.SelectedValue = "0";
            cbo1Codo.SelectedValue   = "0";
            cbo1Mano.SelectedValue   = "0";

            cbo1HombroDir.SelectedValue = "3";;
            cbo1CodoDir.SelectedValue   = "3";
            cbo1ManoDir.SelectedValue   = "3";


            SearchControlAndSetEvents(this);

            #endregion
        }