Exemple #1
0
        private void grdDataHabitaciones_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            if (grdDataHabitaciones.Selected.Rows.Count == 0)
            {
                return;
            }
            OperationResult     objOperationResult = new OperationResult();
            SystemParameterList habHospit          = new SystemParameterList();

            if (_mode == "NewASEGU")
            {
                #region Conexion SAM
                ConexionSigesoft conectasam = new ConexionSigesoft();
                conectasam.opensigesoft();
                #endregion
                var           cadena1 = "select r_HospitalBedPrice from protocol where v_ProtocolId ='" + _v_ProtocoloId + "'";
                SqlCommand    comando = new SqlCommand(cadena1, connection: conectasam.conectarsigesoft);
                SqlDataReader lector  = comando.ExecuteReader();
                string        hab     = "0.00";
                while (lector.Read())
                {
                    hab = lector.GetValue(0).ToString();
                }
                lector.Close();
                txtPrecio.Text    = double.Parse(hab).ToString("N2");
                txtPrecio.Enabled = false;
            }
            else
            {
                int HabitacionId = int.Parse(grdDataHabitaciones.Selected.Rows[0].Cells["i_HabitacionId"].Value.ToString());
                habHospit = _hospitalizacionBL.GetHabitaciónH(ref objOperationResult, HabitacionId);

                txtPrecio.Text = double.Parse(habHospit.v_Value2).ToString("N2");
            }
        }
Exemple #2
0
 private void grdHolidays_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     LimpiarCampos();
     gbUpdateAdd.Enabled = false;
     cmHolidays.Items["itemEditar"].Enabled   = true;
     cmHolidays.Items["itemEliminar"].Enabled = true;
 }
        private void ultraGrid1_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            //btnAgregarExamenAuxiliar.Enabled = (ultraGrid1.Selected.Rows.Count > 0);
            if (ultraGrid1.Selected.Rows[0].Cells["v_ComponentId"].Value == null)
            {
                btnAgregarExamenAuxiliar.Enabled = false;

                return;
            }
            else
            {
                btnAgregarExamenAuxiliar.Enabled = true;
            }

            lvExamenesSeleccionados.SelectedItems.Clear();

            if (ultraGrid1.Selected.Rows.Count == 0)
            {
                return;
            }

            MedicalExamId            = ultraGrid1.Selected.Rows[0].Cells["v_ComponentId"].Value.ToString();
            MedicalExamName          = ultraGrid1.Selected.Rows[0].Cells["v_ComponentName"].Value.ToString();
            ServiceComponentConcatId = ultraGrid1.Selected.Rows[0].Cells["v_ServiceComponentId"].Value.ToString();

            if (ultraGrid1.Selected.Rows[0].Cells["v_ComponentId"].Value != null)
            {
                MedicalExamName = ultraGrid1.Selected.Rows[0].Cells["v_ComponentName"].Value.ToString();
            }
            else
            {
                MedicalExamName = string.Empty;
            }
        }
