示例#1
0
 private void BtnCancelar_Click(object sender, EventArgs e)
 {
     TxtCantidad.Clear();
     TxtPrecio.Clear();
     TxtTotal.Clear();
     TxtCantidad.Focus();
 }
示例#2
0
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            int suma = 0;

            if (CmbProveedor.Text != "" && CmbNombreProveedor.Text != "" && TxtCodigo.Text != "" && TxtNombre.Text != "" && TxtCantidad.Text != "" && TxtStock.Text != "")
            {
                ClsEProductos Eobj = new ClsEProductos();
                ClsNProductos Nobj = new ClsNProductos();
                Eobj.codprod = TxtCodigo.Text;
                suma         = Convert.ToInt32(TxtCantidad.Text) + Convert.ToInt32(TxtStock.Text);
                if (suma > 99999)
                {
                    MessageBox.Show("La suma supera el stock maximo", "Mensaje");
                }
                else
                {
                    Eobj.cantprod = suma;
                    Nobj.MtdActualizarStockProductos(Eobj);
                    DgvProductos.DataSource = Nobj.MtdListarProductos();

                    TxtCodigo.Clear();
                    TxtNombre.Clear();
                    TxtCantidad.Clear();
                    TxtStock.Clear();
                    TxtBuscar.Clear();
                    CmbNombreProveedor.Text = "";
                    CmbProveedor.Text       = "";
                }
            }
            else
            {
                MessageBox.Show("Por favor llene todos los campos", "Mensaje");
            }
        }
