private void RefreshFilter()
        {
            int supID = 0;
            int lkid  = 0;

            if (lkSupplierT.EditValue != null)
            {
                supID = (int)lkSupplierT.EditValue;
            }
            if (lklocationT.EditValue != null)
            {
                lkid = (int)lklocationT.EditValue;
            }
            if ((cboStores.Text == "All Stores") || (cboStores.EditValue == null))
            {
                dtRec = rec.GetAllReceiveByDateRange(dtFrom.Value, dtTo.Value);
                dtiss = iss.GetIssuedByDateRange(dtFrom.Value, dtTo.Value);

                grdTotalReceived.DataSource = rec.GetTotalReceiveByDateRange(dtFrom.Value, dtTo.Value, supID);
                grdTotalIssued.DataSource   = iss.GetTotalIssuedByDateRange(dtFrom.Value, dtTo.Value, lkid);
            }
            else
            {
                dtRec = rec.GetAllReceiveByStoreDateRange(Convert.ToInt32(cboStores.EditValue), dtFrom.Value, dtTo.Value);
                dtiss = iss.GetTransactionByDateRange(Convert.ToInt32(cboStores.EditValue), dtFrom.Value, dtTo.Value);

                grdTotalReceived.DataSource = rec.GetTotalReceiveByStoreDateRange(Convert.ToInt32(cboStores.EditValue), dtFrom.Value, dtTo.Value);
                grdTotalIssued.DataSource   = iss.GetTotalTransactionByDateRange(Convert.ToInt32(cboStores.EditValue), dtFrom.Value, dtTo.Value);
            }

            gridReceives.DataSource = dtRec;
            gridIssues.DataSource   = dtiss;
        }
Exemple #2
0
        private void RefreshFilter()
        {
            if ((cboStores.Text == "All Stores") || (cboStores.EditValue == null))
            {
                dtRec = rec.GetAllReceiveByDateRange(dtFrom.Value, dtTo.Value);
                dtiss = iss.GetIssuedByDateRange(dtFrom.Value, dtTo.Value);
            }
            else
            {
                dtRec = rec.GetAllReceiveByStoreDateRange(Convert.ToInt32(cboStores.EditValue), dtFrom.Value, dtTo.Value);
                dtiss = iss.GetTransactionByDateRange(Convert.ToInt32(cboStores.EditValue), dtFrom.Value, dtTo.Value);
            }

            gridReceives.DataSource = dtRec;
            gridIssues.DataSource   = dtiss;
        }