Exemple #4
0
        private void grd_mvto_ListaVersiones_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            if (DS_Aprobacion.Tables[0].Rows.Count > 0)
            {
                Infragistics.Win.UltraWinGrid.UltraGridRow oRow;
                oRow = this.grd_mvto_ListaVersiones.ActiveRow;

                if (!Convert.ToBoolean(oRow.Cells[4].Value))
                {
                    Frm_Cierra_Version frm = new Frm_Cierra_Version();
                    frm.Envia_Datos(txt_AñoProceso.Text.Trim(), oRow.Cells[0].Value.ToString().Trim(), cbo_Version.Text.Trim());
                    frm.ShowDialog();

                    if (frm.BResultado)
                    {
                        Infragistics.Win.UltraWinGrid.UltraGridRow oRow2;
                        oRow2 = grd_mvto_ListaVersiones.ActiveRow;
                        oRow2.Cells[0].Value = frm.CcodCeco;
                        oRow2.Cells[1].Value = frm.VnomCeco;
                        oRow2.Cells[2].Value = frm.VfechaAprobacion;
                        oRow2.Cells[3].Value = frm.Vnota;
                        oRow2.Cells[4].Value = frm.Baprobado;
                        oRow2.Cells[5].Value = frm.Vanio;
                        oRow2.Cells[6].Value = frm.Vversion;
                    }
                }
                else
                {
                    MessageBox.Show("El Ceco y Versión seleccionado ya se encuentra aprobado", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
        private void grd_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            if (grd.Selected.Rows.Count != 0)
            {
                string protocolName = grd.Selected.Rows[0].Cells["v_Protocol"].Value.ToString();
                float  Total        = 0;
                _protocolId = grd.Selected.Rows[0].Cells["v_ProtocolId"].Value.ToString();

                gbProtocolComponents.Text = string.Format("Comp. del Prot. < {0} >", protocolName);

                // Cargar componentes de un protocolo seleccionado
                OperationResult objOperationResult = new OperationResult();
                var             dataListPc         = _protocolBL.GetProtocolComponents(ref objOperationResult, _protocolId);

                grdProtocolComponent.DataSource = dataListPc;

                lblRecordCountProtocolComponents.Text = string.Format("Se encontraron {0} registros.", dataListPc.Count());

                foreach (var item in dataListPc)
                {
                    Total = Total + item.r_Price.Value;
                }
                lblCostoTotal.Text = Total.ToString();
                if (objOperationResult.Success != 1)
                {
                    MessageBox.Show("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemple #6
0
        private void OnUserSelected(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            //Event handler for user selcted in the grid
            try {
                this.mRoles.Clear();
                this.mUserRoles.Clear();
                string userName = this.grdMain.Selected.Rows[0].Cells["UserName"].Value.ToString();

                this.mUserRoles.Merge(ApplicationServicesGateway.GetRolesForUser("Argix", userName));
                MembershipDataset roles = new MembershipDataset();
                roles.Merge(ApplicationServicesGateway.GetRoles("Argix"));
                for (int i = 0; i < this.mUserRoles.RoleTable.Count; i++)
                {
                    MembershipDataset.RoleTableRow[] rows = (MembershipDataset.RoleTableRow[])roles.RoleTable.Select("RoleName='" + this.mUserRoles.RoleTable[i].RoleName + "'");
                    if (rows != null && rows.Length > 0)
                    {
                        roles.RoleTable.RemoveRoleTableRow(rows[0]);
                    }
                }
                roles.RoleTable.AcceptChanges();
                this.mRoles.Merge(roles);
            }
            catch (Exception ex) { App.ReportError(ex); }
            finally { setUserServices(); }
        }
Exemple #7
0
        private void grdData_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            btnUpdateandSelect.Enabled = (grdData.Selected.Rows.Count > 0);

            if (grdData.Selected.Rows.Count == 0)
            {
                return;
            }
        }
Exemple #8
0
 private void grilla_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     if (grilla.Selected.Cells.Count > 0)
     {
         int    c = grilla.Selected.Cells.Count - 1;
         String r = grilla.Selected.Cells[c].Row.Cells["idste_clijuridico"].Text;
         seleccionar(int.Parse(r));
     }
 }
 private void ugBTS_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     if (this.ugBTS.Selected.Rows.Count > 0)
     {
         uniqueIdent = ugBTS.Selected.Rows[0].Cells["uniqueIdent"].Value.ToString();
     }
     txtUniqueIdentifier.Text = uniqueIdent;
     getSerialNum(uniqueIdent);
 }
Exemple #10
0
 private void grdMedicamentMarca_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     if (grdMedicamentMarca.Selected.Rows.Count > 0)
     {
         _productId   = grdMedicamentMarca.Selected.Rows[0].Cells["v_ProductId"].Value.ToString();
         _productName = lblPresentacion.Text = grdMedicamentMarca.Selected.Rows[0].Cells["v_ProductName"].Value.ToString();
         gbMedicamentoSeleccionado.Text = string.Format("Medicamento seleccionado < {0} >", grdMedicamentMarca.Selected.Rows[0].Cells["v_ProductName"].Value.ToString());
         lblPresentacion.Text           = grdMedicamentMarca.Selected.Rows[0].Cells["v_Presentation"].Value.ToString();
     }
 }
Exemple #11
0
        private void grdDataMedicalExam_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            if (grdDataMedicalExam.Selected.Rows.Count == 0)
            {
                return;
            }

            strMedicalExamId = grdDataMedicalExam.Selected.Rows[0].Cells[0].Value.ToString();
            _ComponentName   = grdDataMedicalExam.Selected.Rows[0].Cells[1].Value.ToString();
            BindGridMedicalExamFields(strMedicalExamId);
        }
        private void grdServiciosAnteriores_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            btnVerServicioAnterior.Enabled = (grdServiciosAnteriores.Selected.Rows.Count > 0);

            if (grdServiciosAnteriores.Selected.Rows.Count == 0)
            {
                return;
            }

            _serviceIdByWiewServiceHistory = grdServiciosAnteriores.Selected.Rows[0].Cells["v_ServiceId"].Value.ToString();
        }
