protected void BindResData() { if (this.ViewState["sheetcount"] == null) { return; } int num = 0; int num2 = System.Convert.ToInt32(this.ViewState["sheetcount"].ToString()); if (num2 >= 2) { if (this.ViewState["dtres"] == null) { return; } this.dtRes = (this.ViewState["dtres"] as DataTable); this.AspNetPagerRes.RecordCount = this.dtRes.Rows.Count; this.AspNetPagerRes.PageSize = NBasePage.pagesize; DataTable pageDataTable = BudgetManage_Budget_ExcelImport.GetPageDataTable(this.dtRes, this.AspNetPagerRes.CurrentPageIndex, this.AspNetPagerRes.PageSize); this.gvwResData.DataSource = pageDataTable; this.FormatString(pageDataTable); this.gvwResData.DataBind(); this.AddDrop(pageDataTable, 1, this.gvwResData); num = this.dtRes.Rows.Count; } else { this.gvwResData.DataSource = null; this.gvwResData.DataBind(); } this.hfldValidRes.Value = num.ToString(); }
protected void BindErrorData() { DataTable dataTable = new DataTable(); if (this.ViewState["errors"] != null) { this.errors = (this.ViewState["errors"] as System.Collections.Generic.List <string>); } if (this.errors.Count > 0) { this.btnClose.Visible = true; dataTable = this.ConvertListToDataTable(this.errors); this.AspNetPagerError.RecordCount = dataTable.Rows.Count; this.AspNetPagerError.PageSize = NBasePage.pagesize; this.gvwError.DataSource = BudgetManage_Budget_ExcelImport.GetPageDataTable(dataTable, this.AspNetPagerError.CurrentPageIndex, this.AspNetPagerError.PageSize); this.gvwError.DataBind(); return; } this.gvwError.DataSource = null; this.gvwError.DataBind(); }
protected void BindWBSData() { if (this.ViewState["dtwbs"] == null) { return; } this.dtWBS = (this.ViewState["dtwbs"] as DataTable); this.AspNetPagerWBS.RecordCount = this.dtWBS.Rows.Count; this.AspNetPagerWBS.PageSize = NBasePage.pagesize; DataTable pageDataTable = BudgetManage_Budget_ExcelImport.GetPageDataTable(this.dtWBS, this.AspNetPagerWBS.CurrentPageIndex, this.AspNetPagerWBS.PageSize); this.gvwWBSData.DataSource = pageDataTable; this.FormatString(pageDataTable); this.gvwWBSData.DataBind(); this.AddDrop(pageDataTable, 0, this.gvwWBSData); if (this.gvwWBSData.Rows.Count > 0) { this.btmImport.Enabled = true; return; } this.btmImport.Enabled = false; }