public void FindAllExam(Pagination pagination, int userId) { if (!string.IsNullOrWhiteSpace(pagination.UserName)) { this.txtSearchContent.Text = pagination.UserName; } this.pnlPaginationContainer.Controls.Clear(); this.pnlDataContainer.Controls.Clear(); client = new ExamService.ExamServiceClient(); try { exams = client.FindAllStudentExamResultByExamId(pagination, examId); this.pagination = client.GetStudentResultByExamIdPagination(pagination, examId); for (int i = 0; i < exams.Count; i++) { examStudentResultDataLineControl = new ExamStudentResultDataLineControl(exams[i]); examStudentResultDataLineControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); examStudentResultDataLineControl.Width = this.pnlDataContainer.Width; examStudentResultDataLineControl.Location = new Point(0, i * 31); this.pnlDataContainer.Controls.Add(examStudentResultDataLineControl); } paginationControl = new PaginationControl(this.pagination, FindAllExam); this.pnlPaginationContainer.Controls.Add(paginationControl); } catch (FaultException <DBException> faultDbException) { ShowAlertWindow(faultDbException.Message); } }
public DataTable GetDatafromQuality(object PageControl, int iPageSize, string strWhere) { int num = 1; PaginationControl control = (PaginationControl)PageControl; num = ((publicDbOpClass.GetRecordCount("Ent_Quality_File", strWhere) - 1) / iPageSize) + 1; control.PageCount = num; return(publicDbOpClass.GetRecordFromPage("Ent_Quality_File", "Id", iPageSize, control.CurrentPageIndex, 1, strWhere)); }
public static DataTable GetPageData(object PageControl, int iPageSize, string strWhere) { int num = 1; PaginationControl control = (PaginationControl)PageControl; num = ((publicDbOpClass.GetRecordCount("EPM_V_CostImport", strWhere) - 1) / iPageSize) + 1; control.PageCount = num; return(publicDbOpClass.GetRecordFromPage("EPM_V_CostImport", "ID", iPageSize, control.CurrentPageIndex, 1, strWhere)); }
public static DataTable GetPageData(string SqlWhere, object PageControl, int iPageSize, string TableName) { int num = 1; PaginationControl control = (PaginationControl)PageControl; num = ((publicDbOpClass.GetRecordCount(TableName, SqlWhere) - 1) / iPageSize) + 1; control.PageCount = num; return(publicDbOpClass.GetRecordFromPage(TableName, "PrjCode", iPageSize, control.CurrentPageIndex, 1, SqlWhere)); }
public void FindAllExam(Pagination pagination, int userId) { this.pnlPaginationContainer.Controls.Clear(); this.pnlDataContainer.Controls.Clear(); client = new ExamService.ExamServiceClient(); try { exams = client.TeacherFindAllExam(pagination); this.pagination = client.GetTeacherPagination(pagination); for (int i = 0; i < exams.Count; i++) { dataLine = new TeacherDataLineControl(exams[i]); dataLine.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); dataLine.Width = this.pnlDataContainer.Width; dataLine.Location = new Point(0, i * 31); this.pnlDataContainer.Controls.Add(dataLine); } paginationControl = new PaginationControl(this.pagination, FindAllExam); this.pnlPaginationContainer.Controls.Add(paginationControl); if (!string.IsNullOrEmpty(pagination.ExamName)) { this.txtSearchContent.Text = pagination.ExamName; } } catch (FaultException <DBException> faultDbException) { ShowAlertWindow(faultDbException.Message); } catch (CommunicationException communicationException) { ShowAlertWindow(Constants.CannotConnServer); } catch (TimeoutException timeoutException) { ShowAlertWindow(Constants.NetworkTimeout); } }
public DataTable GetPageData(int iPageSize, PaginationControl PageCtrl, string strWhere) { return(publicDbOpClass.GetRecordFromPage("EPM_Stuff_PartyABill", "FirstID", iPageSize, PageCtrl.CurrentPageIndex, 1, strWhere)); }