Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                DataTable dt = clsCollegeAdmissionReports.GetAcademicYear();
                ViewState["AcademicYear"] = dt;
                //Common.fillDropDown(ddlAcademicYr, dt, "", "Year", "pk_AcademicYear_ID", "--- Select ---");
                //ddlAcademicYr.SelectedIndex = 0;
            }

            //hid_AcademicYear.Value = ddlAcademicYr.SelectedItem.Text;
            //hid_fk_AcademicYr_ID.Value = ddlAcademicYr.SelectedValue.ToString();

            hid_AcademicYear.Value     = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
            hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;

            //hiding not required portions of user control
            YCMOU.IsInstituteDisplay         = false;
            YCMOU.IsFacultyDisplay           = false;
            YCMOU.IsCourseDisply             = false;
            YCMOU.IsCoursePartDisply         = false;
            YCMOU.IsCourseTermDisply         = false;
            YCMOU.IsBranchDisply             = false;
            YCMOU.IsReportUserAndDateDisplay = false;
            YCMOU.isMISRpt.Value             = "Yes";
            YCMOU.OnProceedClick            += btnNext_Click;
            //user = (clsUser)Session["User"];

            #region Handling Redirection from Landing page Panels

            if (Request.QueryString["LandingPgStats"] != null && GVStat.Rows.Count == 0)
            {
                string AcYrID   = string.Empty;
                string AcYrText = string.Empty;
                if (Request.QueryString["LandingPgStats"] != null)
                {
                    AcYrID   = Request.QueryString["LandingPgStats"].ToString().Split('|')[0].ToString();
                    AcYrText = Request.QueryString["LandingPgStats"].ToString().Split('|')[1].ToString();
                }

                DT = clsCollegeAdmissionReports.FillMISReportAll(AcYrID, null);
                if (DT.Rows.Count > 0)
                {
                    GVStat.DataSource = DT;
                    GVStat.DataBind();
                    Button3.Style.Add("display", "block");
                    btnPDF.Style.Add("display", "block");
                    divDGStat.Style.Add("display", "block");
                    divYCMOU.Style.Add("display", "none");
                    Session["MISdtData"] = DT;
                    lblAcaYear.Text      = " [Academic Year " + AcYrText + "]";
                }
            }


            #endregion
        }
Exemplo n.º 2
0
        private bool BindReport()
        {
            CreateHashTable();
            oReport = new clsReports();
            DataSet oDs = null;

            using (oDs = oReport.GetFormBReportData(oHt))
            {
                if (oDs != null && oDs.Tables.Count > 0 && oDs.Tables[0] != null && oDs.Tables[0].Rows.Count > 0)
                {
                    oDt = oDs.Tables[0];
                    rptViewer.LocalReport.DataSources.Clear();
                    rptViewer.LocalReport.ReportPath = clsGetSettings.PhysicalSitePath + "Eligibility\\Rdlc\\rptFormB.rdlc";
                    ReportDataSource  oRds  = new ReportDataSource("dsFormB", oDt);
                    ReportParameter[] param = new ReportParameter[5];
                    param[0] = new ReportParameter("College", oDt.Rows[0]["Inst_Name"].ToString(), true);
                    param[1] = new ReportParameter("Term", hidCrName.Value, true);
                    param[2] = new ReportParameter("IntakeCapcity", oDt.Rows[0]["IntakeCapacity"].ToString(), true);
                    param[3] = new ReportParameter("University", clsGetSettings.UniversityName, true);
                    param[4] = new ReportParameter("AcademicYear", ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text, true);
                    //param[2] = new ReportParameter("UniSitePath", clsGetSettings.SitePath.ToString(), true);
                    //param[3] = new ReportParameter("UniversityCity", clsGetSettings.UniversityCity, true);
                    //param[4] = new ReportParameter("userName", user.Name, true);
                    //param[5] = new ReportParameter("Address", clsGetSettings.Address, true);
                    //string sCriteria = "Branch Change details for " + user.Name; ;
                    //param[6] = new ReportParameter("ReportCriteria", sCriteria, true);
                    ReportDataSource MultNomDS         = new ReportDataSource("dsMultiNom", MultinomenClature());
                    ReportDataSource DSFormBSummaryMed = null;
                    ReportDataSource DSFormBSummaryCat = null;
                    if (oDs.Tables[2] != null && oDs.Tables[2].Rows.Count > 0)
                    {
                        DSFormBSummaryMed = new ReportDataSource("DSFormBSummaryMed", oDs.Tables[2]);
                    }
                    if (oDs.Tables[1] != null && oDs.Tables[1].Rows.Count > 0)
                    {
                        DSFormBSummaryCat = new ReportDataSource("DSFormBSummaryCat", oDs.Tables[1]);
                    }
                    rptViewer.LocalReport.EnableExternalImages = true;
                    rptViewer.LocalReport.SetParameters(param);
                    rptViewer.LocalReport.DataSources.Add(oRds);
                    rptViewer.LocalReport.DataSources.Add(DSFormBSummaryMed);
                    rptViewer.LocalReport.DataSources.Add(DSFormBSummaryCat);
                    rptViewer.LocalReport.DataSources.Add(MultNomDS);
                    rptViewer.LocalReport.Refresh();
                    return(true);
                }
                else
                {
                    lblErrorMsg.Visible = true;
                    return(false);
                }
            }
        }
        // Validation oValidate = null;
        //clsCommon oCommon = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            {
                oUser = (clsUser)Session["User"];
                //YCMOU.isUSRpt.Value = "Yes";

                if (oUser != null && oUser.Exist)
                {
                    sUser = oUser.User_ID;
                }
                else
                {
                    Response.Redirect(Classes.clsGetSettings.SitePath.ToString() + "Logout.aspx");
                }


                hid_AcademicYear.Value     = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
                hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;

                if (!IsPostBack)
                {
                    Session.Remove("dtdata");
                    hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                    hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                    System.Data.DataTable dt = clsCollegeAdmissionReports.GetAcademicYear();
                    ViewState["AcademicYear"]        = dt;
                    YCMOU.IsReportUserAndDateDisplay = false;
                    YCMOU.IsInstituteDisplay         = false;
                }

                ContentPlaceHolder Cntph = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");
                hid_AcademicYear.Value     = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
                hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;
                YCMOU.OnProceedClick      += btnNext_Click;
                YCMOU.IsInstituteDisplay   = false;

                if (oUser.UserTypeCode == "2")
                {
                    instIDs                  = oUser.UserReferenceID;
                    hidInstID.Value          = instIDs.ToString();
                    hidCollName.Value        = oUser.Name;
                    YCMOU.IsInstituteDisplay = false;
                    //  YCMOU.IsCollegeLogin = true;
                    //YCMOU.IsFacultyDisplay = false;
                    //YCMOU.IsCourseDisply = false;
                    //YCMOU.IsCoursePartDisply = false;
                    //YCMOU.IsCourseTermDisply = false;
                    //YCMOU.IsBranchDisply = false;
                    lblAcaYear.Text = hidCollName.Value;
                }
            }
        }
        private void fillGrid()
        {
            DataTable dtTmp = new DataTable();

            try
            {
                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                    {
                        dtTmp = clsCollegeAdmissionReports.REPV2_AllInstitutes_uploaded_dataLessThanOneYear(hid_fk_AcademicYr_ID.Value, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue);
                    }
                    else
                    {
                        dtTmp = clsCollegeAdmissionReports.REPV2_AllInstitutes_uploaded_dataLessThanOneYear(hid_fk_AcademicYr_ID.Value, null);
                    }
                }
                else
                {
                    dtTmp = clsCollegeAdmissionReports.REPV2_AllInstitutes_uploaded_dataLessThanOneYear(hid_fk_AcademicYr_ID.Value, null);
                }
                //dtTmp.TableName = "Table1";
                //DS1.Tables.Add(dtTmp.Copy());
                //dtTmp = null;


                //   GVStat.DataSource = SummaryTables();
                GVStat.DataSource = dtTmp;
                GVStat.DataBind();
                // Session["dtdata"] = SummaryTables();
                Session["dtdata"] = dtTmp;
                DTdata            = (DataTable)Session["dtdata"];
            }

            catch (Exception) { }

            GVStat.Visible = true;
            if (GVStat.Rows.Count == 0)
            {
                divDGStat.Style.Add("display", "none");
                //divAcademicYr.Style.Add("display", "block");
                Button3.Style.Add("display", "none");
                //lblAcYrError.Text = "No Record(s) found.";
                // tblNoRecForAcYr.Style.Add("display", "block");
                tblSelect.Style.Add("display", "none");
                tblheader.Style.Add("display", "none");
            }
            if (GVStat.Rows.Count > 0)
            {
                divYCMOU.Style.Add("display", "none");
            }
        }
 private void CreateHashTable()
 {
     oHt                   = new Hashtable();
     oHt["UniID"]          = hidUniID.Value.Trim();
     oHt["InstID"]         = hidInstID.Value.Trim();
     oHt["FacID"]          = hidFacID.Value.Trim();
     oHt["CrID"]           = hidCrID.Value.Trim();
     oHt["MoLrnID"]        = hidMoLrnID.Value.Trim();
     oHt["PtrnID"]         = hidPtrnID.Value.Trim();
     oHt["BrnID"]          = hidBrnID.Value.Trim();
     oHt["CrPrDetailsID"]  = hidCrPrDetailsID.Value.Trim();
     oHt["AcademicYearID"] = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;
     oHt["User"]           = user.User_ID;
 }
