コード例 #1
0
        private void ImpresionTomaInv()
        {
            var tablaReport = new DataTable();
            var BL = new tb_60local_stockBL();
            var BE = new tb_60local_stock();

            BE.moduloid = ((D60ALMACEN.MainAlmacen)MdiParent).moduloid;
            BE.local = ((D60ALMACEN.MainAlmacen)MdiParent).local;
            BE.lineaid = lineaid.Text.Trim();
            BE.status = "0";

            tablaReport = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
            if (tablaReport.Rows.Count == 0)
            {
                MessageBox.Show("No existe Información Procesada", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                var miForma = new Frm_Reportes();
                var reporteInventario = new REPORTES.CR_tomainventario();
                miForma.Text = "Toma de Inventario : Linea";
                reporteInventario.DataDefinition.FormulaFields["almacen"].Text = "'" + ((D60ALMACEN.MainAlmacen)MdiParent).moduloname + "'";

                miForma.Table = tablaReport;
                miForma.Reporte = reporteInventario;
                miForma.Show();
            }
        }
コード例 #2
0
        private void btn_excel_Click(object sender, EventArgs e)
        {
            var TablaProductostock = new DataTable("Productostock");
            try
            {
                var BL = new tb_60local_stockBL();
                var BE = new tb_60local_stock();

                BE.moduloid = modulo.Trim();
                BE.local = local.Trim();
                BE.lineaid = lineaid.Text.Trim();
                BE.grupoid = grupoid.Text.Trim();
                BE.subgrupoid = subgrupoid.Text.Trim();
                BE.productid = productid.Text.Trim();
                BE.colorid = colorid.Text.Trim();
                BE.status = chkTodos.Checked ? "1" : "0";

                TablaProductostock = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
                if (TablaProductostock != null)
                {
                    Examinar3.DataSource = TablaProductostock;
                    Examinar3.RefreshDataSource();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
        private void btn_busqueda_Click(object sender, EventArgs e)
        {
            var TablaProductostock = new DataTable("Productostock");
            try
            {
                var BL = new tb_60local_stockBL();
                var BE = new tb_60local_stock();

                if (cbomodulo.SelectedIndex != -1)
                {
                    BE.moduloid = cbomodulo.SelectedValue.ToString();
                }
                else
                {
                    MessageBox.Show("!!! ...Seleccione el Módulo ... !!!", "Información");
                    return;
                }

                if (cbomodulo.SelectedValue.ToString() == "0200")
                {
                    MessageBox.Show("!!! ...Seleccione Otro Módulo ... !!!", "Información");
                    return;
                }

                if (localdes.SelectedIndex != -1)
                {
                    BE.local = localdes.SelectedValue.ToString();
                }
                else
                {
                    MessageBox.Show("!!!... Seleccione Local ...!!!", "Información");
                    return;
                }

                BE.lineaid = lineaid.Text.Trim();
                BE.grupoid = grupoid.Text.Trim();
                BE.subgrupoid = subgrupoid.Text.Trim();
                BE.productid = productid.Text.Trim();
                BE.colorid = colorid.Text.Trim();
                BE.status = chkTodos.Checked ? "1" : "0";
                TablaProductostock = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
                if (TablaProductostock != null)
                {
                    Examinar3.DataSource = TablaProductostock;
                    Examinar3.RefreshDataSource();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #4
0
        private DataTable Movimiento_productostock()
        {
            DtReporte = new DataTable("Productostock");
            try
            {
                var BL = new tb_60local_stockBL();
                var BE = new tb_60local_stock();

                BE.moduloid = moduloid.Trim();
                BE.local = local.Trim();
                BE.lineaid = lineaid;
                BE.grupoid = grupoid;
                BE.subgrupoid = subgrupoid;
                BE.productid = productid;
                BE.colorid = colorid;
                BE.status = status;
                BE.productidold = productidold;
                BE.procedenciaid = procedenciaid;

                DtReporte = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
                if (DtReporte != null)
                {
                    return DtReporte;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception ex)
            {
                return null;
            }
        }
コード例 #5
0
        private DataTable Lista_tomainventario()
        {
            DtReporte = new DataTable("Productostock");
            try
            {
                var BL = new tb_60local_stockBL();
                var BE = new tb_60local_stock();

                BE.moduloid = moduloid.Trim();
                BE.local = local.Trim();
                BE.lineaid = lineaid;
                BE.status = status;

                DtReporte = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
                if (DtReporte != null)
                {
                    return DtReporte;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception ex)
            {
                return null;
            }
        }
コード例 #6
0
        private void ImpresionTomaInv()
        {
            DataTable tablaReport = new DataTable();
            tb_60local_stockBL BL = new tb_60local_stockBL();
            tb_60local_stock BE = new tb_60local_stock();

            BE.moduloid = VariablesPublicas.Moduloid;
            BE.local = VariablesPublicas.Local;
            BE.lineaid = lineaid.Text.Trim();
            BE.status = chkTodos.Checked ? "1" : "0";

            tablaReport = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
            if (tablaReport.Rows.Count == 0)
            {
                MessageBox.Show("No existe Información Procesada", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                Frm_Reportes miForma = new Frm_Reportes();
                REPORTES.CR_tomainventario reporteInventario = new REPORTES.CR_tomainventario();
                miForma.Text = "Toma de Inventario : Linea";
                reporteInventario.DataDefinition.FormulaFields["almacen"].Text = "'" + VariablesPublicas.EmpresaTipo + "'";
                reporteInventario.DataDefinition.FormulaFields["name"].Text = "'TIENDA : " + VariablesPublicas.Local + "  - " + VariablesPublicas.nombrelocal + "'";
                #region -- Commentado
                //reporteInventario.DataDefinition.FormulaFields["empresaname"].Text = "'EMPRESA: " + VariablesPublicas.EmpresaName.Trim() + "'";
                //reporteInventario.DataDefinition.FormulaFields["empresaruc"].Text = "'RUC: " + VariablesPublicas.EmpresaRuc.Trim() + "'";

                //variables que vamos a modificar
                //reporteRollokardex.DataDefinition.FormulaFields["fechdoc"].Text = "'DE: " + fechdocini.Trim().Substring(0, 10) + "  AL:" + fechdocfin.Trim().Substring(0, 10) + "'";

               //reporteInventario.SetDataSource(tablaReport);
               // miForma.Reporte.ReportSource = reporteInventario;

                //reporte.PrintOptions.PrinterName = "EPSON LQ-590 ESC/P2";
                //reporte.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait;
                //reporte.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)GetPaperSize("EPSON LQ-590 ESC/P2", "cretencion");

                //reporte.SetDataSource(tablaReport);
                //reporte.Refresh();
                //reporte.PrintToPrinter(1, false, 0, 0);
                #endregion

                miForma.Table = tablaReport;
                miForma.Reporte = reporteInventario;
                miForma.Show();
            }
        }