Exemple #13
0
 private void grdData1_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     if (grdData1.Selected.Rows.Count == 0)
     {
         return;
     }
     _strProductId = grdData1.Selected.Rows[0].Cells["v_ProductId"].Value.ToString();
     BindGridGrdData1andGrdData2(_strProductId);
     btnExport.Enabled    = grdData2.Rows.Count > 0;
     btnExportPdf.Enabled = grdData2.Rows.Count > 0;
 }
        private void grdProtocolComponent_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            btnEditar.Enabled = btnRemover.Enabled = (grdProtocolComponent.Selected.Rows.Count > 0);

            if (grdProtocolComponent.Selected.Rows.Count == 0)
            {
                return;
            }

            _rowIndexPc          = ((Infragistics.Win.UltraWinGrid.UltraGrid)sender).Selected.Rows[0].Index;
            _protocolComponentId = grdProtocolComponent.Selected.Rows[0].Cells["v_ProtocolComponentId"].Value.ToString();
        }
Exemple #15
0
 private void OnGridSelectionChanged(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     //Event handler for after selection changes
     this.Cursor = Cursors.WaitCursor;
     try {
         //Update the selected contact
         this.mContact = null;
         if (this.grdContacts.Selected.Rows.Count > 0)
         {
             this.mContact = EnterpriseFactory.GetContact(Convert.ToInt32(this.grdContacts.Selected.Rows[0].Cells["ID"].Value));
         }
     }
     catch { }
     finally { setUserServices(); this.Cursor = Cursors.Default; }
 }
