protected void gvReports_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                int intReportType = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportTypeID"].ToString()));
                if (intReportType == 3)
                {
                    GridDataItem dataItem         = e.Item as GridDataItem;
                    int          columnCount      = ((DataRowView)dataItem.DataItem).Row.Table.Columns.Count;
                    string       cellValue        = string.Empty;
                    string       uniqueColumnname = string.Empty;
                    string       paidexamfee      = string.Empty;
                    string       paidondemandfee  = string.Empty;

                    BEAdmin objBEAdmin = new BEAdmin();
                    BAdmin  objBAdmin  = new BAdmin();
                    objBAdmin.BGetPaymentMode(objBEAdmin);
                    if (objBEAdmin.DtResult != null && objBEAdmin.DtResult.Rows.Count > 0)
                    {
                        paidexamfee     = objBEAdmin.DtResult.Rows[0]["PaidBy_ExamFee"].ToString();
                        paidondemandfee = objBEAdmin.DtResult.Rows[0]["PaidBy_OnDemandFee"].ToString();
                    }
                    for (int x = 0; x < columnCount; x++)
                    {
                        if (x == 8)
                        {
                            uniqueColumnname = ((DataRowView)dataItem.DataItem).Row.Table.Columns[x].ToString();
                            cellValue        = ((DataRowView)dataItem.DataItem)[uniqueColumnname].ToString();
                            if (paidexamfee == "University")
                            {
                                TableCell cell = dataItem[uniqueColumnname];
                                cell.BackColor = System.Drawing.Color.White;
                            }
                            else if (paidexamfee == "Student")
                            {
                                TableCell cell = dataItem[uniqueColumnname];
                                cell.BackColor = System.Drawing.Color.Orange;
                                cell.ToolTip   = "Paid by Student";
                            }
                        }

                        if (x == 9)
                        {
                            uniqueColumnname = ((DataRowView)dataItem.DataItem).Row.Table.Columns[x].ToString();
                            cellValue        = ((DataRowView)dataItem.DataItem)[uniqueColumnname].ToString();
                            if (paidondemandfee == "University")
                            {
                                TableCell cell = dataItem[uniqueColumnname];
                                cell.BackColor = System.Drawing.Color.White;
                            }
                            else if (paidondemandfee == "Student")
                            {
                                TableCell cell = dataItem[uniqueColumnname];
                                cell.BackColor = System.Drawing.Color.Orange;
                                cell.ToolTip   = "Paid by Student";
                            }
                        }
                    }
                }
            }
        }
        protected void LoadExamStatusDetails(DateTime StartDate, DateTime EndDate)
        {
            //hidFromDate.Value = StartDate.ToShortDateString();
            //hidToDate.Value = EndDate.ToShortDateString();


            //string Status = "'0',";
            //foreach (RadComboBoxItem chkStatus in ddlTransactionStatus.Items)
            //{
            //    if (chkStatus.Checked)
            //    {
            //        Status = Status + "'" + chkStatus.Value + "',";
            //    }
            //}
            //Status = Status.Substring(0, Status.Length - 1);

            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.IntUserID     = int.Parse(Session[BaseClass.EnumPageSessions.USERID].ToString());
            objBECommon.DateStartDate = StartDate;
            objBECommon.DateEndDate   = EndDate;

            objBCommon.BGetExamBillingDetails(objBECommon);

            DataTable objDt = objBECommon.DsResult.Tables[0];

            for (int i = 1; i < objBECommon.DsResult.Tables.Count; i++)
            {
                objDt.Merge(objBECommon.DsResult.Tables[i]);
            }
            objDt.AcceptChanges();

            //gvReports.DataSource = objDt;
            if (objDt != null && objDt.Rows.Count > 0)
            {
                gvReports.DataSource = objDt;
                //gvReports.Rebind();
                trExportButtons.Visible = true;
                trGridView.Visible      = true;
            }
            else
            {
                gvReports.DataSource    = new Object[0];
                trExportButtons.Visible = false;
                trGridView.Visible      = true;
            }
            //gvReports.Rebind();
            //gvReports.DataBind();
            trexamfee.Visible       = true;
            tdtotalfee.Visible      = true;
            tdtotalfeelabel.Visible = true;
            //trondemandfee.Visible = true;
            string paidexamfee     = string.Empty;
            string paidondemandfee = string.Empty;

            BEAdmin objBEAdmin = new BEAdmin();
            BAdmin  objBAdmin  = new BAdmin();

            objBAdmin.BGetPaymentMode(objBEAdmin);
            if (objBEAdmin.DtResult != null && objBEAdmin.DtResult.Rows.Count > 0)
            {
                paidexamfee     = objBEAdmin.DtResult.Rows[0]["PaidBy_ExamFee"].ToString();
                paidondemandfee = objBEAdmin.DtResult.Rows[0]["PaidBy_OnDemandFee"].ToString();
            }
            lblRecords.Text    = objDt.Rows.Count.ToString();
            btnInvoice.Enabled = true;
            btnInvoice.ToolTip = "Generate Invoice";
            //lblExamFee.Text = "$" + objDt.Compute("SUM(ExamFee)", String.Empty);
            //lblOnDemandFee.Text = "$" + objDt.Compute("SUM(OndemandFee)", String.Empty);
            if (paidexamfee == "University" && paidondemandfee != "University")
            {
                //tdondemandfee.Visible = false;
                //tdondemandfeelabel.Visible = false;
                //tdexamfeelabel.Visible = true;
                //tdexamfee.Visible = true;
                lblexamfeetitle.Text  = "Total Exam Fee (University) :";
                lblondemandtitle.Text = "Total On-demand Fee (Student) :";
                lbltotalfeetitle.Text = "Total Fee (Paid by University) :";
                lblExamFee.Text       = "$" + objDt.Compute("SUM([Exam Fee (Paid by University)])", String.Empty);
                lblOnDemandFee.Text   = "$" + objDt.Compute("SUM([On-demandFee (Paid by Student)])", String.Empty);
                lblTotalFee.Text      = "$" + objDt.Compute("SUM([Exam Fee (Paid by University)])", String.Empty);
            }
            else if (paidexamfee != "University" && paidondemandfee == "University")
            {
                //tdexamfeelabel.Visible = false;
                //tdexamfee.Visible = false;
                //tdondemandfee.Visible = true;
                //tdondemandfeelabel.Visible = true;
                lblexamfeetitle.Text  = "Total Exam Fee (Student) :";
                lblondemandtitle.Text = "Total On-demand Fee (University) :";
                lbltotalfeetitle.Text = "Total Fee (Paid by University) :";
                lblExamFee.Text       = "$" + objDt.Compute("SUM([Exam Fee (Paid by Student)])", String.Empty);
                lblOnDemandFee.Text   = "$" + objDt.Compute("SUM([On-demandFee (Paid by University)])", String.Empty);
                lblTotalFee.Text      = "$" + objDt.Compute("SUM([On-demandFee (Paid by University)])", String.Empty);
            }
            else if (paidexamfee == "University" && paidondemandfee == "University")
            {
                //tdexamfeelabel.Visible = true;
                //tdexamfee.Visible = true;
                //tdondemandfee.Visible = true;
                //tdondemandfeelabel.Visible = true;
                lblexamfeetitle.Text  = "Total Exam Fee (University) :";
                lblondemandtitle.Text = "Total On-demand Fee (University) :";
                lbltotalfeetitle.Text = "Total Fee (Paid by University) :";
                lblExamFee.Text       = "$" + objDt.Compute("SUM([Exam Fee (Paid by University)])", String.Empty);
                lblOnDemandFee.Text   = "$" + objDt.Compute("SUM([On-demandFee (Paid by University)])", String.Empty);
                lblTotalFee.Text      = "$" + objDt.Compute("SUM([Total Fee (Paid by University)])", String.Empty);
            }
            else if (paidexamfee != "University" && paidondemandfee != "University")
            {
                //lblTotalFee.Text = "$" + objDt.Compute("SUM(TotalFee)", String.Empty);
                //tdexamfeelabel.Visible = false;
                //tdexamfee.Visible = false;
                //tdondemandfee.Visible = false;
                //tdondemandfeelabel.Visible = false;
                //tdtotalfee.Visible = false;
                //tdtotalfeelabel.Visible = false;
                lblexamfeetitle.Text  = "Total Exam Fee (Student) :";
                lblondemandtitle.Text = "Total On-demand Fee (Student) :";
                lbltotalfeetitle.Text = "Total Fee (Paid by University) :";
                lblExamFee.Text       = "$" + objDt.Compute("SUM([Exam Fee (Paid by Student)])", String.Empty);
                lblOnDemandFee.Text   = "$" + objDt.Compute("SUM([On-demandFee (Paid by Student)])", String.Empty);
                lblTotalFee.Text      = "$" + objDt.Compute("0", String.Empty);
                btnInvoice.Enabled    = false;
                btnInvoice.ToolTip    = "Invoice cannot be raised as the Payment mode is Student";
            }
        }