Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="selectcommandstring"></param>
        /// <param name="rowcount"></param>
        public void LoadAdHocSelect(string selectcommandstring, out int rowcount)
        {
            SelectCommandString = selectcommandstring;

            // build a new grid view
            GridViewSelect Dgv = new GridViewSelect(selectcommandstring, out rowcount);

            // build a new page to use the grid view
            Views.AdHocSelectPage AdHocSelectPage = new AdHocSelectPage(Dgv);

            Frame DataPageFrame = new Frame();

            DataPageFrame.Content = AdHocSelectPage;
            TabItem DataPageTabItem = new TabItem();

            DataPageTabItem.Content = AdHocSelectPage;
            DataPageTabItem.Header  = "Ad Hoc Select";
            this.tabcontrolGridViews.Items.Add(DataPageTabItem);

            // need to be able to generate a loadfile using pdc.loadfiles

            /*
             * this.Loadfile = new ConcordanceDat(NewLoadfileFilepath);
             *
             * this.tbFilepath.IsReadOnly = false;
             * this.tbFilepath.Text = NewLoadfileFilepath;
             */
        }
Example #2
0
        public AdHocSelectPage(GridViewSelect gridview)
        {
            InitializeComponent();

            Dgv = gridview;

            this.tbPageRowCount.Text   = Dgv.PageRowCount.ToString();
            this.tbLastPage.Text       = Dgv.LastPage.ToString();
            this.tblTotalRowCount.Text = Dgv.TotalRowCount.ToString("#,##0") + " rows";

            // wire up the paging events now that we are ready for the user
            this.tbLastPage.TextChanged    += tbLastPage_TextChanged;
            this.tbCurrentPage.TextChanged += tbCurrentPage_TextChanged;

            Dgv.Sort(this.dgData, 0);

            // this.Loadfile = new ConcordanceDat();
        }