private void BtnBuscar_Click(object sender, RoutedEventArgs e) { if (txtRut.Text == string.Empty) { ListaClientes list = new ListaClientes(); list.Show(); } else { Cliente clie = new Cliente() { RutCliente = txtRut.Text }; if (clie.Read()) { txtRut.Text = clie.RutCliente; txtNombre.Text = clie.NombreContacto; txtDireccion.Text = clie.Direccion; txtMail.Text = clie.MailContacto; txtRazonSocial.Text = clie.RazonSocial; txtTelefono.Text = clie.Telefono; cbxActividad.SelectedValue = clie.IdActividadEmpresa; cbxTipoemp.SelectedValue = clie.IdTipoEmpresa; } else { MessageBox.Show("Rut de cliente no existe :(", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private void BtnListaClientes_Click(object sender, RoutedEventArgs e) { ListaClientes list = new ListaClientes() { Owner = this }; list.ShowDialog(); }
private void BtnBuscarrut_Click(object sender, RoutedEventArgs e) { if (txtRutClie.Text == string.Empty) { ListaClientes list = new ListaClientes(); list.ShowDialog(); } else { Cliente clie = new Cliente() { RutCliente = txtRutClie.Text }; if (clie.Read()) { txtRutClie.Text = clie.RutCliente; txtRazonSocial.Text = clie.RazonSocial; } else { MessageBox.Show("Rut de cliente no existe :(", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ListaCliente = ((OnBreak1._1.ListaClientes)(target)); return; case 2: this.btnmenuprinc = ((System.Windows.Controls.Button)(target)); #line 16 "..\..\ListaClientes.xaml" this.btnmenuprinc.Click += new System.Windows.RoutedEventHandler(this.Btnmenuprinc_Click); #line default #line hidden return; case 3: this.imgMenuPrinc = ((System.Windows.Controls.Image)(target)); return; case 4: this.btnBuscadorRut = ((System.Windows.Controls.Button)(target)); #line 26 "..\..\ListaClientes.xaml" this.btnBuscadorRut.Click += new System.Windows.RoutedEventHandler(this.BtnBuscadorRut_Click); #line default #line hidden return; case 5: this.imgBuscador = ((System.Windows.Controls.Image)(target)); return; case 6: this.btnFiltrarporte = ((System.Windows.Controls.Button)(target)); #line 38 "..\..\ListaClientes.xaml" this.btnFiltrarporte.Click += new System.Windows.RoutedEventHandler(this.BtnFiltrarporte_Click); #line default #line hidden return; case 7: this.imgBuscadorte = ((System.Windows.Controls.Image)(target)); return; case 8: this.btnFiltrarporAct = ((System.Windows.Controls.Button)(target)); #line 50 "..\..\ListaClientes.xaml" this.btnFiltrarporAct.Click += new System.Windows.RoutedEventHandler(this.BtnFiltrarporAct_Click); #line default #line hidden return; case 9: this.imgBuscadoract = ((System.Windows.Controls.Image)(target)); return; case 10: this.btnQuitarfiltro = ((System.Windows.Controls.Button)(target)); #line 62 "..\..\ListaClientes.xaml" this.btnQuitarfiltro.Click += new System.Windows.RoutedEventHandler(this.BtnQuitarfiltro_Click); #line default #line hidden return; case 11: this.txtBuscador = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.cbxlistTipoEmp = ((System.Windows.Controls.ComboBox)(target)); return; case 13: this.cbxListAct = ((System.Windows.Controls.ComboBox)(target)); return; case 14: this.dtgClientes = ((System.Windows.Controls.DataGrid)(target)); return; case 15: this.dtgRutclie = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 16: this.dtgRazonsocial = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 17: this.dtgNombreCont = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 18: this.dtgMail = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 19: this.dtgDireccion = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 20: this.dtgTelefono = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 21: this.dtgActividad = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 22: this.dtgTipoEmp = ((System.Windows.Controls.DataGridTextColumn)(target)); return; } this._contentLoaded = true; }