private void xrTableCellPeriodName_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { XRTableCell cell = sender as XRTableCell; if (cell == null) { return; } int id = 0; if (string.IsNullOrEmpty(cell.Text)) { return; } Int32.TryParse(cell.Text, out id); if (id == 0) { return; } BusinessLogicLayer.Entity.PPM.ExamCenterRequiredExam exCenter = new BusinessLogicLayer.Entity.PPM.ExamCenterRequiredExam(id); if (exCenter == null) { return; } BusinessLogicLayer.Entity.PPM.ExamPeriod period = new BusinessLogicLayer.Entity.PPM.ExamPeriod(exCenter.ExamPeriodID.Value); if (period == null) { return; } cell.Text = period.Name; }
private void xrTableCellCityandCenter_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { XRTableCell cell = sender as XRTableCell; if (cell == null) { return; } int id = 0; if (string.IsNullOrEmpty(cell.Text)) { return; } Int32.TryParse(cell.Text, out id); if (id == 0) { return; } BusinessLogicLayer.Entity.PPM.ExamCenterRequiredExam exCenter = new BusinessLogicLayer.Entity.PPM.ExamCenterRequiredExam(id); if (exCenter == null) { return; } BusinessLogicLayer.Entity.PPM.ExamCenter center = new BusinessLogicLayer.Entity.PPM.ExamCenter(exCenter.ExamCenterID.Value); if (center == null) { return; } BusinessLogicLayer.Entity.Persons.City city = new BusinessLogicLayer.Entity.Persons.City(center.CityID.Value); if (city == null) { return; } cell.Text = city.Name + " - " + center.Name; //BusinessLogicLayer.Entity.PPM.ExamPeriod gender = new BusinessLogicLayer.Entity.PPM.ExamPeriod(exCenter.ExamPeriodID.Value); //if (gender == null) // return; }
private void xrLabelExamCenter_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { XRLabel cell = sender as XRLabel; if (cell == null || string.IsNullOrEmpty(cell.Text)) { return; } BusinessLogicLayer.Entity.PPM.ExamCenterRequiredExam exCenter = new BusinessLogicLayer.Entity.PPM.ExamCenterRequiredExam(Convert.ToInt32(cell.Text)); if (exCenter == null) { return; } BusinessLogicLayer.Entity.PPM.ExamCenter ExamCenter = new BusinessLogicLayer.Entity.PPM.ExamCenter(exCenter.ExamCenterID.Value); if (ExamCenter == null) { return; } cell.Text = ExamCenter.CenterCode; }