Public Class frmHistoricoAlarmasBT Inherits System.Windows.Forms.Form Dim clCmp As clsComplejo = New clsComplejo Dim Patron As clsComplejo = New clsComplejo 'Para llenar combo patron Dim Periodo As clsComplejo = New clsComplejo 'Para llenar combo periodo Dim Cliente As clsComplejo = New clsComplejo 'para llenar combo cliente Dim Estatus As clsComplejo = New clsComplejo 'para llenar combo estatus Dim Cuenta As clsComplejo = New clsComplejo 'para llenar el combo de cuenta Dim clsVar As clsVaribles = New clsVaribles 'Para utilizar varibles publicas Dim BanCliente, BanCuenta, BanPatron, BanStatus As Boolean Dim FilaActual As Integer = 0 Private Sub tlbInusualesDivisas_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbInusualesDivisas.ButtonClick Select Case e.Button.Text Case "Consultar" sbBuscar() Case "Exportar" Exportar() Case "Limpiar" refrescar() Case "Salir" Me.Close() End Select End Sub Public Sub sbBuscar() Try Dim SQL As String SQL = "" clCmp = New clsComplejo SQL = fsDefineSQL("ReporteInusualHistoricoBT ") clCmp.fdtDataSetTabla(SQL) ''Auditoria Dim ClassAud As New ClassMyUtils Dim sTextoAud As String sTextoAud = "Reporte Inusual Historico BT, Periodo del " & dtpFechaInicio.Value.Date & " al " & dtpFechaFin.Value.Date If cmbPatron.Text <> "" Then sTextoAud = sTextoAud & ", Patron:" & cmbPatron.Text End If If cmbCliente.Text <> "" Then sTextoAud = sTextoAud & ", IdCliente:" & cmbCliente.SelectedValue End If If cmbCuenta.Text <> "" Then sTextoAud = sTextoAud & ", Cuenta:" & cmbCuenta.Text End If If cmbStatus.Text <> "" Then sTextoAud = sTextoAud & ", Estatus:" & cmbStatus.Text End If ClassAud.RT_Auditoria(clsVaribles.varUsuario, 118, 1, sTextoAud) ''Fin de auditoria 'C1TrueDBGrid1.DataSource = Nothing 'C1TrueDBGrid1.Refresh() ' Me.C1TrueDBGrid1.SetDataBinding() 'OcultaColums() C1TrueDBGrid1.DataSource = Nothing Dim conts = C1TrueDBGrid1.RowCount 'If clCmp.ds.Tables(0).Rows.Count <> 0 Then C1TrueDBGrid1.SetDataBinding(clCmp.ds, "Tabla") Me.C1TrueDBGrid1.Columns(2).GroupInfo.ColumnVisible = True Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy Me.C1TrueDBGrid1.Splits(0).DisplayColumns(7).Visible = False Me.C1TrueDBGrid1.Splits(0).DisplayColumns(2).Visible = False Me.C1TrueDBGrid1.Splits(0).DisplayColumns(28).Visible = False Me.C1TrueDBGrid1.Splits(0).DisplayColumns(4).Visible = False Me.C1TrueDBGrid1.Splits(0).DisplayColumns(6).Visible = False Me.C1TrueDBGrid1.Splits(0).DisplayColumns(36).Visible = False 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns("idCuenta").Visible = False Me.C1TrueDBGrid1.Columns(15).NumberFormat = "Currency" Me.C1TrueDBGrid1.Columns(14).NumberFormat = "Currency" Me.C1TrueDBGrid1.Columns(26).NumberFormat = "Currency" Me.C1TrueDBGrid1.Columns(25).NumberFormat = "Currency" Me.C1TrueDBGrid1.Splits(0).DisplayColumns(6).FetchStyle = True Me.C1TrueDBGrid1.Splits(0).DisplayColumns(6).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center '-- los datos de la columna de si es hostorico el dato los coloca en ROJO 'REVISAR CAMPOS 02 /07 / 2015 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.ForeColor = Color.Red 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns("Historico").Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns("Historico").Width = 30 'Me.C1TrueDBGrid1.Visible = True 'Me.C1TrueDBGrid1.Columns(2).GroupInfo.ColumnVisible = True 'Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy ' ''Establece el ancho de las columnas CuentaOrigen y CuentaDestino 200. 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns("CuentaOrigen").Width = 200 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns("CuentaDestino").Width = 200 ''fin de establecer el ancho de la última columna C1TrueDBGrid1.FilterBar = True Dim Cont As Integer Cont = clCmp.ds.Tables(0).Rows.Count 'LblNumReg.Text = "Elementos: " & Cont LblNumReg.Text = "Elementos: " & Me.C1TrueDBGrid1.RowCount lblPeriodoHist.Text = "Botón derecho del mouse sobre el registro a calificar." ''Coloca los colorines 'REVISAR CAMPOS 02 /07 / 2015 'Me.C1TrueDBGrid1.Splits(0).DisplayColumns("ReportadoPor").FetchStyle = True ''Activa el evento C1TrueDBGrid1_FetchCellStyle ''Fin de cambiar el color. 'End If Catch er As Exception MessageBox.Show(er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub refrescar() 'Combo cliente Me.cmbCliente.SelectedIndex = -1 Me.cmbCliente.SelectedIndex = -1 'Combo Cuenta Me.cmbCuenta.SelectedIndex = -1 Me.cmbCuenta.SelectedIndex = -1 cmbCuenta.SelectedValue = 0 cmbCuenta.Text = "" 'combo patron Me.cmbPatron.SelectedIndex = -1 Me.cmbPatron.SelectedIndex = -1 'combo Estatus Me.cmbStatus.SelectedIndex = -1 Me.cmbStatus.SelectedIndex = -1 'Grid 'Me.C1TrueDBGrid1.Visible = False Me.C1TrueDBGrid1.DataSource = Nothing ' Me.C1TrueDBGrid1.DataBindings.Clear() 'etiqueta Me.LblNumReg.Text = "" 'Establece las banderas a false para q sepuedan cargar los combos otra vez BanCliente = False BanCuenta = False BanPatron = False BanStatus = False End Sub Private Sub Exportar() If C1TrueDBGrid1.DataSource Is Nothing Then MessageBox.Show("Presione primero el botón de consultar y despues el boton de exportar.", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Return End If ''Preparo la tabla a exportar Dim copyDS As DataSet = clCmp.ds.Copy() If copyDS.Tables(0).Rows.Count = 0 Then MessageBox.Show("No existen datos para exportar", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Return End If Dim Resul As DialogResult Resul = MessageBox.Show("Este proceso puede tardar varios minutos, ¿Deseas continuar? ", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Resul = DialogResult.No Then Return End If ''Quito las columnas ocultas del grid. Dim i As Integer For i = 0 To C1TrueDBGrid1.Columns.Count - 1 If Me.C1TrueDBGrid1.Splits(0).DisplayColumns(i).Visible = False Then Dim j As Integer For j = 0 To copyDS.Tables(0).Columns.Count - 1 If Me.C1TrueDBGrid1.Splits(0).DisplayColumns(i).Name = copyDS.Tables(0).Columns.Item(j).ColumnName Then copyDS.Tables(0).Columns.Remove(copyDS.Tables(0).Columns.Item(j).ColumnName) Exit For End If Next End If Next Dim MiClassTablaAExcel As New ClassTablaAExcel() Try Cursor = System.Windows.Forms.Cursors.WaitCursor Dim sError As String = "" ''Inicia Exportacion 'Creo una instancia de la clase aExcel Dim clsExcel As aExcel = New aExcel 'Obtenemos el nombre o el titulo del form clsExcel.Titulo = "Historico Alarmas BT" 'Utilizo la funcion ExportDataset de la clase aExcel clsExcel.ExportDataset(copyDS) 'Asigno el dataset a exportar Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try Cursor = System.Windows.Forms.Cursors.Default End Sub Private Sub OcultaColums() Try If clCmp.ds.Tables.Count <> 0 Then clCmp.OcultarColumna("IdTransaccion") clCmp.OcultarColumna("IdProducto") clCmp.OcultarColumna("IdSubproducto") clCmp.OcultarColumna("IdPatron") clCmp.OcultarColumna("IdEstatusTransaccion") clCmp.OcultarColumna("idCuenta") End If Catch er As Exception ' MessageBox.Show(er.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Function fsDefineSQL(ByVal SP As String) As String 'Defino mi cadena para el procedimiento almacenado Try Dim lsSQL As String = "" Dim _Opcion As Integer Dim lsIni As String = " NULL," Dim lsFin As String = " NULL" Dim lsCliente As String = " NULL, " Dim lsCuenta As String = " NULL, " Dim lsPatron As String = " NULL, " Dim lsEstatus As String = " NULL, " Dim Classcom As New clsComplejo Dim FchIni As Date Dim meses As Integer ' ************ Fechas Periodo**************** lsIni = dtpFechaInicio.Value.ToString("yyyy/MM/dd") lsIni = " '" & lsIni & "', " lsFin = dtpFechaFin.Value.ToString("yyyy/MM/dd") lsFin = "'" & lsFin & "'" '******************************************************************************* If Me.cmbCliente.Text <> "" And Me.cmbCuenta.Text = "" Then '-- se agrego esta opcion para que traiga todas las cuentas de un cliente '-- c. clain 12/mar/2013 _Opcion = 9 lsCliente = CInt(Me.cmbCliente.SelectedValue) & ", " lsCuenta = " NULL, " If Me.cmbPatron.SelectedIndex = -1 Then lsPatron = " NULL, " Else lsPatron = CInt(Me.cmbPatron.SelectedValue) & ", " End If If Me.cmbStatus.SelectedIndex = -1 Then lsEstatus = " NULL, " Else lsEstatus = CInt(Me.cmbStatus.SelectedValue) & "," End If Else '******************************************************************************************** If Me.cmbCliente.Text = "" And Me.cmbPatron.Text = "" And Me.cmbStatus.Text = "" Then _Opcion = 1 ElseIf Me.cmbCliente.Text = "" And Me.cmbPatron.Text = "" And Me.cmbStatus.Text <> "" Then _Opcion = 2 lsEstatus = CInt(Me.cmbStatus.SelectedValue) ElseIf Me.cmbCliente.Text = "" And Me.cmbPatron.Text <> "" And Me.cmbStatus.Text = "" Then _Opcion = 3 lsPatron = CInt(Me.cmbPatron.SelectedValue) & ", " ElseIf Me.cmbCliente.Text = "" And Me.cmbPatron.Text <> "" And Me.cmbStatus.Text <> "" Then _Opcion = 4 lsEstatus = CInt(Me.cmbStatus.SelectedValue) lsPatron = CInt(Me.cmbPatron.SelectedValue) & "," ElseIf Me.cmbCliente.Text <> "" And Me.cmbCuenta.Text <> "" And Me.cmbPatron.Text = "" And Me.cmbStatus.Text = "" Then _Opcion = 5 lsCliente = CInt(Me.cmbCliente.SelectedValue) & ", " lsCuenta = "" & CStr(Me.cmbCuenta.SelectedValue) & "," ElseIf Me.cmbCliente.Text <> "" And Me.cmbCuenta.Text <> "" And Me.cmbPatron.Text = "" And Me.cmbStatus.Text <> "" Then _Opcion = 6 lsCliente = CInt(Me.cmbCliente.SelectedValue) & ", " lsCuenta = "" & CStr(Me.cmbCuenta.SelectedValue) & ", " lsEstatus = CInt(Me.cmbStatus.SelectedValue) ElseIf Me.cmbCliente.Text <> "" And Me.cmbCuenta.Text <> "" And Me.cmbPatron.Text <> "" And Me.cmbStatus.Text = "" Then _Opcion = 7 lsCliente = CInt(Me.cmbCliente.SelectedValue) & ", " lsCuenta = "" & CStr(Me.cmbCuenta.SelectedValue) & ", " lsPatron = CInt(Me.cmbPatron.SelectedValue) & ", " ElseIf Me.cmbCliente.Text <> "" And Me.cmbCuenta.Text <> "" And Me.cmbPatron.Text <> "" And Me.cmbStatus.Text <> "" Then _Opcion = 8 lsCliente = CInt(Me.cmbCliente.SelectedValue) & ", " lsCuenta = "" & CStr(Me.cmbCuenta.SelectedValue) & "," lsPatron = CInt(Me.cmbPatron.SelectedValue) & ", " lsEstatus = CInt(Me.cmbStatus.SelectedValue) & "," End If End If lsSQL = "" lsSQL = lsSQL & SP lsSQL = lsSQL & lsPatron lsSQL = lsSQL & lsCliente lsSQL = lsSQL & lsCuenta lsSQL = lsSQL & lsEstatus lsSQL = lsSQL & lsIni lsSQL = lsSQL & lsFin '-- asigna valores a variables globales para en caso de que consulte el detalle '-- del historico clsVaribles.Finicio = dtpFechaInicio.Value.ToString() '-- FchIni '--lsIni clsVaribles.Ffin = dtpFechaFin.Value.ToString() ' '--lsFin '--- Return lsSQL Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Function Private Sub frmHistoricoAlarmas_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load BanCliente = False BanCuenta = False BanPatron = False BanStatus = False Cliente.sbLlenaCombo("spLlenaComboCliente " & clsVaribles.liPerfilB, Me.cmbCliente) ' ClsVaribles cmbCliente.SelectedIndex = -1 Estatus.sbLlenaCombo("spLlenaComboEstatusTransacciones", Me.cmbStatus) cmbStatus.SelectedIndex = -1 'Patron.sbLlenaCombo("spLlenaComboPatron 6", Me.cmbPatron) Patron.sbLlenaCombo("sp_ConsultaPatrones", Me.cmbPatron) ''Patron.sbLlenaCombo("spLlenaComboPatron 'BANCATRADICIONAL'", Me.cmbPatron) cmbPatron.SelectedIndex = -1 cmbCuenta.SelectedIndex = -1 cmbCuenta.SelectedValue = 0 cmbCuenta.Text = "" End Sub Private Sub C1TrueDBGrid1_AfterFilter(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FilterEventArgs) Handles C1TrueDBGrid1.AfterFilter LblNumReg.Text = "Elementos: " & Me.C1TrueDBGrid1.RowCount End Sub Private Sub C1TrueDBGrid1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C1TrueDBGrid1.Click End Sub Private Sub C1TrueDBGrid1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1TrueDBGrid1.DoubleClick Try Dim strHist As String Dim FilaActual As Integer FilaActual = Me.C1TrueDBGrid1.Row Dim fila As DataRow fila = clCmp.ds.Tables(0).Rows(FilaActual) clsVaribles.VarIdCliente = C1TrueDBGrid1.Columns("IdCliente").Text '-- los demas parametros no se envian ára que en la '-- consulta del detalle se despliegen todas las que tiene el cliente '-- en el periodo mencionado strHist = C1TrueDBGrid1.Columns(0).Text If strHist = "X" Then Dim frmDetalleHistorico As frmDetalleHistoricoBT = New frmDetalleHistoricoBT frmDetalleHistorico.Text = "Detalle Historico de Alarmas" frmDetalleHistorico.ShowDialog() 'refrescar() 'c1.BackColor = System.Drawing.Color.White sbBuscar() Else strHist = C1TrueDBGrid1.Columns(1).Text If C1TrueDBGrid1.Columns(1).Text <> "RELEVANTE" Then clsVar.ReportadoPor = C1TrueDBGrid1.Columns("ReportadoPor").Text clsVar.Nombre = C1TrueDBGrid1.Columns("NOMBRE DEL CLIENTE").Text clsVar.No_Referencia = C1TrueDBGrid1.Columns("NumeroReferencia").Text clsVar.Id_Transaccion = C1TrueDBGrid1.Columns("idtransaccion").Text clsVar.Id_Producto = C1TrueDBGrid1.Columns("IdProducto").Text clsVar.Id_SubProducto = C1TrueDBGrid1.Columns("IdSubproducto").Text clsVar.Id_Patron = C1TrueDBGrid1.Columns("IdPatron").Text clsVar.Id_EstatusTransaccion = C1TrueDBGrid1.Columns("IdEstatusTransaccion").Text Dim frmDetalles As Detalles = New Detalles frmDetalles.Text = "Detalle Crédito" frmDetalles.ShowDialog() 'refrescar() sbBuscar() End If End If Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub C1TrueDBGrid1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles C1TrueDBGrid1.FetchCellStyle Dim S As String = Me.C1TrueDBGrid1(e.Row, e.Col) If S = "RELEVANTE" Then e.CellStyle.BackColor = System.Drawing.Color.White e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PREOCUPANTE" Then e.CellStyle.BackColor = System.Drawing.Color.White e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PATRON MONTO" Then e.CellStyle.BackColor = System.Drawing.Color.Red e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON TRANSACCIONES X DIA" Then e.CellStyle.BackColor = System.Drawing.Color.Blue e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON FECHA" Then e.CellStyle.BackColor = System.Drawing.Color.Yellow e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PATRON MONTO KYC" Then e.CellStyle.BackColor = System.Drawing.Color.BlueViolet e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON FUNCIONARIO" Then e.CellStyle.BackColor = System.Drawing.Color.Pink e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PATRON GEOGRAFIA" Then e.CellStyle.BackColor = System.Drawing.Color.Maroon e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON HORA" Then e.CellStyle.BackColor = System.Drawing.Color.YellowGreen e.CellStyle.ForeColor = System.Drawing.Color.Black End If If Mid(S, 1, 19) = "ALARMADA POR PATRON" Then ''" DEPOSITANTE/BENEFICIARIO e.CellStyle.BackColor = System.Drawing.Color.Orange e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PATRON DISPERSION" Then e.CellStyle.BackColor = System.Drawing.Color.Turquoise e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PATRON POSICIONESCONTRARIAS" Then e.CellStyle.BackColor = System.Drawing.Color.Turquoise e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON POSICIONESCONTRARIAS" Then e.CellStyle.BackColor = System.Drawing.Color.Gray e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON ZERO BALANCE ACCOUNT" Then e.CellStyle.BackColor = System.Drawing.Color.DarkBlue e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON MONTO HISTORICO" Then e.CellStyle.BackColor = System.Drawing.Color.DarkCyan e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON DISPOSICION INMEDIATA" Then e.CellStyle.BackColor = System.Drawing.Color.IndianRed e.CellStyle.ForeColor = System.Drawing.Color.White End If If S = "PATRON NUEVAS INUSUAL" Then e.CellStyle.BackColor = System.Drawing.Color.White e.CellStyle.ForeColor = System.Drawing.Color.Black End If If S = "PATRON EXCEDENTE" Then e.CellStyle.BackColor = System.Drawing.Color.Olive e.CellStyle.ForeColor = System.Drawing.Color.White End If End Sub Private Sub C1TrueDBGrid1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TrueDBGrid1.MouseDown Dim iResp As Integer '-- pregunta si presiono el boton derecho del raton FilaActual = C1TrueDBGrid1.SelectedRows.IndexOf(0) If e.Button = Windows.Forms.MouseButtons.Right Then 'MsgBox("presiono boton derecho") '- indico cual fue la ultima linea donde se quedo FilaActual = Me.C1TrueDBGrid1.Row If Me.C1TrueDBGrid1.RowCount = 0 Then Exit Sub End If '-- pregunta si quiere calificar o mostrar el detalle de la historia iResp = MsgBox("¿Desea Calificar la Alarma?", MsgBoxStyle.YesNo, "MINDS CLIENTE 2.5") If iResp = vbYes Then Try Dim FilaActual As Integer FilaActual = Me.C1TrueDBGrid1.Row Dim fila As DataRow fila = clCmp.ds.Tables(0).Rows(FilaActual) clsVar.ReportadoPor = C1TrueDBGrid1.Columns("ReportadoPor").Text clsVar.Nombre = C1TrueDBGrid1.Columns("NOMBRE DEL CLIENTE").Text clsVar.No_Referencia = C1TrueDBGrid1.Columns("NumeroReferencia").Text clsVar.Id_Transaccion = C1TrueDBGrid1.Columns("idtransaccion").Text clsVar.Id_Producto = C1TrueDBGrid1.Columns("IdProducto").Text clsVar.Id_SubProducto = C1TrueDBGrid1.Columns("IdSubproducto").Text clsVar.Id_Patron = C1TrueDBGrid1.Columns("IdPatron").Text clsVar.Id_EstatusTransaccion = C1TrueDBGrid1.Columns("IdEstatusTransaccion").Text Dim frmDetalles As Detalles = New Detalles frmDetalles.Text = "Detalle Crédito" frmDetalles.ShowDialog() 'refrescar() sbBuscar() Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End If '-- refresca la ventana sbBuscar() End If End Sub Private Sub cmbCuenta_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbCuenta.DropDown ''Lena el combo de cuenta Dim cad As String Try If Me.cmbCliente.Text = "" Then Me.cmbCliente.Focus() MessageBox.Show("Debes de seleccionar un cliente ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) 'cad = "spLlenaComboCuenta " 'cad = cad & CInt(0) & ",2" 'Cuenta.sbLlenaCombo1(cad, Me.cmbCuenta) Else 'If BanCuenta = False Then 'cad = "spLlenaComboCuenta " cad = "sp_ConsultarCuenta " & cmbCliente.SelectedValue 'cad = cad & CInt(cmbCliente.SelectedValue) & ",2" Cuenta.sbLlenaCombo1(cad, Me.cmbCuenta) BanCuenta = True 'End If End If Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub C1TrueDBGrid1_ColResize(sender As System.Object, e As C1.Win.C1TrueDBGrid.ColResizeEventArgs) Handles C1TrueDBGrid1.ColResize Me.C1TrueDBGrid1.Splits(0).DisplayColumns(e.ColIndex).Width = Me.C1TrueDBGrid1.Splits(0).DisplayColumns(e.ColIndex).Width + 20 End Sub Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. End Sub End Class