示例#3
0
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Cantidad");
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Precio");
                TxtPrecio.Focus();
                return;
            }
            double c, p, subt, t, tp;

            c = Convert.ToDouble(TxtCantidad.Text);
            p = Convert.ToDouble(TxtPrecio.Text);
            if (c >= 3)
            {
                t                   = c * p;
                subt                = (c * p) * 0.20;
                tp                  = t - subt;
                TxtSubtotal.Text    = subt.ToString();
                TxtTotalaPagar.Text = tp.ToString();
            }
            else
            {
                t                   = c * p;
                subt                = (c * p) * 0.20;
                tp                  = t - subt;
                TxtSubtotal.Text    = subt.ToString();
                TxtTotalaPagar.Text = tp.ToString();
            }
        }
        private void BtnQuitar_Click(object sender, EventArgs e)
        {
            String  Cla     = TxtCc.Text;
            Cliente cliente = new Armeria.Cliente();

            if (cliente.bajaCliente(Cla, 2))
            {
                MessageBox.Show("Producto Eliminado Correctamente");
            }
            else
            {
                MessageBox.Show("Producto Eliminado Correctamente");
            }


            TxtCc.Clear();
            TxtNombre.Clear();
            TxtDescripcion.Clear();
            TxtCantidad.Clear();
            TxtValor.Clear();
            PbArma.ImageLocation = null;
            //ArchivoTexto archivotexto = new ArchivoTexto();
            //archivotexto.Leer(2);
            //ArchivoBinario archivobinario = new ArchivoBinario();
            //archivobinario.Leer(2);
        }
        private void BtnModificar_Click(object sender, EventArgs e)
        {
            if (TxtCodigo.Text != "" && TxtNombre.Text != "" && TxtCantidad.Text != "" && TxtPrecio.Text != "" && CmbPlataforma.Text != "" && CmbGenero.Text != "")
            {
                ClsEProductos Eobj = new ClsEProductos();
                ClsNProductos Nobj = new ClsNProductos();
                Eobj.codprod  = TxtCodigo.Text;
                Eobj.nomprod  = TxtNombre.Text;
                Eobj.cantprod = Convert.ToInt32(TxtCantidad.Text);
                Eobj.preprod  = Convert.ToInt32(TxtPrecio.Text);
                Eobj.codplat  = CmbPlataforma.Text;
                Eobj.codgen   = CmbGenero.Text;
                Nobj.MtdActualizarProductos(Eobj);
                DgvProductos.DataSource = Nobj.MtdListarProductos();

                TxtCodigo.Enabled = true;
                TxtCodigo.Clear();
                TxtNombre.Clear();
                TxtCantidad.Clear();
                TxtPrecio.Clear();
                CmbPlataforma.Text       = "";
                CmbGenero.Text           = "";
                CmbNombreGenero.Text     = "";
                CmbNombrePlataforma.Text = "";
            }
            else
            {
                MessageBox.Show("Por favor llene todos los campos", "Mensaje");
            }
        }
 private void BtnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         if (TxtCc.Text != "" && TxtNombre.Text != "" && TxtDescripcion.Text != "" && TxtCantidad.Text != "" && TxtValor.Text != "" && PbArma.ImageLocation != null)
         {
             Cliente cliente = new Cliente();
             cliente.Guardar(TxtCc.Text, TxtNombre.Text, TxtDescripcion.Text, TxtCantidad.Text, TxtValor.Text, PbArma.ImageLocation);
             MessageBox.Show("Producto Agregado Correctamente");
             TxtCc.Clear();
             TxtNombre.Clear();
             TxtDescripcion.Clear();
             TxtCantidad.Clear();
             TxtValor.Clear();
             PbArma.ImageLocation = null;
         }
         else
         {
             if (PbArma.ImageLocation != null)
             {
                 MessageBox.Show("Todos los Campos deben ser llenados para poder agregar un producto");
             }
             else
             {
                 MessageBox.Show("Todos los Campos deben ser llenados para poder agregar un producto y La imagen debe ser cargada");
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error: " + ex);
     }
 }
        private void BtnQuitar_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.dgvDetalleF.Rows.Count > 0)
                {
                    if (MessageBox.Show("¿Desea quitar este registro de la lista? ", "Quitar Concepto de lista", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        dgvDetalleF.Rows.RemoveAt(dgvDetalleF.CurrentRow.Index);
                        double can = 0.00;
                        double it  = 0.00;
                        foreach (DataGridViewRow row in dgvDetalleF.Rows)
                        {
                            can += Convert.ToDouble(row.Cells["Precio_Producto"].Value);
                            it  += Convert.ToDouble(row.Cells["Generales"].Value);
                        }
                        double t = can + it;
                        LblTotaApagar.Text = t.ToString();
                        TxtCantidad.Clear();
                        TxtProducto.Clear();
                    }
                }
                else
                {
                    MessageBox.Show("Debe seleccionar un registro de la lista", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }

            catch (Exception)
            {
                throw;
            }
        }
示例#8
0
 private void BtnLimpiar_Click(object sender, EventArgs e)
 {
     TxtCantidad.Clear();
     TxtPrecio.Clear();
     TxtSubtotal.Clear();
     TxtTotalaPagar.Clear();
 }
        private void BtnBuscar_Click(object sender, EventArgs e)
        {
            FrmBuscarProducto frm = new FrmBuscarProducto();

            frm.Productoenviado += new FrmBuscarProducto.enviar(enviarProducto);
            frm.ShowDialog();
            TxtCantidad.Clear();
        }
        private void BtnLimpiar_Click(object sender, EventArgs e)
        {
            foreach (TextBox Txt in this.Controls.OfType <TextBox>())
            {
                Txt.Clear();

                TxtCantidad.Focus();
            }
        }
 private void TxtCantidad_TextChanged(object sender, EventArgs e)
 {
     if (TxtCantidad.Text.Trim().Length > 0)
     {
         POO.AlertNotNumber(TxtCantidad.Text.Trim());
         TxtCantidad.Focus();
         return;
     }
 }
示例#12
0
        private void btnProductos_Click(object sender, EventArgs e)
        {
            ConsultarProductos ConPro = new ConsultarProductos();

            ConPro.ShowDialog();

            txtCodigoPro.Text   = ConPro.dataGridView1.Rows[ConPro.dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();
            TxtDescripcion.Text = ConPro.dataGridView1.Rows[ConPro.dataGridView1.CurrentRow.Index].Cells[1].Value.ToString();
            TxtPrecio.Text      = ConPro.dataGridView1.Rows[ConPro.dataGridView1.CurrentRow.Index].Cells[2].Value.ToString();
            TxtCantidad.Focus();
        }
示例#13
0
        private bool ValidarValorVariables()
        {
            if (PrecioCompra == 0)
            {
                Soporte.MsgError("Ingrese el precio de compra del articulo");
                TxtPrecioCompra.Focus();
                return(false);
            }
            if (GananciaObtener == 0)
            {
                Soporte.MsgError("Ingrese el Saldo de Ganancia a Obtener");
                TxtGananciaObtener.Focus();
                return(false);
            }
            if (Cantidad == 0)
            {
                Soporte.MsgError("Capture la Cantidad de Artiulos que se ingresaran.");
                TxtCantidad.Focus();
                return(false);
            }


            if (Convert.ToInt32(CmbTipEntradas.SelectedValue) == 4)
            {
                if (MontoTotal == 0)
                {
                    Soporte.MsgError("Ingrese el Monto Total del Comprobante.");
                    TxtMontoTotal.Focus();
                    return(false);
                }
                if (TotalArticulos == 0)
                {
                    Soporte.MsgError("Ingrese la Cantidad total de Articulos del Comprobante.");
                    TxtTotalArticulos.Focus();
                    return(false);
                }

                if (NumeroComprobante == 0)
                {
                    Soporte.MsgError("Ingrese el Numero del Comprobante.");
                    TxtNumComprobante.Focus();
                    return(false);
                }
            }
            else
            {
            }



            return(true);
        }
 private void BtnNuevo_Click(object sender, EventArgs e)
 {
     TxtCodigo.Enabled   = true;
     TxtCantidad.Enabled = true;
     TxtCodigo.Clear();
     TxtNombre.Clear();
     TxtCantidad.Clear();
     TxtPrecio.Clear();
     CmbPlataforma.Text       = "";
     CmbGenero.Text           = "";
     CmbNombreGenero.Text     = "";
     CmbNombrePlataforma.Text = "";
 }
        private void LlenarDatosBusqueda()
        {
            DataGridViewRow row = DtgvListadoBusqueda.SelectedRows[0];

            _idProductoActivo    = Convert.ToInt64(row.Cells[0].Value);
            TxtCodigoBarras.Text = row.Cells[1].Value.ToString();
            TxtNombre.Text       = row.Cells[2].Value.ToString();
            TxtPrecio.Text       = row.Cells[3].Value.ToString();
            TxtCantidad.Text     = "1";

            TxtCantidad.Focus();
            PnlBusqueda.Visible = false;
        }
示例#16
0
        protected void BtnGuardar_Click(object sender, EventArgs e)
        {
            Solicitud sol = new Solicitud();

            sol.Monto_solicitado = float.Parse(TxtCantidad.Text);
            sol.Id_concepto      = int.Parse(DropIdConcepto.SelectedItem.Value.ToString());
            sol.Id_empleado      = int.Parse(DropIdEmpleado.SelectedItem.Value.ToString());
            sol.Id_caja          = int.Parse(DropIdCaja.SelectedItem.Value.ToString());

            ms.crearSolicitud(sol);

            TxtCantidad.Text = "";
            TxtCantidad.Focus();
        }
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            if (TxtCodigo.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Codigo Es Requerido.");
                TxtCodigo.Focus();
                return;
            }
            if (TxtProducto.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Decripción Es Requerido.");
                TxtProducto.Focus();
                return;
            }
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Cantidad Es Requerido.");
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecioU.Text.Trim().Length == 0)
            {
                POO.MsgWarning("El Campo Precio Unitario Es Requerido.");
                TxtPrecioU.Focus();
                return;
            }

            DataGridViewRow fila = new DataGridViewRow();

            fila.CreateCells(DgvFactura);
            fila.Cells[0].Value = TxtCodigo.Text.Trim();
            fila.Cells[1].Value = TxtProducto.Text.Trim();
            fila.Cells[2].Value = TxtCantidad.Text.Trim();
            fila.Cells[3].Value = TxtPrecioU.Text.Trim();

            double prec, cant;

            prec = Convert.ToDouble(TxtPrecioU.Text.Trim());
            cant = Convert.ToDouble(TxtCantidad.Text.Trim());

            fila.Cells[4].Value = POO.precU(prec, cant).ToString();

            DgvFactura.Rows.Add(fila);

            TxtCodigo.Clear();
            TxtProducto.Clear();
            TxtCantidad.Clear();
            TxtPrecioU.Clear();
            TxtCodigo.Focus();
        }
 private void BtnActualizar_Click(object sender, EventArgs e)
 {
     try
     {
         Cliente cliente = new Cliente();
         if (TxtCc.Text != "" && TxtNombre.Text != "" && TxtDescripcion.Text != "" && TxtCantidad.Text != "" && TxtValor.Text != "" && PbArma.ImageLocation != null)
         {
             String Cla   = TxtCc.Text;
             String datos = cliente.consultaCliente(Cla, 2);
             if (datos != null)
             {
                 string[] campos = datos.Split('|');
                 campos[0] = TxtCc.Text;
                 campos[1] = TxtNombre.Text;
                 campos[2] = TxtDescripcion.Text;
                 campos[3] = TxtCantidad.Text;
                 campos[4] = TxtValor.Text;
                 campos[5] = PbArma.ImageLocation;
                 cliente.bajaCliente(Cla, 2);
                 cliente.Guardar(campos[0], campos[1], campos[2], campos[3], campos[4], campos[5]);
                 MessageBox.Show("Datos Modificados Correctamente");
                 TxtCc.Clear();
                 TxtNombre.Clear();
                 TxtDescripcion.Clear();
                 TxtCantidad.Clear();
                 TxtValor.Clear();
                 PbArma.ImageLocation = null;
             }
             else
             {
                 MessageBox.Show("Dato no encontrado");
             }
         }
         else
         {
             if (PbArma.ImageLocation != null)
             {
                 MessageBox.Show("Todos los Campos deben ser llenados para poder Modificar un cliente");
             }
             else
             {
                 MessageBox.Show("Todos los Campos deben ser llenados para poder Modificar un cliente y La imagen debe ser cargada");
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error: " + ex);
     }
 }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            double cant, prec;

            cant = Convert.ToDouble(TxtCantidad.Text.Trim());
            prec = Convert.ToDouble(TxtPrecio.Text.Trim());

            tlp.totalp(cant, prec);

            foreach (TextBox txt in this.Controls.OfType <TextBox>())
            {
                txt.Clear();
                TxtCantidad.Focus();
            }
        }
示例#20
0
        //Boton Productos
        private void BtProductos_Click(object sender, EventArgs e)
        {
            ConsultarProducto consultarProducto = new ConsultarProducto();

            consultarProducto.ShowDialog();

            if (consultarProducto.DialogResult == DialogResult.OK)
            {
                TxtCodigoProducto.Text = consultarProducto.dataGridView1.Rows[consultarProducto.dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();
                TxtDescripcion.Text    = consultarProducto.dataGridView1.Rows[consultarProducto.dataGridView1.CurrentRow.Index].Cells[1].Value.ToString();
                TxtPrecio.Text         = consultarProducto.dataGridView1.Rows[consultarProducto.dataGridView1.CurrentRow.Index].Cells[2].Value.ToString();

                TxtCantidad.Focus();
            }
        }
        private void EditarProducto()
        {
            if (DtgvProductos.SelectedRows.Count != 1)
            {
                return;
            }
            _busquedaActiva = false;
            DataGridViewRow row = DtgvProductos.SelectedRows[0];

            _idProductoActivo    = Convert.ToInt64(row.Cells[0].Value);
            TxtCodigoBarras.Text = row.Cells[1].Value.ToString();
            TxtNombre.Text       = row.Cells[2].Value.ToString();
            TxtPrecio.Text       = row.Cells[3].Value.ToString();
            TxtCantidad.Text     = row.Cells[4].Value.ToString();

            TxtCantidad.Focus();
            EliminarProducto();
        }
示例#22
0
 private void DtvFactura_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (DtvFactura.SelectedRows.Count > 0)
     {
         V_PrecioProducto          = DtvFactura.CurrentRow.Cells["Precio"].Value.ToString();
         TxtCantidad.Text          = DtvFactura.CurrentRow.Cells["Cantidad"].Value.ToString();
         V_IDDetalleVenta          = DtvFactura.CurrentRow.Cells["ID_DetalleVenta"].Value.ToString();
         V_CantidadProductoDetalle = DtvFactura.CurrentRow.Cells["Cantidad"].Value.ToString();
         //V_IDProducto = DtvBusqueda.CurrentRow.Cells["ID_Producto"].Value.ToString();
         V_IDProductoDetalle = DtvFactura.CurrentRow.Cells["ID_Producto"].Value.ToString();
         V_IDProducto        = DtvFactura.CurrentRow.Cells["ID_Producto"].Value.ToString();
         MET_MostrarStock();
         //TxtCantidad.Text = DtvFactura.CurrentRow.Cells["Cantidad"].Value.ToString();
         TxtCantidad.Clear();
         TxtCantidad.Focus();
         LblErrorCantidad.Text        = "INTRODUZCA LA CANTIDAD";
         LblErrorCantidad.Visible     = true;
         BtnConfirmarCantidad.Visible = true;
     }
 }
示例#23
0
        protected void BtnGrabarPedido_Click(object sender, EventArgs e)
        {
            if (Session.Count == 0)
            {
                LblMensaje.Text = "Debe Acceder Cuenta con su Usuario y Contraseña";
                return;
            }
            if (TxtCantidad.Text.Trim() == "")
            {
                LblMensaje.Text = "Ingrese Cantidad";
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim() == "")
            {
                LblMensaje.Text = "Ingrese Precio";
                TxtPrecio.Focus();
                return;
            }

            GrabarCabecera();
            try
            {
                Ent.Idpedido = int.Parse(0 + TxtIdPedido.Text);
                Ent.Iditem   = int.Parse(DDLItem.SelectedValue);
                Ent.Cantidad = Double.Parse(0 + TxtCantidad.Text);
                Ent.Precio   = Double.Parse(0 + TxtPrecio.Text);
                Ent.Importe  = Double.Parse(0 + TxtCantidad.Text) * Double.Parse(0 + TxtPrecio.Text);

                int filas;
                filas = NegPedidos.GrabarPedidoDetalle(Ent);
                if (filas > 0)
                {
                    RellenarPedidoDetalle();
                }
            }
            catch (Exception ex)
            {
                LblMensaje.Text = ex.Message;
            }
        }
示例#24
0
 private void TxtArticulo_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (TxtArticulo.Text != "")
         {
             string[] codigo = TxtArticulo.Text.Split('-');
             if (codigo.Length > 1)
             {
                 string Cod = (codigo[0].Length > codigo[1].Length) ? codigo[1] : codigo[0];
                 codigoProducto   = Cod;
                 TxtCantidad.Text = "1";
                 TxtCantidad.Focus();
                 TxtCantidad.SelectAll();
             }
             else
             {
                 MessageBox.Show("Seleccionar un producto", "", MessageBoxButtons.OK, MessageBoxIcon.None);
             }
         }
     }
 }
