Exemple #1
0
        private void LoadData()
        {
            int isPage, iePage, ipageCount;

            isPage = (PageIndex - 1) * PageSize + 1;
            iePage = PageIndex * PageSize;
            if (IDataPage == null)
            {
                Msg.ShowError("没有给赋数据源!!");
                return;
            }
            ipageCount = IDataPage.GetRecordCount(strWhere);
            DoDrawControl(ipageCount);
            if (ipageCount <= 0)
            {
                Msg.ShowInformation("没有数据!!!");

                return;
            }

            xGridControl.DataSource = IDataPage.GetListByPage(strWhere, strOrder, isPage, iePage).Tables[0];
        }
Exemple #2
0
        private void ExportToXls(bool bAll)
        {
            if (!UserData)
            {
                return;
            }
            if (bAll)
            {
                xGridControl.DataSource = IDataPage.GetListByPage(strWhere, strOrder, 1, IDataPage.GetRecordCount(strWhere)).Tables[0];
            }
            string sPach;

            sPach = SaveAS();
            if (Common.StringISNULL.Isnull(sPach, "") == "")
            {
                return;
            }
            xGridControl.ExportToXls(sPach);
        }