예제 #1
0
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (validarId("Favor ingresar el id del usuario que desea buscar") && ValidarBuscar())
     {
         LLenar(BanquerasBLL.Buscar(RU.StringToInt(banqueraIdTextBox.Text)));
     }
 }
 private void Cargar()
 {
     FiltrocomboBox.Items.Insert(0, "ID");
     FiltrocomboBox.Items.Insert(1, "Apellido");
     FiltrocomboBox.Items.Insert(2, "Fecha");
     FiltrocomboBox.DataSource        = FiltrocomboBox.Items;
     FiltrocomboBox.DisplayMember     = "ID";
     BanquerasdataGridView.DataSource = BanquerasBLL.GetLista();
 }
예제 #3
0
 private bool ValidarExiste(string aux)
 {
     if (BanquerasBLL.GetListaCedula(aux).Count() > 0)
     {
         MessageBox.Show("Esta banquera ya esta registrada." + "\n" + "\n" + "Verifique que todos los datos estan ingresados correcatamente..");
         return(false);
     }
     return(true);
 }
예제 #4
0
 private void Deletebutton_Click_1(object sender, EventArgs e)
 {
     if (validarId("Favor digitar el id de la banquera que desea eliminar") && ValidarBuscar())
     {
         BanquerasBLL.Eliminar(RU.StringToInt(banqueraIdTextBox.Text));
         limpiarErrores();
         limpiar();
         MessageBox.Show("ELiminado con exito");
     }
 }
예제 #5
0
        private bool ValidarBuscar()
        {
            if (BanquerasBLL.Buscar(RU.StringToInt(banqueraIdTextBox.Text)) == null)
            {
                MessageBox.Show("Este registro no existe");
                return(false);
            }

            return(true);
        }
 private void BuscarSeleccion()
 {
     if (FiltrocomboBox.SelectedIndex == 0)
     {
         BanquerasdataGridView.DataSource = BanquerasBLL.GetListaId(StringToInt(FiltrotextBox.Text));
     }
     if (FiltrocomboBox.SelectedIndex == 1)
     {
         BanquerasdataGridView.DataSource = BanquerasBLL.GetListaApellido(FiltrotextBox.Text);
     }
 }
예제 #7
0
 private void SaveButton_Click_1(object sender, EventArgs e)
 {
     BuscarerrorProvider.Clear();
     LlenarClase(banquera);
     if (ValidarTextbox() && ValidarExiste(cedulaMaskedTextBox.Text))
     {
         BanquerasBLL.Insertar(banquera);
         limpiar();
         limpiarErrores();
         MessageBox.Show("Guardado con exito");
     }
 }
예제 #8
0
 private void UpdateButton_Click(object sender, EventArgs e)
 {
     if (validarId("Favor Buscar la banquera que desea actualizar") && ValidarTextbox() && ValidarExiste(cedulaMaskedTextBox.Text))
     {
         LlenarClase(banquera);
         if (ValidarExiste(cedulaMaskedTextBox.Text))
         {
             BanquerasBLL.Actualizar(RU.StringToInt(banqueraIdTextBox.Text), banquera);
             limpiar();
             limpiarErrores();
             MessageBox.Show("Actualizado con exito");
         }
     }
 }
        private void Imprimebutton_Click(object sender, EventArgs e)
        {
            ReportingViewerBanqueras viewer = new ReportingViewerBanqueras();

            viewer.RptViewer.Reset();
            viewer.RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

            viewer.RptViewer.LocalReport.ReportPath = @"C:\Users\Henry O\Source\Repos\AlmacenTech2\AlmacenTech\AlmacenTech\Reportes\ListadoBanqueras.rdlc";

            viewer.RptViewer.LocalReport.DataSources.Clear();


            viewer.RptViewer.LocalReport.DataSources.Add(
                new ReportDataSource("BanquerasDataSet",
                                     BanquerasBLL.GetLista()));

            viewer.RptViewer.LocalReport.Refresh();

            viewer.Show();
        }
        private bool validar()
        {
            if (string.IsNullOrEmpty(FiltrotextBox.Text))
            {
                BuscarerrorProvider.SetError(FiltrotextBox, "Ingresar el campo que desea filtar");
                return(false);
            }
            if (FiltrocomboBox.SelectedIndex == 1 && BanquerasBLL.GetListaApellido(FiltrotextBox.Text).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }

            if (FiltrocomboBox.SelectedIndex == 0 && BanquerasBLL.GetListaId(StringToInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }

            BuscarerrorProvider.Clear();

            return(true);
        }