Пример #1
0
 void limpiarForm()
 {
     Cbo_proveedor.Items.Clear();
     Cbo_proveedor.Text = "";
     TxtDescripcionProducto.Clear();
     Txt_codigoProducto.Clear();
     Txt_nombreProducto.Clear();
     Txt_total.Clear();
     dgv_ordenCompra.Rows.Clear();
     llenarComboBox();
     obtenerNumeroOrdenCompra();
 }
Пример #2
0
 private void Btn_eliminarProducto_Click(object sender, EventArgs e)
 {
     if (dgv_ordenCompra.Rows.Count > 0)
     {
         dgv_ordenCompra.Rows.Remove(dgv_ordenCompra.Rows[numeroFila]);
         MessageBox.Show("Producto eliminado");
         actualizarTotal();
     }
     else
     {
         MessageBox.Show("La tabla de productos para la orden de compra se encuentra vacia");
     }
     if (dgv_ordenCompra.Rows.Count == 0)
     {
         Txt_total.Clear();
     }
 }
 private void Btn_cancelarlista_Click(object sender, EventArgs e)
 {
     //Aparezca el primer submenu
     Gpb_accion.Visible         = true;
     Gpb_accion.Enabled         = true;
     Btn_ModificarLista.Visible = true;
     Btn_ModificarLista.Enabled = true;
     Gpb_producto.Visible       = false;
     Gpb_accion2.Visible        = false;
     Gpb_costolista.Visible     = false;
     Gpb_lista.Visible          = false;
     Txt_nombreproducto.Text    = "";
     Txt_descuento.Text         = "";
     Dtp_fechainicio.ResetText();
     TxtTipoLista2.Visible    = false;
     Txt_FechaInicio2.Enabled = false;
     TxtTipoLista2.Enabled    = false;
     Txt_FechaInicio2.Visible = false;
     Dtp_fechamodificacion.ResetText();
     Cbo_NombreLista.Items.Clear();
     Txt_NombreLista.Text = "";
     Txt_NombreLista.Clear();
     Txt_descuento.Clear();
     Txt_FechaInicio.Clear();
     TxtTipoLista2.Clear();
     Txt_FechaInicio2.Clear();
     Txt_nombreproducto.Clear();
     Txt_subtotal.Clear();
     Txt_TipoLista.Clear();
     Txt_total.Clear();
     Cbo_codigoproducto.Items.Clear();
     Cbo_NombreLista.Items.Clear();
     Cbo_tipolista.Items.Clear();
     Btn_CrearLista.Enabled = true;
     Btn_CrearLista.Visible = true;
 }