protected void GetReportsData() { try { int intReportType = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportTypeID"].ToString())); BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntRoleID = Convert.ToInt32(Session["RoleID"]); if (intReportType == 1) { if (dtpstartdate.SelectedDate != null) { objBECommon.DateStartDate = Convert.ToDateTime(dtpstartdate.SelectedDate); } if (dtpEnddate.SelectedDate != null) { objBECommon.DateEndDate = Convert.ToDateTime(dtpEnddate.SelectedDate); } } else { objBECommon.strCourseName = txtCourseName.Text.ToString(); objBECommon.strExamName = txtExamName.Text.ToString(); objBECommon.StrFirstName = txtFirstName.Text.ToString(); objBECommon.StrLastName = txtLastName.Text.ToString(); } objBECommon.iReportID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportID"].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBECommon.intReportTypeID = intReportType; objBCommon.BGetSelectedReport(objBECommon); if (objBECommon.DtResult != null && objBECommon.DtResult.Rows.Count > 0) { gvReports.DataSource = objBECommon.DtResult; trExportButtons.Visible = true; trGridView.Visible = true; } else { gvReports.DataSource = new Object[0]; trExportButtons.Visible = false; trGridView.Visible = true; } } catch (Exception Ex) { throw Ex; } }
protected void GetReportsData() { try { trexamfee.Visible = false; //trondemandfee.Visible = false; int intReportType = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportTypeID"].ToString())); BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntRoleID = Convert.ToInt32(Session["RoleID"]); if (intReportType != 3) { if (intReportType == 1) { if (dtpstartdate.SelectedDate != null) { objBECommon.DateStartDate = Convert.ToDateTime(dtpstartdate.SelectedDate); } if (dtpEnddate.SelectedDate != null) { objBECommon.DateEndDate = Convert.ToDateTime(dtpEnddate.SelectedDate); } } else { objBECommon.strCourseName = txtCourseName.Text.ToString(); objBECommon.strExamName = txtExamName.Text.ToString(); objBECommon.StrFirstName = txtFirstName.Text.ToString(); objBECommon.StrLastName = txtLastName.Text.ToString(); } objBECommon.iReportID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportID"].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBECommon.intReportTypeID = intReportType; objBCommon.BGetSelectedReport(objBECommon); if (objBECommon.DtResult != null && objBECommon.DtResult.Rows.Count > 0) { gvReports.DataSource = objBECommon.DtResult; trExportButtons.Visible = true; trGridView.Visible = true; } else { gvReports.DataSource = new Object[0]; trExportButtons.Visible = false; trGridView.Visible = true; } } else { DateTime StartDate = new DateTime(); DateTime EndDate = new DateTime(); if (ddlYear.SelectedIndex > 0 && ddlMonths.SelectedIndex > 0) { StartDate = DateTime.Parse(ddlMonths.SelectedValue + "/01/" + ddlYear.SelectedItem.Text); EndDate = DateTime.Parse(ddlMonths.SelectedValue + "/01/" + ddlYear.SelectedItem.Text.ToString()).AddMonths(1).AddDays(-1); LoadExamStatusDetails(StartDate, EndDate); } else if (ddlYear.SelectedIndex > 0 && ddlMonths.SelectedIndex <= 0) { StartDate = DateTime.Parse("01/01/" + ddlYear.SelectedItem.Text); EndDate = DateTime.Parse("01/01/" + ddlYear.SelectedItem.Text.ToString()).AddMonths(12); LoadExamStatusDetails(StartDate, EndDate); } else { gvReports.DataSource = new Object[0]; trExportButtons.Visible = false; } } } catch (Exception Ex) { throw Ex; } }