Exemplo n.º 6
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            lblMessage.Text = "";
            // set hiddens and call 'Allow' check


            hidPRN.Value = ((TextBox)YCMOU.FindControl("txtPRN")).Text;

            if (((TextBox)YCMOU.FindControl("txtElgFormNo")).Text != "")
            {
                hidElgFormNo.Value = ((TextBox)YCMOU.FindControl("txtElgFormNo")).Text.Trim();
            }

            hidAppFormNo.Value = ((TextBox)YCMOU.FindControl("txtApplFormNo")).Text;
            FillGrid();
        }
        protected void btnAcYr_Click(object sender, EventArgs e)
        {
            try
            {
                tblSelect.Style.Add("display", "block");
                //divAcademicYr.Style.Add("display", "none");
                lblWaitMsg.Visible = true;
                DivCollegeUploadInfo.Style.Add("display", "block");
                divDGStat.Style.Add("display", "block");
                GVStat.Visible = true;
                tblheader.Style.Add("display", "block");
                Button3.Style.Add("display", "inline");

                string RegCentreName = string.Empty;

                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                    {
                        RegCentreName   = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                        lblAcaYear.Text = " for Regional Center " + RegCentreName + " for [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                    }
                    else
                    {
                        lblAcaYear.Text = " for All Regional Centers [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                    }
                }
                else
                {
                    lblAcaYear.Text = " for [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                }
                if (user.UserTypeCode == "2")
                {
                    DivCollegeUploadInfo.Style.Add("display", "none");
                    divDGStat.Style.Add("display", "block");
                    lblAcaYear.Text = " " + "for " + InstRep.InstituteName(hidUniID.Value, instIDs) + " for" + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                }
                fillGrid();
            }
            catch (TimeoutException ex)
            {
                divWaitMsg.Style.Add("display", "block");
            }
        }
Exemplo n.º 8
0
        protected void GV_SrchStud_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            WebControl  wc  = e.CommandSource as WebControl;
            GridViewRow row = wc.NamingContainer as GridViewRow;

            if (e.CommandName.Equals("PaperChange"))
            {
                if (row != null)
                {
                    int         index       = row.RowIndex;
                    GridViewRow selectedRow = GV_SrchStud.Rows[index];

                    hidStudentName.Value   = Convert.ToString(selectedRow.Cells[0].Text);
                    hidCrName.Value        = Convert.ToString(selectedRow.Cells[1].Text);
                    hidFacID.Value         = Convert.ToString(selectedRow.Cells[3].Text);
                    hidCrID.Value          = Convert.ToString(selectedRow.Cells[4].Text);
                    hidMoLrnID.Value       = Convert.ToString(selectedRow.Cells[5].Text);
                    hidPtrnID.Value        = Convert.ToString(selectedRow.Cells[6].Text);
                    hidBrnID.Value         = Convert.ToString(selectedRow.Cells[7].Text);
                    hidCrPrDetailsID.Value = Convert.ToString(selectedRow.Cells[8].Text);
                    hidCrPrChID.Value      = Convert.ToString(selectedRow.Cells[9].Text);
                    hidAppFormNo.Value     = ((TextBox)YCMOU.FindControl("txtApplFormNo")).Text;
                    Server.Transfer("ELGV2_PaperChange__2.aspx");
                }
            }
            else if (e.CommandName.Equals("CetDetails"))
            {
                int         index       = row.RowIndex;
                GridViewRow selectedRow = GV_SrchStud.Rows[index];

                hidStudentName.Value   = Convert.ToString(selectedRow.Cells[0].Text);
                hidCrName.Value        = Convert.ToString(selectedRow.Cells[1].Text);
                hidFacID.Value         = Convert.ToString(selectedRow.Cells[3].Text);
                hidCrID.Value          = Convert.ToString(selectedRow.Cells[4].Text);
                hidMoLrnID.Value       = Convert.ToString(selectedRow.Cells[5].Text);
                hidPtrnID.Value        = Convert.ToString(selectedRow.Cells[6].Text);
                hidBrnID.Value         = Convert.ToString(selectedRow.Cells[7].Text);
                hidCrPrDetailsID.Value = Convert.ToString(selectedRow.Cells[8].Text);
                hidCrPrChID.Value      = Convert.ToString(selectedRow.Cells[9].Text);
                Server.Transfer("ELGV2_CETDetails.aspx");
            }
        }
 private void getFacCrMoLrnPtrnID()
 {
     if (((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedValue != "0")
     {
         IDs_List         = Convert.ToString(((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedValue).Split('-');
         hidFacID.Value   = Convert.ToString(IDs_List[0]).Trim();
         hidCrID.Value    = Convert.ToString(IDs_List[1]).Trim();
         hidMoLrnID.Value = Convert.ToString(IDs_List[2]).Trim();
         hidPtrnID.Value  = Convert.ToString(IDs_List[3]).Trim();
     }
     else
     {
         if (((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedValue == "0")
         {
             hidCrID.Value    = "0";
             hidMoLrnID.Value = "0";
             hidPtrnID.Value  = "0";
         }
         hidFacID.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
     }
 }
        protected void btnNext_Click(object sender, EventArgs e)
        {
            string courseOrColl = string.Empty;
            string collName     = string.Empty;

            if (user.UserTypeCode != "2")
            {
                hidInstID.Value   = string.Empty;
                hidCollName.Value = string.Empty;
            }
            hidFacName.Value     = string.Empty;
            hidCrName.Value      = string.Empty;
            hidBrName.Value      = string.Empty;
            hidCrPrDetName.Value = string.Empty;
            hidCrPrChName.Value  = string.Empty;
            hidCrPrChIds.Value   = string.Empty;
            hidCrPrChNames.Value = string.Empty;
            hidCrName.Value      = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
            //Session.Remove("Ddtdata");


            hidFacID.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
            getFacCrMoLrnPtrnID();
            hidBrnID.Value         = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedValue;
            hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
            hidCrPrChID.Value      = ((CheckBoxList)YCMOU.FindControl("chkChild")).SelectedValue;
            lblAcaYear.Text        = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";

            if (BindReport())
            {
                GenerateReport("EXCEL", ".xls");
            }

            //DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, null);

            //if (DT.Rows.Count > 0)
            //{

            //}
        }
        protected void btnNext_Click(object sender, EventArgs e)
        {
            string courseOrColl = string.Empty;
            string collName     = string.Empty;

            hidFacName.Value     = string.Empty;
            hidCrName.Value      = string.Empty;
            hidBrName.Value      = string.Empty;
            hidCrPrDetName.Value = string.Empty;
            hidCrPrChName.Value  = string.Empty;
            if (oUser.UserTypeCode != "2")
            {
                hidInstID.Value   = string.Empty;
                hidCollName.Value = string.Empty;

                if (((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedIndex != 0 || ((TextBox)YCMOU.FindControl("txtCenterCode")).Text != string.Empty)
                {
                    // Selected Study Center for Regional Center login
                    hidInstID.Value   = ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedValue.Split('|')[0];
                    hidCollName.Value = ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedItem.Text;
                    if (((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue.Equals("0"))
                    {
                        hidCrName.Value = "All Courses";
                    }
                    else
                    {
                        hidCrName.Value = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                        hidFacID.Value  = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
                        getFacCrMoLrnPtrnID();
                        hidBrnID.Value         = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedValue;
                        hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
                        hidCrPrChID.Value      = ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedValue;
                    }
                }
                else
                {
                    hidCollName.Value = "All Colleges";
                    hidCrName.Value   = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                    hidFacID.Value    = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
                    getFacCrMoLrnPtrnID();
                    hidBrnID.Value         = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedValue;
                    hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
                    hidCrPrChID.Value      = ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedValue;
                }
            }
            else
            {
                hidCollName.Value = oUser.Name;
                if (((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue.Equals("0"))
                {
                    hidCrName.Value = "All Courses";
                }
                else
                {
                    hidCrName.Value = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                    hidFacID.Value  = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
                    getFacCrMoLrnPtrnID();
                    hidBrnID.Value         = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedValue;
                    hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
                    hidCrPrChID.Value      = ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedValue;
                }
            }
            lblAcaYear.Text = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";

            if (BindReport())
            {
                GenerateReport("EXCEL", ".xls");
            }

            //string courseOrColl = string.Empty;
            //string collName = string.Empty;
            //if (oUser.UserTypeCode != "2")
            //{
            //    hidInstID.Value = string.Empty;
            //    hidCollName.Value = string.Empty;
            //}
            //hidFacName.Value = string.Empty;
            //hidCrName.Value = string.Empty;
            //hidBrName.Value = string.Empty;
            //hidCrPrDetName.Value = string.Empty;
            //hidCrPrChName.Value = string.Empty;
            // try
            //{
            //    if (oUser.UserTypeCode != "2" || YCMOU.IsRegionalCenterLogin == "True")
            //    //***********************************************
            //    {
            //        //setting hidden vars from dropdown selections of oUser control

            //        if (((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedIndex != 0 || ((TextBox)YCMOU.FindControl("txtCenterCode")).Text != string.Empty)
            //        {
            //            hidInstID.Value = ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedValue.Split('|')[0];
            //            hidCollName.Value = ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedItem.Text;
            //            if (!hidInstID.Value.Equals(string.Empty) && !hidInstID.Value.Equals("0"))
            //            {
            //                DT = clsCollegeAdmissionReports.FetchSelectedCollegeOuterReport(hid_fk_AcademicYr_ID.Value, hidInstID.Value);
            //                Session["dtDataStu"] = DT;
            //                if (DT.Rows.Count > 0)
            //                {
            //                    GVOuterCollege.DataSource = DT;
            //                    GVOuterCollege.DataBind();
            //                    GVOuterCollege.Style.Add("display", "block");
            //                    divDGStat.Style.Add("display", "none");
            //                    dgCollege.Style.Add("display", "block");
            //                    tblExportToExcel.Style.Add("display", "block");
            //                }
            //            }
            //            string rc_name = string.Empty;
            //            if (YCMOU.IsRegionalCenterVisible)
            //            {
            //                if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
            //                {
            //                    rc_name = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text + " - ";
            //                }
            //                //***********************************************
            //                else if (YCMOU.IsRegionalCenterLogin == "True")
            //                {
            //                    rc_name = oUser.Name + " - ";
            //                }
            //                //***********************************************
            //                else
            //                {
            //                    rc_name = "All Regional Centers";
            //                }
            //            }
            //            courseOrColl = rc_name + hidCollName.Value;

            //        }

            //    //for all colleges one course
            //        else
            //        {
            //            hidFacID.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
            //            getFacCrMoLrnPtrnID();
            //            hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
            //            hidCrPrChID.Value = ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedValue;

            //            if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
            //            {
            //                DT = clsCollegeAdmissionReports.FetchAllCollegesOuterReport(hid_fk_AcademicYr_ID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["pk_CrPrCh_ID"]), ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue);
            //            }
            //            //***********************************************************************************************************
            //            else if (YCMOU.IsRegionalCenterLogin == "True")
            //            {
            //                DT = clsCollegeAdmissionReports.FetchAllCollegesOuterReport(hid_fk_AcademicYr_ID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["pk_CrPrCh_ID"]), oUser.UserReferenceID);
            //            }
            //            //***********************************************************************************************************
            //            else
            //            {
            //                DT = clsCollegeAdmissionReports.FetchAllCollegesOuterReport(hid_fk_AcademicYr_ID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["pk_CrPrCh_ID"]), null);
            //            }
            //            Session["dtData"] = DT;
            //            if (DT.Rows.Count > 0)
            //            {
            //                GVStat.DataSource = DT;
            //                GVStat.DataBind();
            //                GVStat.Style.Add("display", "block");
            //                divDGStat.Style.Add("display", "block");
            //                dgCollege.Style.Add("display", "none");
            //                tblExportToExcel.Style.Add("display", "block");
            //                getcount();
            //                DivCollegeUploadInfo.Style.Add("display", "block");
            //                hidFacName.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text;
            //                hidCrName.Value = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text;
            //                hidBrName.Value = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text;
            //                hidCrPrName.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
            //                hidCrPrChName.Value = ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
            //            }
            //            string rc_name = string.Empty;
            //            if (YCMOU.IsRegionalCenterVisible)
            //            {
            //                if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
            //                {
            //                    rc_name = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
            //                    courseOrColl = rc_name + " - " + ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
            //                }
            //                //*******************************************************************
            //                else if (YCMOU.IsRegionalCenterLogin == "True")
            //                {
            //                    rc_name = oUser.Name;
            //                    courseOrColl = rc_name + " - " + ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
            //                }
            //                //******************************************************************
            //                else
            //                {
            //                    rc_name = "All Regional Centers";
            //                    courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text + " - " + rc_name;

            //                }
            //            }
            //            else
            //            {
            //                courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
            //            }
            //        }
            //    }

            //    //handling college login
            //    else if (oUser.UserTypeCode == "2")
            //    {
            //        DT = clsCollegeAdmissionReports.FetchSelectedCollegeOuterReport(hid_fk_AcademicYr_ID.Value, hidInstID.Value);
            //        Session["dtData"] = DT;
            //        if (DT.Rows.Count > 0)
            //        {
            //            GVOuterCollege.DataSource = DT;
            //            GVOuterCollege.DataBind();
            //            GVOuterCollege.Style.Add("display", "block");
            //            divDGStat.Style.Add("display", "none");
            //            dgCollege.Style.Add("display", "block");

            //            courseOrColl = hidCollName.Value;

            //            tblExportToExcel.Style.Add("display", "block");
            //        }
            //    }

            //    if (GVStat.Rows.Count > 0 || GVOuterCollege.Rows.Count > 0)
            //    {
            //        HideSearchCriteria();
            //        lblAcaYear.Text = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
            //    }


            //    if (((System.Data.DataTable)Session["dtdata"]) == null || ((System.Data.DataTable)Session["dtdata"]).Rows.Count == 0)
            //    {
            //        tblExportedDataMsg.Style.Add("display", "block");
            //        //courseOrColl = hidCollName.Value;
            //        //if (courseOrColl == "")
            //        //{
            //        //    courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
            //        //}
            //        lblAcaYear.Text = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
            //        lblExportedData.Text = "No records found.";
            //        Session.Remove("dtdata");

            //    }

            //    if (dtCollege != null)
            //    {
            //        dtCollege = null;
            //    }
            //}
            // catch (Exception Ex4)
            // {
            //     throw new Exception(Ex4.Message);
            // }
        }
        //#region btnSelAcademicYr_Click

        //protected void btnSelAcademicYr_Click(object sender, EventArgs e)
        //{

        //    divAcademicYr.Style.Add("display", "block");

        //}

        //#endregion

        #region Export to Excel

        protected void btnExportToExcel_Click(object sender, EventArgs e)
        {
            try
            {
                StringWriter  writer2  = new StringWriter();
                StringBuilder oSB      = new StringBuilder();
                DataTable     dtExport = new DataTable();
                dtExport = ((DataTable)Session["dtdata"]).Copy();
                dtExport.Columns["Course Name"].ColumnName         = lblCr.Text + " Name";
                dtExport.Columns["CoursePart"].ColumnName          = "Duration of Programme/ Course in Months";
                dtExport.Columns["Total uploaded data"].ColumnName = "Admissions confirmed by " + lblCollege.Text;
                oSB.Append("<?xml version=\"1.0\"?>");
                oSB.Append("<ss:Workbook xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\">");
                oSB.Append("<ss:Styles>");
                oSB.Append("<ss:Style ss:ID=\"1\">");
                oSB.Append("<ss:Font ss:Bold=\"1\"/>");
                oSB.Append("</ss:Style>");
                oSB.Append("</ss:Styles>");

                oSB.Append("<ss:Worksheet ss:Name=\"" + dtExport.TableName + "\">");
                oSB.Append("<ss:Table>");
                oSB.Append("<ss:Column ss:Width=\"400\"/>");
                oSB.Append("<ss:Column ss:Width=\"175\"/>");
                oSB.Append("<ss:Column ss:Width=\"94\"/>");
                oSB.Append("<ss:Row>");
                oSB.Append("<ss:Cell ss:MergeAcross=\"1\" ss:StyleID=\"1\"><ss:Data ss:Type=\"String\">" + "Academic Year: " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "</ss:Data></ss:Cell>");
                oSB.Append("</ss:Row>");
                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    string RegCentre = string.Empty;
                    if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
                    {
                        RegCentre = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                    }
                    else
                    {
                        RegCentre = "all Regional Centres";
                    }
                    oSB.Append("<ss:Row>");
                    oSB.Append("<ss:Cell ss:StyleID=\"1\"><ss:Data ss:Type=\"String\">" + "Regional Centre: " + RegCentre + "</ss:Data></ss:Cell>");
                    oSB.Append("</ss:Row>");

                    oSB.Append("<ss:Row>");
                    oSB.Append("<ss:Cell ss:MergeAcross=\"1\"><ss:Data ss:Type=\"String\"></ss:Data></ss:Cell>");
                    oSB.Append("</ss:Row>");
                }


                oSB.Append("<ss:Row ss:StyleID=\"1\">");
                for (int iCol = 0; iCol <= dtExport.Columns.Count - 1; iCol++)
                {
                    oSB.Append("<ss:Cell><ss:Data ss:Type=\"String\">" + dtExport.Columns[iCol].ColumnName + "</ss:Data></ss:Cell>");
                }
                oSB.Append("</ss:Row>");

                for (int iRow = 0; iRow <= dtExport.Rows.Count - 1; iRow++)
                {
                    oSB.Append("<ss:Row>");
                    for (int iCol = 0; iCol <= dtExport.Columns.Count - 1; iCol++)
                    {
                        oSB.Append("<ss:Cell><ss:Data ss:Type=\"String\">" + dtExport.Rows[iRow][iCol].ToString() + "</ss:Data></ss:Cell>");
                    }
                    oSB.Append("</ss:Row>");
                }



                oSB.Append("</ss:Table>");
                oSB.Append("</ss:Worksheet>");

                oSB.Append("</ss:Workbook>");
                this.Response.ContentType = "application/vnd.ms-excel";
                this.Response.AddHeader("Content-Disposition", "attachment; filename = " + "ExportedStatisticsReport.xls;");
                this.Response.Write(oSB.ToString());
                writer2.Close();
                this.Response.End();
                if (dtExport != null)
                {
                    dtExport = null;
                }
            }
            catch (Exception Ex3)
            {
            }

            #region RKLib

            //try
            //{

            //    if (((DataTable)Session["dtdata"]).Rows.Count == 0 || ((DataTable)Session["dtdata"]) == null)
            //    {
            //        tblExportedDataMsg.Style.Add("display", "block");
            //        lblExportedData.Text = "No records found.";
            //        Session.Remove("dtdata");
            //        ((DataTable)Session["dtdata"]).Dispose();


            //    }

            //    // Export all the details to Excel
            //    int[] ColumnsList = { 0, 1 };
            //    string[] Headers = { lblCr.Text + " Name", "Total Uploaded Data" };

            //    //RKLib.ExportData.Export objExport = new RKLib.ExportData.Export();
            //    //objExport.ExportDetails(((DataTable)Session["dtdata"]), ColumnsList, Headers, Export.ExportFormat.Excel, "ExportedStatisticsReport");

            //    //tblExportedDataMsg.Style.Add("display", "block");
            //    //lblExportedData.Text = "Exported Successfully to Excel.....";

            //}

            //catch (Exception Ex)
            //{
            //    tblExportedDataMsg.Style.Add("display", "block");
            //    lblExportedData.CssClass = "errorNote";
            //}
            //finally
            //{
            //    ((DataTable)Session["dtdata"]).Dispose();

            //}

            #endregion
        }
Exemplo n.º 13
0
        public void CreateReport()
        {
            try
            {
                #region Assign DataSet and Report Data Sourse Details

                DataTable dtExport = new DataTable();
                dtExport = ((System.Data.DataTable)Session["DdtData"]).Copy();
                ReportDataSource  ReportDetailsDS1 = new ReportDataSource("dsDisc_dtDisc", dtExport);
                ReportParameter[] p = new ReportParameter[8];
                string            term1, term2 = string.Empty;
                string[]          terms = YCMOU.hidCrPrChIds.Value.Split(',');
                if (int.Parse(terms[0]) > int.Parse(terms[1]))
                {
                    term1 = YCMOU.hidCrPrChNames.Value.Split(',')[1];
                    term2 = YCMOU.hidCrPrChNames.Value.Split(',')[0];
                }
                else
                {
                    term1 = YCMOU.hidCrPrChNames.Value.Split(',')[0];
                    term2 = YCMOU.hidCrPrChNames.Value.Split(',')[1];
                }
                p.SetValue(new ReportParameter("Term1", term1), 0);
                p.SetValue(new ReportParameter("Term2", term2), 1);
                p.SetValue(new ReportParameter("SubHead", ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]"), 2);
                p.SetValue(new ReportParameter("UserName", ((clsUser)Session["User"]).Name), 3);
                p.SetValue(new ReportParameter("UniName", clsGetSettings.Name), 4);
                p.SetValue(new ReportParameter("UniAdd", clsGetSettings.Address), 5);
                p.SetValue(new ReportParameter("Logo", Classes.clsGetSettings.SitePath + @"/Images/" + Classes.clsGetSettings.UniversityLogo
                                               ), 6);
                string RegCentre = string.Empty;
                bool   isDisplayRCCodeInReport = false;

                if (YCMOU.IsCollegeLogin.Equals(false))
                {
                    if (YCMOU.IsRegionalCenterVisible.Equals(true))
                    {
                        isDisplayRCCodeInReport = true;
                        if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
                        {
                            RegCentre = " for " + ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                        }
                        else
                        {
                            RegCentre = " for all Regional Centres";
                        }
                    }
                }
                else
                {
                    RegCentre = " for " + user.Name;
                }

                p.SetValue(new ReportParameter("RegCentre", RegCentre), 7);
                ReportDataSource MultNomDS = new ReportDataSource("dsDisc_dtMultiNom", MultinomenClature());

                #endregion

                ReportViewer1.LocalReport.DataSources.Clear();
                if (isDisplayRCCodeInReport)
                {
                    ReportViewer1.LocalReport.ReportPath = clsGetSettings.PhysicalSitePath + "Eligibility\\Rdlc\\CrPrTermWiseDisc.rdlc";
                }
                else
                {
                    ReportViewer1.LocalReport.ReportPath = clsGetSettings.PhysicalSitePath + "Eligibility\\Rdlc\\CrPrTermWiseDiscWithOutRCcode.rdlc";
                }


                #region Adding DataSet and Report Data Source to ReportViewer DataSources

                ReportViewer1.LocalReport.DataSources.Add(ReportDetailsDS1);
                ReportViewer1.LocalReport.DataSources.Add(MultNomDS);
                ReportViewer1.LocalReport.SetParameters(p);

                #endregion

                ReportViewer1.LocalReport.EnableExternalImages = true;
                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
            }
        }
Exemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user = (clsUser)Session["User"];

            if (!IsPostBack)
            {
                hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                DataTable dt = clsCollegeAdmissionReports.GetAcademicYear();

                YCMOU.hidTerms.Value = string.Empty;
            }

            if (user.UserTypeCode == "2")
            {
                instIDs              = user.UserReferenceID;
                hidInstID.Value      = instIDs.ToString();
                YCMOU.IsCollegeLogin = true;
                hidCollName.Value    = user.Name;
                lblAcaYear.Text      = hidCollName.Value;
            }

            YCMOU.isDiscRpt.Value            = "Yes";
            YCMOU.IsReportUserAndDateDisplay = false;
            YCMOU.IsInstituteDisplay         = false;
            YCMOU.OnProceedClick            += btnNext_Click;
            YCMOU.OnPartChange      += ddlCrPrDetailsDesc_SelectedIndexChanged;
            YCMOU.IsCourseTermDisply = false;


            hid_AcademicYear.Value     = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
            hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;

            tblExportedDataMsg.Style.Add("display", "none");

            #region Back Navigation
            if (Page.PreviousPage != null)
            {
                if (Request.QueryString["Navigate"] == "back")
                {
                    HideSearchCriteria();

                    ContentPlaceHolder CnDet = (ContentPlaceHolder)Page.PreviousPage.Master.FindControl("ContentPlaceHolder1");
                    hidFacName.Value     = ((HtmlInputHidden)CnDet.FindControl("hidFacName")).Value;
                    hidCrName.Value      = ((HtmlInputHidden)CnDet.FindControl("hidCrName")).Value;
                    hidBrName.Value      = ((HtmlInputHidden)CnDet.FindControl("hidBrName")).Value;
                    hidCrPrDetName.Value = ((HtmlInputHidden)CnDet.FindControl("hidCrPrDetName")).Value;
                    hidCrPrChName.Value  = ((HtmlInputHidden)CnDet.FindControl("hidCrPrChName")).Value;
                    hidCrPrName.Value    = ((HtmlInputHidden)CnDet.FindControl("hidCrPrName")).Value;
                    hidRCName.Value      = ((HtmlInputHidden)CnDet.FindControl("hidRCName")).Value;
                    hidRCID.Value        = ((HtmlInputHidden)CnDet.FindControl("hidRCID")).Value;

                    string courseOrColl = string.Empty;
                    if (hidRCID.Value != string.Empty)
                    {
                        DT = clsCollegeAdmissionReports.FillDiscrepancyReport(Request.QueryString["AcYrId"].ToString(), hidInstID.Value, Request.QueryString["FacId"].ToString(), Request.QueryString["CrId"].ToString(), Request.QueryString["MoLrnId"].ToString(), Request.QueryString["PtrnId"].ToString(), Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["crprchids"]), hidRCID.Value);
                    }
                    else
                    {
                        DT = clsCollegeAdmissionReports.FillDiscrepancyReport(Request.QueryString["AcYrId"].ToString(), hidInstID.Value, Request.QueryString["FacId"].ToString(), Request.QueryString["CrId"].ToString(), Request.QueryString["MoLrnId"].ToString(), Request.QueryString["PtrnId"].ToString(), Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["crprchids"]), null);
                    }
                    Session["DdtData"] = DT;
                    if (DT.Rows.Count > 0)
                    {
                        GVReport.DataSource = DT;
                        GVReport.DataBind();
                        GVReport.Style.Add("display", "block");
                        string RegCentreName = string.Empty;
                        if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                        {
                            RegCentreName = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                            courseOrColl  = " for " + hidFacName.Value + " - " + hidCrName.Value + " - " + hidBrName.Value + " - " + hidCrPrDetName.Value + " - " + hidCrPrChName.Value + " for Regional Center " + RegCentreName;
                        }
                        else
                        {
                            courseOrColl = " for " + hidFacName.Value + " - " + hidCrName.Value + " - " + hidBrName.Value + " - " + hidCrPrDetName.Value + " - " + hidCrPrChName.Value + " for All Regional Centers ";
                        }
                        lblAcaYear.Text = courseOrColl + " [Academic Year " + Request.QueryString["AcYrName"].ToString() + "]";
                    }
                    if (DT != null)
                    {
                        DT = null;
                    }
                }
            }
            #endregion
        }
Exemplo n.º 15
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            string courseOrColl = string.Empty;
            string collName     = string.Empty;

            if (user.UserTypeCode != "2")
            {
                hidInstID.Value   = string.Empty;
                hidCollName.Value = string.Empty;
            }
            hidFacName.Value     = string.Empty;
            hidCrName.Value      = string.Empty;
            hidBrName.Value      = string.Empty;
            hidCrPrDetName.Value = string.Empty;
            hidCrPrChName.Value  = string.Empty;
            hidCrPrChIds.Value   = string.Empty;
            hidCrPrChNames.Value = string.Empty;
            Session.Remove("Ddtdata");
            try
            {
                hidFacID.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
                getFacCrMoLrnPtrnID();
                hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
                hidCrPrChID.Value      = ((CheckBoxList)YCMOU.FindControl("chkChild")).SelectedValue;
                //****************************************************************
                if (YCMOU.IsRegionalCenterLogin == "True")
                {
                    hidInstID.Value = string.Empty;
                    DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, user.UserReferenceID);
                }
                //****************************************************************
                else if (hidInstID.Value.Equals(string.Empty))
                {
                    if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                    {
                        if (((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedIndex != 0)
                        {
                            DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue, ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedValue.Split('|')[0]);
                        }
                        else
                        {
                            DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue);
                        }
                    }
                    else
                    {
                        DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, null);
                    }
                }

                //college login
                else
                {
                    DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, null);
                }
                Session["DdtData"] = DT;
                if (DT.Rows.Count > 0)
                {
                    if (GVReport.Columns[3].HeaderText == "")
                    {
                        string[] terms = YCMOU.hidCrPrChIds.Value.Split(',');
                        if (int.Parse(terms[0]) > int.Parse(terms[1]))
                        {
                            GVReport.Columns[3].HeaderText = "Total Uploaded Data for " + GVReport.Columns[3].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[1];
                            GVReport.Columns[4].HeaderText = "Total Uploaded Data for " + GVReport.Columns[4].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[0];
                        }
                        else if (int.Parse(terms[0]) < int.Parse(terms[1]))
                        {
                            GVReport.Columns[3].HeaderText = "Total Uploaded Data for " + GVReport.Columns[3].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[0];
                            GVReport.Columns[4].HeaderText = "Total Uploaded Data for " + GVReport.Columns[4].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[1];
                        }
                    }
                    hidFacName.Value    = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text;
                    hidCrName.Value     = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text;
                    hidBrName.Value     = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text;
                    hidCrPrName.Value   = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                    GVReport.DataSource = DT;
                    GVReport.DataBind();
                    Button3.Style.Add("display", "block");
                    btnPDF.Style.Add("display", "block");
                    string RegCentreName = string.Empty;
                    if (YCMOU.IsCollegeLogin.Equals(false))
                    {
                        if (YCMOU.IsRegionalCenterVisible.Equals(true))
                        {
                            if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                            {
                                RegCentreName = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                                courseOrColl  = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - for Regional Center " + RegCentreName;
                            }
                            else
                            {
                                courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - for All Regional Centers ";
                            }
                        }
                        else
                        {
                            courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                        }
                    }
                    else
                    {
                        courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                    }
                    HideSearchCriteria();
                }


                lblAcaYear.Text = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";


                if (((System.Data.DataTable)Session["Ddtdata"]) == null || ((System.Data.DataTable)Session["Ddtdata"]).Rows.Count == 0)
                {
                    string RegCentreName = string.Empty;
                    courseOrColl = hidCollName.Value;
                    if (courseOrColl == "")
                    {
                        if (YCMOU.IsCollegeLogin.Equals(false))
                        {
                            if (YCMOU.IsRegionalCenterVisible.Equals(true))
                            {
                                if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                                {
                                    RegCentreName = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                                    courseOrColl  = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + "- for Regional Center " + RegCentreName;
                                }
                                else
                                {
                                    courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - for All Regional Centers ";
                                }
                            }
                            else
                            {
                                courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                            }
                        }

                        else
                        {
                            courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text;
                        }
                    }
                    lblAcaYear.Text      = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                    lblExportedData.Text = "No records found.";
                    tblExportedDataMsg.Style.Add("display", "block");
                    Session.Remove("dtdata");
                }

                if (dtCollege != null)
                {
                    dtCollege = null;
                }
            }
            catch (Exception Ex4)
            {
                throw new Exception(Ex4.Message);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //btnAcYr.Attributes.Add("onclick", "return callvaliadteAcademic();");
            user = (clsUser)Session["User"];

            if (user != null && user.Exist)
            {
                sUser = user.User_ID;
            }
            else
            {
                Response.Redirect(Classes.clsGetSettings.SitePath.ToString() + "Logout.aspx");
            }

            if (user.UserTypeCode == "2")
            {
                instIDs         = user.UserReferenceID;
                hidInstID.Value = instIDs.ToString();
                //divAcademicYr.Style.Add("display", "block");
                divWaitMsg.Style.Add("display", "none");
            }

            if (IsPostBack)
            {
                flag = 1;
            }


            if (!IsPostBack)
            {
                if (PreviousPage != null)
                {
                    ContentPlaceHolder Cntp = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");

                    if (((HtmlInputHidden)Cntp.FindControl("hidInstID")).Value != null || ((HtmlInputHidden)Cntp.FindControl("hidInstID")).Value != "")
                    {
                        hidInstID.Value = ((HtmlInputHidden)Cntp.FindControl("hidInstID")).Value;
                    }
                }

                instIDs = "";
                //DataTable dt = clsCollegeAdmissionReports.GetAcademicYear();
                //Common.fillDropDown(ddlAcademicYr, dt, "", "Year", "pk_AcademicYear_ID", "--- Select ---");
                //ddlAcademicYr.SelectedIndex = 0;
                Session.Remove("dtdata");

                hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
            }

            ContentPlaceHolder Cntph = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");


            hid_AcademicYear.Value     = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
            hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;

            YCMOU.IsInstituteDisplay         = false;
            YCMOU.IsFacultyDisplay           = false;
            YCMOU.IsCourseDisply             = false;
            YCMOU.IsCoursePartDisply         = false;
            YCMOU.IsCourseTermDisply         = false;
            YCMOU.IsBranchDisply             = false;
            YCMOU.IsReportUserAndDateDisplay = false;
            YCMOU.isMISRpt.Value             = "Yes";
            YCMOU.OnProceedClick            += btnAcYr_Click;
        }
Exemplo n.º 17
0
        public void CreateReport()
        {
            try
            {
                #region Assign DataSet and Report Data Sourse Details

                DataTable dtExport = new DataTable();
                dtExport = ((System.Data.DataTable)Session["MISdtData"]).Copy();
                ReportDataSource  ReportDetailsDS1 = new ReportDataSource("dsMIS_dtMIS", dtExport);
                ReportParameter[] p = new ReportParameter[6];
                if (Request.QueryString["LandingPgStats"] != null)
                {
                    p.SetValue(new ReportParameter("AcYr", Request.QueryString["LandingPgStats"].ToString().Split('|')[1].ToString()), 0);
                }
                else
                {
                    p.SetValue(new ReportParameter("AcYr", hid_AcademicYear.Value), 0);
                }

                p.SetValue(new ReportParameter("UniName", clsGetSettings.Name), 1);
                p.SetValue(new ReportParameter("UniAdd", clsGetSettings.Address), 2);
                p.SetValue(new ReportParameter("UserName", ((clsUser)Session["User"]).Name), 3);
                p.SetValue(new ReportParameter("Logo", Classes.clsGetSettings.SitePath + "Images/" + clsGetSettings.Logo, true
                                               ), 4);
                string RegCentre = string.Empty;
                bool   isDisplayRCCodeInReport = false;
                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    isDisplayRCCodeInReport = true;
                    if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
                    {
                        RegCentre = " for " + ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                    }
                    else
                    {
                        RegCentre = " for all Regional Centres";
                    }
                }


                p.SetValue(new ReportParameter("RegCentre", RegCentre), 5);


                ReportDataSource MultNomDS = new ReportDataSource("dsDisc_dtMultiNom", MultinomenClature());

                #endregion

                ReportViewer1.LocalReport.DataSources.Clear();
                if (isDisplayRCCodeInReport)
                {
                    ReportViewer1.LocalReport.ReportPath = clsGetSettings.PhysicalSitePath + "Eligibility\\Rdlc\\MIS.rdlc";
                }
                else
                {
                    ReportViewer1.LocalReport.ReportPath = clsGetSettings.PhysicalSitePath + "Eligibility\\Rdlc\\MISWithOutRCcode.rdlc";
                }
                #region Adding DataSet and Report Data Sourse to ReportViewer DataSources

                ReportViewer1.LocalReport.DataSources.Add(ReportDetailsDS1);
                ReportViewer1.LocalReport.DataSources.Add(MultNomDS);
                ReportViewer1.LocalReport.SetParameters(p);

                #endregion

                ReportViewer1.LocalReport.EnableExternalImages = true;
                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception Ex)
            {
                Exception e = new Exception(Ex.Message, Ex);
            }
        }
Exemplo n.º 18
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            string RegCentreName = string.Empty;

            if (YCMOU.IsRegionalCenterVisible.Equals(true))
            {
                if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                {
                    RegCentreName   = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                    lblAcaYear.Text = " Regional Center " + RegCentreName + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                }
                else
                {
                    lblAcaYear.Text = " All Regional Centers [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                }
            }
            else
            {
                lblAcaYear.Text = " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
            }


            tblExportedDataMsg.Style.Add("display", "none");
            try
            {
                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                    {
                        DT = clsCollegeAdmissionReports.FillMISReportAll(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue);
                    }
                    else
                    {
                        DT = clsCollegeAdmissionReports.FillMISReportAll(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, null);
                    }
                }
                else
                {
                    DT = clsCollegeAdmissionReports.FillMISReportAll(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, null);
                }


                Session["MISdtData"] = DT;
                if (DT.Rows.Count > 0)
                {
                    GVStat.DataSource = DT;
                    GVStat.DataBind();
                    Button3.Style.Add("display", "block");
                    btnPDF.Style.Add("display", "block");
                    //divAcademicYr.Style.Add("display", "none");
                    //BtnSubmit.Style.Add("display", "none");
                    divDGStat.Style.Add("display", "block");
                    divYCMOU.Style.Add("display", "none");
                }

                if (((System.Data.DataTable)Session["MISdtData"]) == null || ((System.Data.DataTable)Session["MISdtData"]).Rows.Count == 0)
                {
                    //lblAcaYear.Text = " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                    lblExportedData.Text = "No records found.";
                    tblExportedDataMsg.Style.Add("display", "block");
                    Session.Remove("MISdtData");
                    divDGStat.Style.Add("display", "none");
                }

                if (dtCollege != null)
                {
                    dtCollege = null;
                }
            }
            catch (Exception Ex4)
            {
                throw new Exception(Ex4.Message);
            }
        }
Exemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user = (clsUser)Session["user"];



            if (!IsPostBack)
            {
                if (Page.PreviousPage != null && Page.PreviousPage.ToString().Equals("ASP.eligibility_elgv2_paperchange_aspx"))
                {
                    //-------------------------------------
                    // For University Login and Fresh load
                    //-------------------------------------
                    ContentPlaceHolder Cntph1 = (ContentPlaceHolder)Page.PreviousPage.Master.FindControl("ContentPlaceHolder1");
                    searchInstNew      temp   = (searchInstNew)Cntph1.FindControl("SchInst1");
                    hidInstID.Value = ((HtmlInputHidden)Cntph1.FindControl("hidInstID")).Value;

                    hidAcademicYear.Value = Session["AcademicYearID"].ToString();//Session["pk_AcademicYear_ID"].ToString();

                    hidUniID.Value    = Classes.clsGetSettings.UniversityID.ToString();
                    hidInstCode.Value = ((HtmlInputHidden)temp.FindControl("hidCollCode")).Value;
                    hidInstName.Value = ((HtmlInputHidden)temp.FindControl("hidCollName")).Value;
                }
                else
                {
                    if (user.UserTypeCode != "2")
                    {
                        //-----------------------------------------
                        // For University Login and Back Navigation
                        //-----------------------------------------
                        ContentPlaceHolder Cntph1 = (ContentPlaceHolder)Page.PreviousPage.Master.FindControl("ContentPlaceHolder1");
                        hidUniID.Value  = Classes.clsGetSettings.UniversityID.ToString();
                        hidInstID.Value = ((HtmlInputHidden)Cntph1.FindControl("hidInstID")).Value;

                        hidAcademicYear.Value = Session["AcademicYearID"].ToString();

                        hidInstName.Value = ((HtmlInputHidden)Cntph1.FindControl("hidInstName")).Value;
                        hidInstCode.Value = ((HtmlInputHidden)Cntph1.FindControl("hidInstCode")).Value;
                    }
                }
                YCMOU.IsReportUserAndDateDisplay = false;
                YCMOU.IsInstituteDisplay         = false;
                ((HtmlInputHidden)YCMOU.FindControl("hid_Institute_ID")).Value = hidInstID.Value;
            }

            YCMOU.isPpChange.Value = "Yes";
            //modified  by shafik on 09-oct-2012  added new hidden  as need to hide the academic year on paperchange  page
            YCMOU.hidIsAcdYrDdNotVisible.Value = "Yes";
            YCMOU.IsInstituteDisplay           = YCMOU.IsCourseDisply = YCMOU.IsFacultyDisplay = YCMOU.IsBranchDisply = YCMOU.IsCoursePartDisply = YCMOU.IsCourseTermDisply = YCMOU.IsAcYrDisplay = false;
            YCMOU.IsCollegeLogin = true;

            YCMOU.OnProceedClick += btnNext_Click;


            if (user.UserTypeCode == "2")
            {
                //-----------------------------------------------
                // For Institute Login (Fresh and Back Navigation)
                //-----------------------------------------------
                instIDs         = user.UserReferenceID;
                hidInstID.Value = instIDs.ToString();
                // hidInstName.Value = user.Name;
                lblPageHead.Text = lblPaper.Text + " Change";
                //dt = InstRep.InstituteDetails(hidUniID.Value, hidInstID.Value);
                //hidInstName.Value = dt.Rows[0]["Inst_Name"].ToString();
                //hidInstCode.Value = dt.Rows[0]["Inst_Code"].ToString();
                hidInstName.Value            = user.Name;
                lblSubHeader.Text            = "  for " + hidInstName.Value;
                YCMOU.hid_Institute_ID.Value = hidInstID.Value;
            }

            else
            {
                lblPageHead.Text  = lblPaper.Text + " Change";
                lblSubHeader.Text = "  for " + hidInstName.Value + " [" + hidInstCode.Value + "] ";
            }
        }
        protected void btnNext_Click(object sender, EventArgs e)
        {
            string courseOrColl = string.Empty;

            //for one college all courses
            if (user.UserTypeCode != "2")
            {
                //setting hidden vars from dropdown selections of user control

                if (((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedIndex != 0 || ((TextBox)YCMOU.FindControl("txtCenterCode")).Text != string.Empty)
                {
                    hidInstID.Value   = ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedValue.Split('|')[0];
                    hidCollName.Value = ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedItem.Text;
                    string rc_name = string.Empty;
                    if (YCMOU.IsRegionalCenterVisible)
                    {
                        if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
                        {
                            rc_name = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text + " - ";
                        }
                        else
                        {
                            rc_name = "All Regional Centers";
                        }
                    }
                    courseOrColl = rc_name + hidCollName.Value;
                    DT           = clsCollegeAdmissionReports.ListStudentCountForPaperExemptionApprovalSelectedCollege(hidInstID.Value);
                    if (DT.Rows.Count > 0)
                    {
                        Server.Transfer("ELGV2_PaperExemptionApproval__1.aspx", true);
                    }
                    else
                    {
                        tblExportedDataMsg.Style.Add("display", "block");
                        lblExportedData.Text = "No Record(s) found.";
                    }
                }
                else
                {
                    hidFacID.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue;
                    getFacCrMoLrnPtrnID();
                    hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue;
                    hidCrPrChID.Value      = ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedValue;
                    string rc_name = string.Empty;
                    if (YCMOU.IsRegionalCenterVisible)
                    {
                        if (((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedIndex != 0)
                        {
                            rc_name      = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                            courseOrColl = rc_name + " - " + ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " +
                                           ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " +
                                           ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " +
                                           ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " +
                                           ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
                        }
                        else
                        {
                            rc_name      = "All Regional Centers";
                            courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text +
                                           " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text +
                                           " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text +
                                           " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " +
                                           ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text + " - " + rc_name;
                        }
                    }
                    else
                    {
                        courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text +
                                       " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " +
                                       ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " +
                                       ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - " +
                                       ((DropDownList)YCMOU.FindControl("ddlTerm")).SelectedItem.Text;
                    }

                    //DT = clsCollegeAdmissionReports.ListStudentCountForPaperExemptionApprovalSelectedCourse(hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]),
                    //    hidCrPrDetailsID.Value, hidCrPrChID.Value);
                    DT = clsCollegeAdmissionReports.ListStudentCountForPaperExemptionApprovalSelectedCourse(hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]),
                                                                                                            hidCrPrDetailsID.Value, hidCrPrChID.Value);
                    if (DT.Rows.Count > 0)
                    {
                        Server.Transfer("ELGV2_PaperExemptionApproval__1.aspx", true);
                    }
                    else
                    {
                        tblExportedDataMsg.Style.Add("display", "block");
                        lblExportedData.Text = "No Record(s) found.";
                    }
                }
            }
            //handling college login
            else if (user.UserTypeCode == "2")
            {
                courseOrColl = hidCollName.Value;
                //hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;
                DT = clsCollegeAdmissionReports.ListStudentCountForPaperExemptionApprovalSelectedCollege(hidInstID.Value);
                if (DT.Rows.Count > 0)
                {
                    //hidAcYrForCollLogin.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
                    Server.Transfer("ELGV2_PaperExemptionApproval__1.aspx", true);
                }

                else
                {
                    tblExportedDataMsg.Style.Add("display", "block");
                    lblExportedData.Text = "No Record(s) found.";
                }
            }

            if (((System.Data.DataTable)Session["dtdata"]) == null || ((System.Data.DataTable)Session["dtdata"]).Rows.Count == 0)
            {
                lblAcaYear.Text = courseOrColl; // +" [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                Session.Remove("dtdata");
            }

            if (dtCollege != null)
            {
                dtCollege = null;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            user = (clsUser)Session["User"];
            //modified  by shafik on 09-oct-2012  added new hidden  as need to hide the academic year on  paper excemption approlval page
            YCMOU.hidIsAcdYrDdNotVisible.Value = "Yes";

            try
            {
                hidIsPRNValidationRequired.Value = Classes.clsGetSettings.IsPRNValidationRequired;
            }
            catch
            {
                hidIsPRNValidationRequired.Value = "N";
            }

            // code added by Pankaj on 05/01/2011
            HtmlControl Cntp = (HtmlControl)YCMOU.FindControl("divAcadYear");

            Cntp.Style.Add("display", "none");
            DropDownList Ddl = (DropDownList)YCMOU.FindControl("ddlAcadYear");

            // Ddl.SelectedValue = "1";
            //  Ddl.SelectedValue = Session["pk_AcademicYear_ID"].ToString();
            //---------------------------------------------

            if (user != null && user.Exist)
            {
                sUser = user.User_ID;
            }
            else
            {
                Response.Redirect(Classes.clsGetSettings.SitePath.ToString() + "Logout.aspx");
            }

            //handling college login
            if (user.UserTypeCode == "2")
            {
                instIDs                  = user.UserReferenceID;
                hidInstID.Value          = instIDs.ToString();
                hidCollName.Value        = user.Name;
                YCMOU.IsCollegeLogin     = true;
                YCMOU.IsFacultyDisplay   = false;
                YCMOU.IsCourseDisply     = false;
                YCMOU.IsCoursePartDisply = false;
                YCMOU.IsCourseTermDisply = false;
                YCMOU.IsBranchDisply     = false;
                lblAcaYear.Text          = hidCollName.Value;
            }

            if (!IsPostBack)
            {
                Session.Remove("dtdata");
                hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                YCMOU.IsReportUserAndDateDisplay = false;
                YCMOU.IsInstituteDisplay         = false;
            }

            YCMOU.OnProceedClick    += btnNext_Click;
            YCMOU.IsInstituteDisplay = false;
            tblExportedDataMsg.Style.Add("display", "none");
        }
Exemplo n.º 22
0
        protected void YCMOU_OnProceedClick(object sender, EventArgs e)
        {
            oRegionalStudyCenter    = new clsRegionalStudyCenter();
            hidAcademicYearID.Value = YCMOU.AcademicYearID;
            /*added by shrikantb on 07102013*/
            hidExamEventID.Value   = YCMOU.ExamEventID;
            hidFacID.Value         = YCMOU.FacultyID;
            hidCrID.Value          = YCMOU.CourseID;
            hidMoLrnID.Value       = YCMOU.ModeLrnID;
            hidPtrnID.Value        = YCMOU.PatternID;
            hidBrnID.Value         = YCMOU.BranchID;
            hidCrPrDetailsID.Value = YCMOU.PartID;
            hidCrPrChID.Value      = YCMOU.TermID;

            hidFacName.Value = YCMOU.FacultyName;
            string CourseName = YCMOU.CourseName;

            hidCrName.Value     = CourseName.Split('-')[0].ToString().Trim();
            hidMoLrnName.Value  = CourseName.Split('-')[1].ToString().Trim();
            hidPtrnName.Value   = CourseName.Split('-')[2].ToString().Trim();
            hidBrnName.Value    = YCMOU.BranchName;
            hidCrPrName.Value   = YCMOU.PartName;
            hidCrPrChName.Value = YCMOU.TermName;


            /*oDT = oRegionalStudyCenter.FetchAcademicYrCrPrTermWiseStudentList(YCMOU.AcademicYearID, hidUniID.Value,
             *                                                                YCMOU.FacultyID, YCMOU.CourseID, YCMOU.ModeLrnID,
             *                                                                YCMOU.PatternID, YCMOU.BranchID, YCMOU.PartID,
             *                                                                YCMOU.TermID); by shrikantb on 07102013*/

            oDT = oRegionalStudyCenter.FetchAcademicYrCrPrTermWiseStudentList(YCMOU.AcademicYearID, hidUniID.Value,
                                                                              YCMOU.FacultyID, YCMOU.CourseID, YCMOU.ModeLrnID,
                                                                              YCMOU.PatternID, YCMOU.BranchID, YCMOU.PartID,
                                                                              YCMOU.TermID, YCMOU.ExamEventID, YCMOU.InstID);

            divGridView.Style.Add("display", "block");
            divYCMOU.Style.Add("display", "none");

            string totalDataAvailable = oDT.Rows.Count.ToString();

            if (oDT != null && oDT.Rows.Count > 0)
            {
                oDT = SetLinks(oDT);

                gvStudentCountLinks.DataSource = oDT;
                gvStudentCountLinks.DataBind();
                lblTotalData.Text   += " " + totalDataAvailable;
                lblErrorMsg.Visible  = false;
                lblTotalData.Visible = true;
            }
            else
            {
                lblErrorMsg.Visible  = true;
                lblTotalData.Visible = false;
                lblErrorMsg.Text     = "No Students Found.";
                lblErrorMsg.CssClass = "errorNote";
                lblErrorMsg.Style.Add("text-align", "center");
            }
            string strTitle = string.Empty;

            if (YCMOU.AcademicYearID != null)
            {
                strTitle = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
            }
            else
            {
                strTitle = ((DropDownList)YCMOU.FindControl("ddlExEvent")).SelectedItem.Text;
            }
            lblwelcome.Text = " for " + strTitle + "-" +
                              hidFacName.Value + "-" + CourseName + hidBrnName.Value + "-" + hidCrPrName.Value + "-" + hidCrPrChName.Value;
        }