Exemplo n.º 1
0
 private void btnCambiosEnPedidoDetalle_Click(object sender, EventArgs e)
 {
     CLS.ConfigBD config = new CLS.ConfigBD();
     if (config.cambiosTablaPedido_detalle())
     {
         edtLogFile.Items.Add("La tabla pedido_detale se ha modificado exitosamente ");
     }
 }
Exemplo n.º 2
0
 private void btnReoaraListo_Click(object sender, EventArgs e)
 {
     CLS.ConfigBD config = new CLS.ConfigBD();
     if (config.cambiosTablaPedido())
     {
         edtLogFile.Items.Add("La tabla pedido se ha modificado exitosamente ");
         edtLogFile.Items.Add("  El campo listo: nuevo ancho a TINYINT(2)" + "Ok");
     }
 }
Exemplo n.º 3
0
 private void btnCreateTable_Click(object sender, EventArgs e)
 {
     CLS.ConfigBD config = new CLS.ConfigBD();
     if (config.crearTablaEgresoTipo())
     {
         edtLogFile.Items.Add("La tabla egreso_tipo se ha creado exitosamente ");
         edtLogFile.Items.Add("Las tablas egreso y egreso_tipo se han relacionado exitosamente ");
     }
 }
Exemplo n.º 4
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            DBM.CLS.QUERY Query = new DBM.CLS.QUERY();
            if (Query.GetContadorVistas() <= 0)
            {
                CLS.ConfigBD config = new CLS.ConfigBD();
                if (config.crearVistaKardex())
                {
                    MessageBox.Show("La vista de datos ya fué crada con éxito, vuela a intentar mostrar los datos", ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }

            string filtro = "";

            if (picturekOk1.Visible && picturekOk2.Visible)
            {
                filtro = " AND fecha >='" + dateStart.Value.ToString("yyyy-MM-dd") + "' and CAST(fecha AS DATE) <='" + dateEnd.Value.ToString("yyyy-MM-dd") + "' ";
            }
            else if (picturekOk1.Visible)
            {
                filtro = " AND fecha >='" + dateStart.Value.ToString("yyyy-MM-dd") + "' ";
            }
            else if (picturekOk2.Visible)
            {
                filtro = " AND fecha <='" + dateEnd.Value.ToString("yyyy-MM-dd") + "' ";
            }
            else //mostrar todos
            {
                filtro = "";
            }

            if (chkFiltro.Checked)
            {
                GUI.bProducto frm = new GUI.bProducto();
                frm.ShowDialog();
                if (frm.id != null && frm.id.Length > 0)
                {
                    txtIdProducto.Text = frm.id;
                    txtProducto.Text   = frm.nombreProducto;
                    DBM.CLS.Funciones.FillGridView(dgKardex, Query.GetRecordsFilters("kardex", "idProducto", txtIdProducto.Text + filtro + " ORDER BY fecha DESC "));
                }
            }
            else
            {
                string sql = "SELECT *  from kardex where" + filtro;
                DBM.CLS.Funciones.FillGridView(dgKardex, Query.GetRecordsFilters("kardex", "1", "1" + filtro + " ORDER BY FECHA DESC"));
            }
        }