private void Guardarbutton_Click(object sender, EventArgs e) { Facturas factura = GenericBLL.Buscar <Facturas>((int)IdnumericUpDown.Value); if (CanSave()) { if (factura == null) { if (GenericBLL.Guardar <Facturas>(LlenaClase(detalles))) { MessageBox.Show("Se guardo la factura"); Limpiar(); } else { MessageBox.Show("No se pudo guardar la factura"); } } else { if (GenericBLL.Modificar <Facturas>(LlenaClase(detalles))) { MessageBox.Show("Se modifico la factura"); Limpiar(); } else { MessageBox.Show("No se pudo modificar la factura"); } } } }
private void Guardarbutton_Click(object sender, EventArgs e) { Clientes c = GenericBLL.Buscar <Clientes>((int)ClienteIdnumericUpDown.Value); if (CanSave()) { if (c == null) { if (GenericBLL.Guardar <Clientes>(LlenaClase())) { MessageBox.Show("El cliente a sido registrado"); } else { MessageBox.Show("No se pudo registrar el cliente"); } } else { if (GenericBLL.Modificar <Clientes>(LlenaClase())) { MessageBox.Show("Se a modificado el este cliente"); } else { MessageBox.Show("El cliente no pudo ser modificado"); } } } }
private void Guardarbutton_Click(object sender, EventArgs e) { Transportes tr = GenericBLL.Buscar <Transportes>((int)TransporteIdnumericUpDown.Value); if (CanSave()) { if (tr == null) { if (GenericBLL.Guardar <Transportes>(LlenaClase())) { MessageBox.Show("Compañia de transporte registrado"); Limpiar(); } else { MessageBox.Show("No se pudo registrar la compañia transportista"); } } else { if (GenericBLL.Guardar <Transportes>(LlenaClase())) { MessageBox.Show("Se modifico la compañia transportista"); Limpiar(); } else { MessageBox.Show("No se pudo modificar la compañia transportista"); } } } }
private void Guardarbutton_Click(object sender, EventArgs e) { Usuarios us = GenericBLL.Buscar <Usuarios>((int)UsuarioIdnumericUpDown.Value); if (CanSave()) { if (us == null) { if (GenericBLL.Guardar <Usuarios>(LlenaClase())) { MessageBox.Show("Usuario registrado"); Limpiar(); } else { MessageBox.Show("No se pudo registrar el usuario"); } } else { if (GenericBLL.Guardar <Usuarios>(LlenaClase())) { MessageBox.Show("Se modifico el usuario"); Limpiar(); } else { MessageBox.Show("No se pudo modificar el usuario"); } } } }
private void Guardarbutton_Click(object sender, EventArgs e) { Paquetes p = GenericBLL.Buscar <Paquetes>((int)PaqueteIdnumericUpDown.Value); if (CanSave()) { if (p == null) { if (GenericBLL.Guardar <Paquetes>(LlenaClase())) { MessageBox.Show("Paquete guardado"); Limpiar(); } else { MessageBox.Show("El paquete no pudo ser guardado"); } } else { if (GenericBLL.Modificar <Paquetes>(LlenaClase())) { MessageBox.Show("Se modifico el paquete"); Limpiar(); } else { MessageBox.Show("El paquete no pudo ser modificado"); } } } }
private void BuscarClientebutton_Click(object sender, EventArgs e) { Clientes cliente = GenericBLL.Buscar <Clientes>((int)ClienteIdnumericUpDown.Value); if (cliente != null) { ClienteNombretextBox.Text = cliente.Nombres; } }
private void Buscarbutton_Click(object sender, EventArgs e) { Facturas f = GenericBLL.Buscar <Facturas>((int)IdnumericUpDown.Value); if (f != null) { detalles = f.Detalles; ClienteIdnumericUpDown.Value = f.ClienteId; dataGridView.DataSource = detalles.ToList(); MontotextBox.Text = f.Monto.ToString(); } }
private void BuscarClientebutton_Click(object sender, EventArgs e) { Clientes c = GenericBLL.Buscar <Clientes>((int)ClienteIdnumericUpDown.Value); if (c != null) { ClienteNombrestextBox.Text = c.Nombres; } else { MessageBox.Show("Este cliente no existe"); } }
private void Buscarbutton_Click(object sender, EventArgs e) { UsuarioEmpleados us = GenericBLL.Buscar <UsuarioEmpleados>((int)IdnumericUpDown.Value); if (us != null) { UsuariotextBox.Text = us.Usuario; ClavetextBox.Text = us.Clave; } else { MessageBox.Show("Este usuario no existe"); } }
private void Buscarbutton_Click(object sender, EventArgs e) { Clientes c = GenericBLL.Buscar <Clientes>((int)ClienteIdnumericUpDown.Value); if (c != null) { NombrestextBox.Text = c.Nombres; EdadnumericUpDown.Value = c.Edad; SexocomboBox.SelectedIndex = (c.Sexo == 'M') ? 0 : 1; CiudadtextBox.Text = c.Ciudad; TelefonomaskedTextBox.Text = c.Telefono; CelularmaskedTextBox.Text = c.Celular; EmailtextBox.Text = c.Email; } }
private void Buscarbutton_Click(object sender, EventArgs e) { Transportes tr = GenericBLL.Buscar <Transportes>((int)TransporteIdnumericUpDown.Value); if (tr != null) { TransporteIdnumericUpDown.Value = tr.TransporteId; CompaniatextBox.Text = tr.Compania; TelefonomaskedTextBox.Text = tr.Telefono; } else { MessageBox.Show("Esta compañia transportist no existe"); } }
private void BuscarPaquetebutton_Click(object sender, EventArgs e) { Paquetes p = GenericBLL.Buscar <Paquetes>((int)PaqueteIdnumericUpDown.Value); if (p != null) { Clientes cliente = GenericBLL.Buscar <Clientes>(p.ClienteId); ClienteIdnumericUpDown.Value = cliente.ClienteId; ClienteNombretextBox.Text = cliente.Nombres; EstatuscomboBox.SelectedIndex = EstatuscomboBox.FindStringExact(p.Estado); TransportistacomboBox.SelectedIndex = p.TransporteId - 1; TrackingtextBox.Text = p.Tracking; ContenidotextBox.Text = p.Contenido; ProveedortextBox.Text = p.Proveedor; PesonumericUpDown.Value = (Decimal)p.Peso; } }
public void BuscarTest() { Assert.IsNotNull(GenericBLL.Buscar <Paquetes>(2)); }