private void FillGrid()
        {
            var ds = ProjectFunctions.GetDataSet("	SELECT DISTINCT ActMst.AccCode, ActMst.AccName FROM            InvoiceMst left outer join ActMst ON InvoiceMst.ImPartyCode = ActMst.AccCode WHERE        (InvoiceMst.ImType = 'S') and Imdate between '"+ Convert.ToDateTime(DtStartDate.Text).ToString("yyyy-MM-dd") + "' and '" + Convert.ToDateTime(DtEndDate.Text).ToString("yyyy-MM-dd") + "'");

            ds.Tables[0].Columns.Add("Select", typeof(bool));


            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                dr["Select"] = false;
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                ReplGrid.DataSource = ds.Tables[0];
                ReplGridView.BestFitColumns();
            }
        }
Ejemplo n.º 2
0
        private void FillGrid()
        {
            //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);
            //SplashScreenManager.Default.SetWaitFormDescription("Fetching Data");
            var qr = " sp_LoadAdvanceMst '" + Convert.ToDateTime(DtStartDate.Text).ToString("yyyy-MM-dd") + "', '" + Convert.ToDateTime(DtEndDate.Text).ToString("yyyy-MM-dd") + "'";
            var ds = ProjectFunctions.GetDataSet(qr);

            if (ds.Tables[0].Rows.Count > 0)
            {
                ReplGrid.DataSource = ds.Tables[0];
                ReplGridView.BestFitColumns();
                btnEdit.Enabled = true;
            }
            else
            {
                ReplGrid.DataSource = null;
                btnEdit.Enabled     = false;
            }
            //SplashScreenManager.CloseForm();
        }