示例#25
0
        private void BtnAccion_Click(object sender, EventArgs e)
        {
            bool          isSelected = this.ChkAccion.Checked;
            ContactoModel filter     = new ContactoModel();

            filter.Nombre = TxtNombre.Text;
            if (isSelected)
            {
                if (string.IsNullOrWhiteSpace(TxtNombre.Text))
                {
                    MessageBox.Show("Debe un Nombre");
                    TxtNombre.Focus();
                    return;
                }

                if (string.IsNullOrWhiteSpace(TxtCantidad.Text))
                {
                    MessageBox.Show("Debe ingresar la cantidad de datos que desea enviar");
                    TxtCantidad.Focus();
                    return;
                }

                bool resultParse = Int32.TryParse(TxtCantidad.Text, out int CatidadCrear);
                if (!resultParse)
                {
                    MessageBox.Show("Debe ingresar un datos numerico");
                    TxtCantidad.Focus();
                    return;
                }

                filter.Cantidad = CatidadCrear;
                CrearDatos(filter);
            }
            else
            {
                BuscarDatos(filter);
            }
        }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Cantidad");
                TxtCantidad.Focus();
                return;
            }
            double c, tp;

            c = Convert.ToDouble(TxtCantidad.Text);

            if (c >= 10)
            {
                tp = c * 80;
                TxtTotalaPagar.Text = tp.ToString();
            }
            else
            {
                tp = c * 100;
                TxtTotalaPagar.Text = tp.ToString();
            }
        }
