Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                DataSets.dsALMACENTableAdapters.vListaKardexInventarioTableAdapter adapKardexInventario = new DataSets.dsALMACENTableAdapters.vListaKardexInventarioTableAdapter();
                DataSets.dsALMACEN dsAlmacen = new DataSets.dsALMACEN();

                if (checkBox1.Checked)
                {
                    adapKardexInventario.Fill(dsAlmacen.vListaKardexInventario, null, null); //DateTimePicker1.Value.AddDays(1)
                }
                else //(DateTime)dateTimePicker1.Value (DateTime)dateTimePicker2.Value.AddDays(1)
                {
                    adapKardexInventario.Fill(dsAlmacen.vListaKardexInventario, (DateTime)dateTimePicker1.Value, (DateTime)dateTimePicker2.Value);
                }

                rptKardexInv rptKardex = new rptKardexInv();
                rptKardex.SetDataSource(dsAlmacen);
                this.crystalReportViewer1.ReportSource = rptKardex;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
        private void ListarFiltro()
        {
            dataGridView1.Rows.Clear();
            dsAlmacen        = new DataSets.dsALMACEN();
            adapListaEntrada = new DataSets.dsALMACENTableAdapters.vListaEntradaTableAdapter();

            adapListaEntrada.FillFiltros(dsAlmacen.vListaEntrada, "%" + txtCodigo.Text + "%", "%" + txtDescItem.Text + "%", "%" + txtNroPecosa.Text + "%", "%" + txtNroPedido.Text + "%", false);

            string sIdEntradaDetalle;
            string sNroPecosa;
            string sNroPedido;
            string sJustificacion;
            string sFechaEntrada;
            string sFechaPedido;
            string sCodItem;
            string sDescBien;
            string sPrecioUnitario;
            string sCantidad;
            string sSubTotal;
            string sPorEntregar;

            foreach (DataRow row in dsAlmacen.vListaEntrada.Rows)
            {
                sCodItem          = row["id_CatalogoBien"].ToString();
                sDescBien         = row["DescBien"].ToString();
                sPrecioUnitario   = row["PrecioUnitario"].ToString();
                sCantidad         = row["Cantidad"].ToString();
                sSubTotal         = row["SubTotal"].ToString();
                sPorEntregar      = row["PorEntregar"].ToString();
                sNroPecosa        = row["NroPecosa"].ToString();
                sNroPedido        = row["NroPedido"].ToString();
                sJustificacion    = row["Justificacion"].ToString();
                sFechaPedido      = row["FechaPedido"].ToString();
                sFechaEntrada     = row["FechaEntrada"].ToString();
                sIdEntradaDetalle = row["id_EntradaDetalle"].ToString();

                dataGridView1.Rows.Add(sIdEntradaDetalle, sCodItem, sDescBien, sPrecioUnitario, sCantidad, sSubTotal, sPorEntregar, sNroPecosa, sNroPedido, sJustificacion, sFechaEntrada);
            }
        }