Ejemplo n.º 1
0
        private void cboStores_EditValueChanged(object sender, EventArgs e)
        {
            if (cboStores.EditValue == null)
            {
                return;
            }
            var iss = new IssueDoc();
            //  var dtRec = iss.GetDistinctIssueDocments(Convert.ToInt32(cboStores.EditValue));
            UserCommodityType ucs = new UserCommodityType();
            DataTable         dt  = ucs.GetUserCommodityType(MainWindow.LoggedinId);

            int[] typeid = new int[dt.Rows.Count];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                typeid[i] = Convert.ToInt32(dt.Rows[i]["ID"]);
            }
            var typeids = string.Join(",", typeid);
            var dtRec   = iss.GetDistinctIssueDocmentsUsers(Convert.ToInt32(cboStores.EditValue), typeids);

            lstTree.DataSource = dtRec;

            DateTime dt1 = EthiopianDate.EthiopianDate.Now.StartOfFiscalYear.ToGregorianDate();
            DateTime dt2 = DateTime.Now;

            dtRec                 = iss.GetTransactionByDateRange(Convert.ToInt32(cboStores.EditValue), dt1, dt2);
            lblIssDate.Text       = @"Current Year";
            gridIssues.DataSource = dtRec;
        }