示例#27
0
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Cantidad");
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Precio");
                TxtPrecio.Focus();
                return;
            }

            double c, p, t;

            c = Convert.ToDouble(TxtCantidad.Text);
            p = Convert.ToDouble(TxtPrecio.Text);

            t = c * p;

            TxtTotal.Text = t.ToString();
        }
示例#28
0
        private async void PicProducto_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ClienteEncontrado == true)
            {
                if (PicProducto.SelectedIndex > -1)
                {
                    int    indice         = PicProducto.SelectedIndex;
                    string codigoProducto = Codigo[PicProducto.SelectedIndex].ToString();
                    string respuesta      = await AgregarProductoLista(codigoProducto, TxtIdentificacion.Text);

                    TxtCantidad.Focus();
                    TxtCantidad.Text = "1";

                    if (respuesta != "")
                    {
                        await DisplayAlert("Fallo!", "Lo sentimos conexión fallida." + "\r\n" + "Vuelva a intentarlo ", "OK");
                    }
                }
            }
            else
            {
                var msm = DisplayAlert("Fallo!", "No hay ningun cliente", "OK");
            }
        }
 private void BtnLimpiar_Click(object sender, EventArgs e)
 {
     TxtPagar.Clear();
     TxtCantidad.Clear();
 }
示例#30
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            //Regex rx = new Regex("^[0-9]+([.|,]+[0-9]+)?$");
            //if (rx.IsMatch(TxtCantidad.Text))



            ProductosBl val = new ProductosBl();

            if (TxtCantidad.Text == "")
            {
                LbcCantidad.Visible = false;
                LblTotal.Text       = "0.00";
                //LblTotaApagar.Text = "0.00";
                return;
            }

            try
            {
                bool             textval = false;
                ValidarTextboxBl ValiTex = new ValidarTextboxBl();
                textval = ValiTex.SoloNumero(TxtCantidad.Text);
                if (textval)
                {
                    int    cant = Convert.ToInt32(TxtCantidad.Text);
                    string pr   = TxtProducto.Text;

                    Validar = val.ValidarInvetario(cant, pr);
                    errorProvider1.Clear();
                    if (Validar)
                    {
                        LbcCantidad.Visible = true;
                        LblPrecio.Visible   = true;
                        LblTotal.Visible    = true;
                        //double can = 0.00;
                        //double it = 0.00;
                        //foreach (DataGridViewRow row in dgvDetalleF.Rows)
                        //{

                        //    can += Convert.ToDouble(row.Cells["Precio_Producto"].Value);
                        //    it += Convert.ToDouble(row.Cells["Generales"].Value);
                        //}
                        //double t = can + it;
                        //LblTotaApagar.Text = t.ToString();
                        LbcCantidad.Text      = "Disponible";
                        LbcCantidad.ForeColor = Color.Lime;
                        LblTotal.Text         = (float.Parse(TxtCantidad.Text) * float.Parse(LblPrecio.Text)).ToString();
                        //  LblTotal.Text = Convert.ToDouble(LblPrecio.Text*TxtCantidad.Text).ToString();
                    }
                    else
                    {
                        LbcCantidad.Text      = "No Disponible";
                        LbcCantidad.ForeColor = Color.Red;
                        LblTotal.Text         = "0.00";
                    }
                }
                else
                {
                    //          MessageBox.Show("Solo se permiten numeros","Error de entrada de datos",MessageBoxIcon.Error,MessageBoxButtons.OK.ToString());
                    MessageBox.Show("Solo se permiten numeros", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                    TxtCantidad.Clear();
                }
            }
            catch (Exception)
            {
                throw;
            }
        }