private void btModify_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txbCode.Text) || string.IsNullOrEmpty(txbDesc.Text) || string.IsNullOrEmpty(txtbPrice.Text) || string.IsNullOrEmpty(txbQuantity.Text))
     {
         MessageBox.Show("Verificar que no exista un espacio en blanco");
         return;
     }
     try
     {
         if (txbDesc.Text != "" && txtbPrice.Text != "" && txbQuantity.Text != "")
         {
             metodos.ActualizarProducto(txbCode.Text, txbDesc.Text, txtbPrice.Text, txbQuantity.Text);
             this.Visible = false;
             MantenimientoProductos mantP = new MantenimientoProductos();
             mantP.Show();
         }
         else
         {
             label1.Text = "Debe De Llenar Todas las Casillas";
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Valores Invalidos");
     }
 }
 private void btInsert_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txbCode.Text) || String.IsNullOrEmpty(txbDesc.Text) || String.IsNullOrEmpty(txbPrice.Text) ||
         String.IsNullOrEmpty(txbQuantity.Text))
     {
         MessageBox.Show("Verificar que no exista un espacio en blanco");
         return;
     }
     try
     {
         if (txbCode.Text != "" & txbDesc.Text != "" & txbPrice.Text != "" & txbQuantity.Text != "")
         {
             if (metodos.ProductoExistencteFisicoSinError(txbCode.Text))
             {
                 metodos.InsertarProducto(txbCode.Text, txbDesc.Text, txbPrice.Text, txbQuantity.Text);
                 this.Visible = false;
                 MantenimientoProductos mantP = new MantenimientoProductos();
                 mantP.Show();
             }
             else
             {
                 metodos.ActualizarProducto(txbCode.Text, txbDesc.Text, txbPrice.Text, txbQuantity.Text);
                 this.Visible = false;
                 MantenimientoProductos mantP = new MantenimientoProductos();
                 mantP.Show();
             }
         }
         else
         {
             label1.Text = "Debe de Llenar Todos los Espacios";
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Valores Invalidos");
     }
 }