コード例 #1
0
ファイル: ABM_Productos.cs プロジェクト: Agushadad/PAV1
 private void btn_ConsultarProducto_Click(object sender, EventArgs e)
 {
     if (chk_ActivosProducto.Checked == true && chk_InacctivosProducto.Checked == true)
     {
         Cargar_Grilla(producto.Todos_Los_Productos());
         return;
     }
     if (chk_ActivosProducto.Checked == true)
     {
         Cargar_Grilla(producto.Productos_Activos());
         return;
     }
     if (chk_InacctivosProducto.Checked == true)
     {
         Cargar_Grilla(producto.Productos_Inactivos());
         return;
     }
     if (txt_IdProducto.Text == "" && txt_NombreProducto.Text == "" && txt_TipoProducto.Text == "")
     {
         MessageBox.Show("No hay restricciones para realizar la búsqueda");
         return;
     }
     if (txt_IdProducto.Text != "" || txt_NombreProducto.Text != "" || txt_TipoProducto.Text != "")
     {
         Cargar_Grilla(producto.Buscar_Producto(txt_IdProducto.Text, txt_NombreProducto.Text, txt_TipoProducto.Text));
     }
 }