Exemple #16
0
 private void OnViewSelected(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     //Event handler for view selected
     try {
         this.mSelectedView = null;
         if (this.grdViews.Selected.Rows.Count > 0)
         {
             string viewName = this.grdViews.Selected.Rows[0].Cells["ViewName"].Value.ToString();
             this.mSelectedView              = this.mViews.Item(viewName);
             this.mSelectedView.ViewChanged += new EventHandler(OnViewChanged);
             OnViewChanged(null, null);
         }
     }
     catch (Exception) { }
     finally { OnValidateForm(null, null); }
 }
        private void grdData_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            // Setear privilegios / permisos

            btnReport.Enabled     = (grdData.Selected.Rows.Count > 0 && _isPrintEnabled);
            btnCotizacion.Enabled = (grdData.Selected.Rows.Count > 0 && _isPrintEnabled);
            btnDelete.Enabled     = (grdData.Selected.Rows.Count > 0 && _isDeleteEnabled);
            btnEdit.Enabled       = (grdData.Selected.Rows.Count > 0 && _isEditEnabled);
            btnSendEmail.Enabled  = (grdData.Selected.Rows.Count > 0 && _isEditEnabled);

            if (grdData.Selected.Rows.Count == 0)
            {
                return;
            }

            _ServiceOrderId = grdData.Selected.Rows[0].Cells["v_ServiceOrderId"].Value.ToString();
            //_ProtocolId = grdData.Selected.Rows[0].Cells["v_ProtocolId"].Value.ToString();
        }
        private void ultraGridRepPartList_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            if (ultraGridRepPartList.Selected.Rows.Count > 0)
            {
                textPartNum.Text = ultraGridRepPartList.Selected.Rows[0].Cells["MRPPartNum"].Value.ToString();

                this.textPlanGroup.Text       = ultraGridRepPartList.Selected.Rows[0].Cells["PlanGroup"].Value.ToString();
                this.textAsmCategory.Text     = ultraGridRepPartList.Selected.Rows[0].Cells["AsmCategory"].Value.ToString();
                this.textboxPlanningItem.Text = ultraGridRepPartList.Selected.Rows[0].Cells["PlanningItem"].Value.ToString();
                if (ultraGridRepPartList.Selected.Rows[0].Cells["AttachRate"].Value.ToString() != "")
                {
                    this.textAttachRate.Value = Convert.ToDecimal(ultraGridRepPartList.Selected.Rows[0].Cells["AttachRate"].Value.ToString());
                }
                else
                {
                    this.textAttachRate.Value = 0.00;
                }
            }
        }
        private void grdExamenAuxilar_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            if (grdExamenAuxilar.Selected.Rows.Count == 0)
            {
                return;
            }

            MedicalExamId   = grdExamenAuxilar.Selected.Rows[0].Cells["v_MedicalExamId"].Value.ToString();
            MedicalExamName = grdExamenAuxilar.Selected.Rows[0].Cells["v_Name"].Value.ToString();

            if (grdExamenAuxilar.Selected.Rows[0].Cells["v_CategoryName"].Value != null)
            {
                CategoryName = grdExamenAuxilar.Selected.Rows[0].Cells["v_CategoryName"].Value.ToString();
            }
            else
            {
                CategoryName = string.Empty;
            }
        }
Exemple #20
0
        private void grdDataServiceComponent_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
        {
            btnAgregarExamenAuxiliar.Enabled = (grdDataServiceComponent.Selected.Rows.Count > 0);
            lvExamenesSeleccionados.SelectedItems.Clear();

            if (grdDataServiceComponent.Selected.Rows.Count == 0)
            {
                return;
            }

            MedicalExamId            = grdDataServiceComponent.Selected.Rows[0].Cells["v_ComponentId"].Value.ToString();
            MedicalExamName          = grdDataServiceComponent.Selected.Rows[0].Cells["v_ComponentName"].Value.ToString();
            ServiceComponentConcatId = grdDataServiceComponent.Selected.Rows[0].Cells["v_ServiceComponentConcatId"].Value.ToString();

            if (grdDataServiceComponent.Selected.Rows[0].Cells["v_CategoryName"].Value != null)
            {
                CategoryName = grdDataServiceComponent.Selected.Rows[0].Cells["v_CategoryName"].Value.ToString();
            }
            else
            {
                CategoryName = string.Empty;
            }
        }
Exemple #21
0
 private void grdDataRestrictions_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     btnRemoverRestricciones.Enabled = (grdDataRestrictions.Selected.Rows.Count > 0);
 }
Exemple #22
0
 private void grdData_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     btnDelete.Enabled     =
         btnEditar.Enabled = (grdData.Selected.Rows.Count > 0);
 }
Exemple #23
0
 private void _grid_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     setMenuConfiguration();
 }
Exemple #24
0
 private void OnDeliverySelected(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     //Event handler for delivery selection
     OnValidateForm(null, EventArgs.Empty);
 }
Exemple #25
0
 private void OnGridAfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     //Event handler for gris row selected
     OnValidateForm(null, EventArgs.Empty);
 }
 private void grdData_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     btnExport.Enabled = grdData.Rows.Count > 0;
 }
Exemple #27
0
 private void ultraGrid1_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
 }