private void buttonAddUsuario_Click(object sender, EventArgs e)
        {
            string nameImage = Path.GetFileName(textBoxImagen.Text);

            guardarCopiaImagen(nameImage);
            string rutaImagen = " ";

            if (textBoxImagen.Text != "")
            {
                rutaImagen = @"C:\\Ferreteria\\Imagenes\\Usuarios\\" + nameImage;
            }
            ClaseCapaDatosFerreteria cpd       = new ClaseCapaDatosFerreteria();
            List <string>            queryList = new List <string>();

            if (tipoMov == 0)
            {
                if (empleadoCargado == false)
                {
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_Persona", "0, '" + textBoxNombre.Text + "', '" + textBoxApellidos.Text + "' , 1"));
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_Empleado", textBoxDPI.Text + "," + numericUpDownEdad.Value.ToString() + ",'" + comboBoxSexo.Text + "'," +
                                                               "" + cpd.ExtraerCodigo("id", "tbl_Puesto", "Nombre", comboBoxPuesto.Text) + "," + nextCodigo() + ", 1"));
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_Telefono", "0, '" + textBoxTelefono.Text + "' , " + nextCodigo() + ", 1"));
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_Correo", "0, '" + textBoxCorreo.Text + "' , " + nextCodigo() + ", 1"));
                }
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_Usuario", "0, '" + textBoxNickname.Text + "', '" + cpd.Encriptar(textBoxPassword.Text) + "', " + textBoxDPI.Text + ", '" + rutaImagen + "' , 1"));
                try
                {
                    cpd.EjectuarOperacionExterna(queryList, "a", "a", "Transaccion de ingreso de usuario realizada");
                    MessageBox.Show("Datos Ingresados Exitosamente", "Datos Ingresados", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            if (tipoMov == 1)
            {
                if (empleadoCargado == false)
                {
                    queryList.Add(cpd.DevolverSentencia_Modificar("tbl_Persona", "Nombre = '" + textBoxNombre.Text + "', Apellidos='" + textBoxApellidos.Text + "'", "id", datosUsuario[12]));
                    queryList.Add(cpd.DevolverSentencia_Modificar("tbl_Empleado", "Edad = " + numericUpDownEdad.Value.ToString() + ", Sexo = '" + comboBoxSexo.Text + "'," +
                                                                  "tbl_Puesto_id  = " + cpd.ExtraerCodigo("id", "tbl_Puesto", "Nombre", comboBoxPuesto.Text), "DPI", datosUsuario[3]));
                    queryList.Add(cpd.DevolverSentencia_Modificar("tbl_Telefono", "NumeroTelefono = '" + textBoxTelefono.Text + "'", "id", datosUsuario[13]));
                    queryList.Add(cpd.DevolverSentencia_Modificar("tbl_Correo", "Correo = '" + textBoxCorreo.Text + "'", "id", datosUsuario[14]));
                }
                queryList.Add(cpd.DevolverSentencia_Modificar("tbl_Usuario", "Nickname = '" + textBoxNickname.Text + "', Password = '******', image_path = '" + rutaImagen + "'", "id", datosUsuario[0]));
                try
                {
                    cpd.EjectuarOperacionExterna(queryList, "a", "a", "Transaccion de actualizacion de usuarios realiazada");
                    MessageBox.Show("Datos Modificados Exitosamente", "Datos Modificados", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        //Guardar los datos
        private void buttonGuardar_Click(object sender, EventArgs e)
        {
            ClaseCapaDatosFerreteria cpd       = new ClaseCapaDatosFerreteria();
            List <string>            queryList = new List <string>();

            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Persona", "0, '" + textBoxNombre.Text + "', '" + textBoxApellidos.Text + "' , 1"));
            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Telefono", "0, '" + textBoxTelefono.Text + "', " + nextCodigo("tbl_Persona") + " , 1"));
            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Correo", "0, '" + textBoxCorreo.Text + "', " + nextCodigo("tbl_Persona") + " , 1"));
            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Organizacion", "0, '" + textBoxOrganizacion.Text + "', '" + textBoxDireccion.Text + "', 1"));
            queryList.Add(cpd.DevolverSentencia_Insert("tbl_cliente", textBoxNIT.Text + ", " + nextCodigo("tbl_Persona") + ", '" + textBoxTransporte.Text + "', " +
                                                       "" + nextCodigo("tbl_Organizacion") + ", 1"));

            /*string review = "";
             * foreach (string var in queryList)
             * {
             *  review += var + "\n";
             * }
             * MessageBox.Show(review);*/
            try
            {
                cpd.EjectuarOperacionExterna(queryList, "a", "a", "Transaccion de ingreso de Clientes realizada");
                MessageBox.Show("Datos Ingresados Exitosamente", "Datos Ingresados", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Limpiar();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void buttonAgregarAbono_Click_1(object sender, EventArgs e)
        {
            string[]      listaDetalle = new string[6];
            List <string> queryList    = new List <string>();

            ClaseCapaDatosFerreteria cpd = new ClaseCapaDatosFerreteria();

            try
            {
                foreach (DataGridViewRow row in dtg_ProductosDetalle.Rows)
                {
                    //Insercion de las cantidades a las bodegas
                    listaDetalle[0] = Convert.ToString(row.Cells[0].Value); //CODIGO
                    listaDetalle[1] = Convert.ToString(row.Cells[1].Value); //PRODUCTO
                    listaDetalle[2] = Convert.ToString(row.Cells[2].Value); //BODEGA
                    listaDetalle[3] = Convert.ToString(row.Cells[3].Value); //CANTIDAD
                    string[] datosProducto = listaDetalle[1].Split(',');
                    string[] datosBodega   = listaDetalle[2].Split(',');
                    int      sumaRows      = 0;
                    foreach (DataGridViewRow row2 in dtg_ProductosDetalle.Rows)
                    {
                        if (row.Cells[1].Value.ToString() == row2.Cells[1].Value.ToString())
                        {
                            sumaRows += Convert.ToInt32(row2.Cells[3].Value);
                        }
                    }

                    //Agregar al inventario
                    string CantidadEnExistencia = cpd.ExtraerCodigo3("Cantidad as ", "Cantidad",
                                                                     "tbl_productobodega",
                                                                     "tbl_Bodega_id= " + datosBodega[0] +
                                                                     " AND tbl_Producto_id ", datosProducto[0]);
                    if (CantidadEnExistencia == "")
                    {
                        CantidadEnExistencia = "0";
                    }
                    int totalCantidad = Convert.ToInt32(CantidadEnExistencia) + sumaRows;
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_productobodega",
                                                               datosBodega[0] + ", " + datosProducto[0] + ", " + listaDetalle[3] + ")  ON DUPLICATE KEY UPDATE " +
                                                               "Cantidad = " + totalCantidad + "; -- "));
                    queryList.Add(cpd.DevolverSentencia_Modificar("tbl_devolucionencabezado", "aprobado = 1", "id", codigoEnc));
                }

                /*string review = "";
                 * foreach (string var in queryList)
                 * {
                 *  review += var + "\n";
                 * }
                 * MessageBox.Show(review);*/
                cpd.EjectuarOperacionExterna(queryList, "", "", "Aprobacion de devolucion");
                MessageBox.Show("Se ha Realizado la devolucion", "DATOS GUARDADOS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                LoadForm();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #4
0
        private void buttonAgregarEncabezado_Click(object sender, EventArgs e)
        {
            panelProductos.Visible = true;
            panelDataGird.Visible  = true;
            string[] codigoProveedor = comboBoxProveedor.Text.Split(',');
            string   codigoEmpleado  = "";
            DateTime fEntrega        = Convert.ToDateTime(labelFechaEntrega.Text);

            string[]      listaDetalle = new string[6];
            List <string> queryList    = new List <string>();

            ClaseCapaDatosFerreteria cpd = new ClaseCapaDatosFerreteria();

            try
            {
                // Insersion del encabezado
                string[] datosProveedor = comboBoxProveedor.Text.Split(',');
                codigoEmpleado = cpd.ExtraerCodigo("tbl_Empleado_DPI", "tbl_Usuario", "Nickname", labelNickname.Text);
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_cotizacionencabezado", "0, " + fEntrega.ToString("yyyyMMdd") + ",  " + codigoProveedor[0] + "" +
                                                           " ," + codigoEmpleado + ", 1"));
                //Insersino del detalle
                foreach (DataGridViewRow row in dtg_ProductosDetalle.Rows)
                {
                    listaDetalle[0] = Convert.ToString(row.Cells[0].Value); //PRODUCTO
                    listaDetalle[1] = Convert.ToString(row.Cells[1].Value); //CANTIDAD
                    string[] datosProducto = listaDetalle[0].Split(',');
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_cotizaciondetalle", "0, " + datosProducto[0] + ", " + listaDetalle[1]
                                                               + ",  " + labelNoOrdenCompra.Text));
                }

                /*string review = "";
                 * foreach (string var in queryList)
                 * {
                 *  review += var + "\n";
                 * }
                 * MessageBox.Show(review);*/
                cpd.EjectuarOperacionExterna(queryList, "", "", "Registro de cotizacion");
                MessageBox.Show("Se ha Realizado la cotizacion", "DATOS GUARDADOS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Refrresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #5
0
        private void buttonGuardar_Click(object sender, EventArgs e)
        {
            string cap = "";
            ClaseCapaDatosFerreteria cpd       = new ClaseCapaDatosFerreteria();
            List <string>            queryList = new List <string>();

            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Persona", "0, '" + textBoxNombre.Text + "', '" + textBoxApellidos.Text + "' , 1"));
            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Organizacion", "0, '" + textBoxOrganizacion.Text + "', '" + textBoxDireccion.Text + "', 1"));
            queryList.Add(cpd.DevolverSentencia_Insert("tbl_Proveedor", "0,  '" + textBoxDireccion.Text + "', " + nextCodigo("tbl_Persona") + "," + nextCodigo("tbl_Organizacion") + ", 1"));
            try
            {
                cpd.EjectuarOperacionExterna(queryList, "a", "a", "Transaccion de ingreso de usuario realizada");
                MessageBox.Show("Datos Ingresados Exitosamente", "Datos Ingresados", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Limpiar();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #6
0
        private void buttonAceptar_Click(object sender, EventArgs e)
        {
            List <string>            queryList = new List <string>();
            ClaseCapaDatosFerreteria cpd       = new ClaseCapaDatosFerreteria();

            try
            {
                //Agregar al inventario
                string CantidadEnExistenciaBodega1 = cpd.ExtraerCodigo2("Cantidad", "tbl_productobodega", "tbl_Bodega_id",
                                                                        codBodega1 + " AND tbl_Producto_id = " + codProducto);
                string CantidadEnExistenciaBodega2 = cpd.ExtraerCodigo2("Cantidad", "tbl_productobodega", "tbl_Bodega_id",
                                                                        codBodega2 + " AND tbl_Producto_id = " + codProducto);
                if (CantidadEnExistenciaBodega1 == "")
                {
                    CantidadEnExistenciaBodega1 = "0";
                }
                if (CantidadEnExistenciaBodega2 == "")
                {
                    CantidadEnExistenciaBodega2 = "0";
                }
                int nuevaCantidadBodega1 = Convert.ToInt32(CantidadEnExistenciaBodega1) - Convert.ToInt32(numericUpDownCantidadAPagar.Value);
                int nuevaCantidadBodega2 = Convert.ToInt32(CantidadEnExistenciaBodega2) + Convert.ToInt32(numericUpDownCantidadAPagar.Value);
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_productobodega",
                                                           codBodega1 + ", " + codProducto + ", " + nuevaCantidadBodega1 + ")  ON DUPLICATE KEY UPDATE " +
                                                           "Cantidad = " + nuevaCantidadBodega1 + "; -- "));
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_productobodega",
                                                           codBodega2 + ", " + codProducto + ", " + nuevaCantidadBodega2 + ")  ON DUPLICATE KEY UPDATE " +
                                                           "Cantidad = " + nuevaCantidadBodega2 + "; -- "));
                //Agregar el movimiento
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_movimientoInventario",
                                                           "0, 1, " + codProducto + ", " + DateTime.Today.ToString("yyyyMMdd") + ", " + numericUpDownCantidadAPagar.Value +
                                                           ", 0, 0, " + codBodega2));                cpd.EjectuarOperacionExterna(queryList, "", "", "Registro de compra");
                MessageBox.Show("Traslado de productos exitoso", "DATOS GUARDADOS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error al Guardar los Datos", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #7
0
        private void buttonAgregarEncabezado_Click(object sender, EventArgs e)
        {
            panelProductos.Visible = true;
            panelDataGird.Visible  = true;
            string   codigoProveedor = "";
            string   codigoEmpleado  = "";
            DateTime fEntrega        = Convert.ToDateTime(labelFechaEntrega.Text);
            DateTime fCancelacion    = Convert.ToDateTime(dateTimePickerFechaCancelacion.Value.ToString("yyyy-MM-dd"));

            string[]      listaDetalle = new string[6];
            List <string> queryList    = new List <string>();

            ClaseCapaDatosFerreteria cpd = new ClaseCapaDatosFerreteria();

            try
            {
                // Insersion del encabezado
                codigoEmpleado  = cpd.ExtraerCodigo("tbl_Empleado_DPI", "tbl_Usuario", "Nickname", labelNickname.Text);
                codigoProveedor = cpd.ExtraerCodigo3("tbl_proveedor.id AS ", "NombreC", "tbl_Proveedor, tbl_Organizacion", "tbl_Organizacion.Nombre = '" + comboBoxProveedor.Text
                                                     + "' AND tbl_Organizacion.id ", " tbl_Proveedor.tbl_Organizacion_id");
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_ComprasEncabezado", "0, " + codigoProveedor + ", " + fEntrega.ToString("yyyyMMdd") + ", " + fCancelacion.ToString("yyyyMMdd") +
                                                           " ," + labelTotalOrden.Text + " ," + codigoEmpleado + ", 1, 0, " + labelTotalOrden.Text));
                //Insersino del detalle
                foreach (DataGridViewRow row in dtg_ProductosDetalle.Rows)
                {
                    listaDetalle[0] = Convert.ToString(row.Cells[0].Value); //PRODUCTO
                    listaDetalle[1] = Convert.ToString(row.Cells[1].Value); //BODEGA
                    listaDetalle[2] = Convert.ToString(row.Cells[2].Value); //CANTIDAD
                    listaDetalle[3] = Convert.ToString(row.Cells[3].Value); //PRECIO
                    listaDetalle[4] = Convert.ToString(row.Cells[4].Value); //SUBTOTAL
                    string[] datosProducto = listaDetalle[0].Split(',');
                    string[] datosBodega   = listaDetalle[1].Split(',');
                    //Agregar el movimiento
                    string movCode = nextCodigo("tbl_MovimientoInventario");
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_movimientoInventario",
                                                               "0, 1, " + datosProducto[0] + ", " + fEntrega.ToString("yyyyMMdd") + ", " + listaDetalle[2] +
                                                               ", " + listaDetalle[3] + ", " + listaDetalle[4] + ", " + datosBodega[0]));
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_comprasdetalle", "0, " + labelNoOrdenCompra.Text + ", " + datosProducto[0] + ", " + listaDetalle[2]
                                                               + ", " + listaDetalle[3] + ", " + listaDetalle[4] + ", " + movCode));
                }
                foreach (DataGridViewRow row in dtg_ProductosDetalle.Rows)
                {
                    listaDetalle[0] = Convert.ToString(row.Cells[0].Value); //PRODUCTO
                    listaDetalle[1] = Convert.ToString(row.Cells[1].Value); //BODEGA
                    listaDetalle[2] = Convert.ToString(row.Cells[2].Value); //CANTIDAD
                    listaDetalle[3] = Convert.ToString(row.Cells[3].Value); //PRECIO
                    listaDetalle[4] = Convert.ToString(row.Cells[4].Value); //SUBTOTAL
                    string[] datosProducto = listaDetalle[0].Split(',');
                    string[] datosBodega   = listaDetalle[1].Split(',');
                    int      sumaRows      = 0;
                    foreach (DataGridViewRow row2 in dtg_ProductosDetalle.Rows)
                    {
                        if (row.Cells[0].Value.ToString() == row2.Cells[0].Value.ToString())
                        {
                            sumaRows += Convert.ToInt32(row2.Cells[2].Value);
                        }
                    }

                    //Agregar al inventario
                    string CantidadEnExistencia = cpd.ExtraerCodigo3("Cantidad as ", "Cantidad",
                                                                     "tbl_productobodega",
                                                                     "tbl_Bodega_id= " + datosBodega[0] +
                                                                     " AND tbl_Producto_id ", datosProducto[0]);
                    if (CantidadEnExistencia == "")
                    {
                        CantidadEnExistencia = "0";
                    }
                    int totalCantidad = Convert.ToInt32(CantidadEnExistencia) + sumaRows;
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_productobodega",
                                                               datosBodega[0] + ", " + datosProducto[0] + ", " + listaDetalle[2] + ")  ON DUPLICATE KEY UPDATE " +
                                                               "Cantidad = " + totalCantidad + "; -- "));
                }

                /*string review = "";
                 * foreach(string var in queryList)
                 * {
                 *  review += var + "\n";
                 * }
                 * MessageBox.Show(review);*/
                cpd.EjectuarOperacionExterna(queryList, "", "", "Registro de compra");
                MessageBox.Show("Se ha Realizado la compra", "DATOS GUARDADOS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Refrresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void buttonAgregarEncabezado_Click(object sender, EventArgs e)
        {
            panelProductos.Visible = true;
            panelDataGird.Visible  = true;
            string[] datoCliente    = comboBoxCliente.Text.Split(',');
            string   codigoEmpleado = "";
            DateTime fEntrega       = Convert.ToDateTime(labelFechaEntrega.Text);

            string[]      listaDetalle = new string[6];
            List <string> queryList    = new List <string>();

            ClaseCapaDatosFerreteria cpd = new ClaseCapaDatosFerreteria();

            try
            {
                // Insersion del encabezado
                codigoEmpleado = cpd.ExtraerCodigo("tbl_Empleado_DPI", "tbl_Usuario", "Nickname", labelNickname.Text);
                queryList.Add(cpd.DevolverSentencia_Insert("tbl_devolucionencabezado", "0, " + fEntrega.ToString("yyyyMMdd") + ", '" + textBoxMotivo.Text +
                                                           "' ," + datoCliente[0] + ", " + codigoEmpleado + ", 1, 0"));
                //Insersino del detalle
                foreach (DataGridViewRow row in dtg_ProductosDetalle.Rows)
                {
                    listaDetalle[0] = Convert.ToString(row.Cells[0].Value); //PRODUCTO
                    listaDetalle[1] = Convert.ToString(row.Cells[1].Value); //BODEGA
                    listaDetalle[2] = Convert.ToString(row.Cells[2].Value); //CANTIDAD
                    string[] datosProducto = listaDetalle[0].Split(',');
                    string[] datosBodega   = listaDetalle[1].Split(',');
                    //Agregar el movimiento
                    string movCode = nextCodigo("tbl_MovimientoInventario");
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_movimientoInventario",
                                                               "0, 3, " + datosProducto[0] + ", " + fEntrega.ToString("yyyyMMdd") + ", " + listaDetalle[2] +
                                                               ", 0, 0, " + datosBodega[0]));
                    queryList.Add(cpd.DevolverSentencia_Insert("tbl_devoluciondetalle", "0, " + listaDetalle[2] + ", " + labelNoVenta.Text
                                                               + ", " + datosProducto[0] + ", " + movCode + ", " + datosBodega[0]));
                }

                /*foreach (DataGridViewRow row in dtg_ProductosDetalle.Rows)
                 * {
                 *  //Insercion de las cantidades a las bodegas
                 *  listaDetalle[0] = Convert.ToString(row.Cells[0].Value); //PRODUCTO
                 *  listaDetalle[1] = Convert.ToString(row.Cells[1].Value);//BODEGA
                 *  listaDetalle[2] = Convert.ToString(row.Cells[2].Value);//CANTIDAD
                 *  string[] datosProducto = listaDetalle[0].Split(',');
                 *  string[] datosBodega = listaDetalle[1].Split(',');
                 *  int sumaRows = 0;
                 *  foreach (DataGridViewRow row2 in dtg_ProductosDetalle.Rows)
                 *  {
                 *      if (row.Cells[0].Value.ToString() == row2.Cells[0].Value.ToString())
                 *      {
                 *          sumaRows += Convert.ToInt32(row2.Cells[2].Value);
                 *      }
                 *  }
                 *
                 *  //Agregar al inventario
                 *  string CantidadEnExistencia = cpd.ExtraerCodigo3("Cantidad as ", "Cantidad",
                 *      "tbl_productobodega",
                 *      "tbl_Bodega_id= " + datosBodega[0] +
                 *      " AND tbl_Producto_id ", datosProducto[0]);
                 *  if (CantidadEnExistencia == "") CantidadEnExistencia = "0";
                 *  int totalCantidad = Convert.ToInt32(CantidadEnExistencia) + sumaRows;
                 *  queryList.Add(cpd.DevolverSentencia_Insert("tbl_productobodega",
                 *      datosBodega[0] + ", " + datosProducto[0] + ", " + listaDetalle[2] + ")  ON DUPLICATE KEY UPDATE " +
                 *      "Cantidad = " + totalCantidad + "; -- "));
                 * }*/
                /*string review = "";
                 * foreach (string var in queryList)
                 * {
                 *  review += var + "\n";
                 * }
                 * MessageBox.Show(review);*/
                cpd.EjectuarOperacionExterna(queryList, "", "", "Registro de compra");
                MessageBox.Show("Se ha Realizado la venta", "DATOS GUARDADOS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Refrresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR AL GUARDAR DATOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }