public void SearchStudentbyPRN()
 {
     try
     {
         DataTable dt = srv.SearchStudentbyPRN(hidPRN.Value);
         if (dt != null && dt.Rows.Count > 0)
         {
             divSearchPRN.Style.Add("display", "block");
             divDisplayPRN.Style.Add("display", "block");
             divDisplayData.Style.Add("display", "block");
             lblErrorMsg.Text       = string.Empty;
             GV_SrchStud.DataSource = dt;
             GV_SrchStud.DataBind();
             lblStudName.Text = dt.Rows[0]["Student_Name"].ToString();
             FillInstitute();
         }
         else
         {
             divDisplayPRN.Style.Add("display", "none");
             divDisplayData.Style.Add("display", "none");
             lblErrorMsg.Text       = "PRN number data does not exists. Please entered proper PRN number.";
             GV_SrchStud.DataSource = null;
             GV_SrchStud.DataBind();
             dt = null;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
        public void SearchStudentbyPRN()
        {
            try
            {
                DataTable dt = srv.SearchStudentbyPRN(hidPRN.Value);
                if (dt != null && dt.Rows.Count > 0)
                {
                    divSearchPRN.Style.Add("display", "block");
                    divDisplayPRN.Style.Add("display", "block");
                    divDisplayData.Style.Add("display", "block");
                    //tblInstFill.Style.Add("display", "block");
                    lblErrorMsg.Text       = string.Empty;
                    GV_SrchStud.DataSource = dt;
                    GV_SrchStud.DataBind();
                    lblStudName.Text = dt.Rows[0]["Student_Name"].ToString();

                    //DataView dv = new DataView();
                    //dv.Table = dt;

                    //if (GV_SrchStud.Rows.Count > 0)
                    //{
                    //    dv.RowFilter = "pk_AcademicYear_ID = '" + Session["AcademicYearID"].ToString() + "'";
                    //}

                    //if (dv.Table != null && dv.Count > 0)
                    //{
                    //    FillInstitute();
                    //}
                    //else
                    //{
                    //    lblErrorMsg.Text = "Admission data not available for Current Academic Year..!!";
                    //}
                }
                else
                {
                    divDisplayPRN.Style.Add("display", "none");
                    divDisplayData.Style.Add("display", "none");
                    lblErrorMsg.Text       = "PRN number data does not exists. Please entered proper PRN number.";
                    GV_SrchStud.DataSource = null;
                    GV_SrchStud.DataBind();
                    dt = null;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #3
0
        void FillGrid()
        {
            DataTable odt = new DataTable();

            Hashtable oHs = new Hashtable();

            oHs.Add("UniID", clsGetSettings.UniversityID.Trim());
            oHs.Add("InstID", hidInstID.Value);
            oHs.Add("AcademicYear", hidAcademicYear.Value);
            if (hidPRN.Value != string.Empty)
            {
                oHs.Add("PRN", hidPRN.Value);
            }
            else if (hidElgFormNo.Value != string.Empty)
            {
                oHs.Add("RefUni", hidElgFormNo.Value.Split('-')[0].ToString());
                oHs.Add("RefInstID", hidElgFormNo.Value.Split('-')[1].ToString());
                oHs.Add("RefYear", hidElgFormNo.Value.Split('-')[2].ToString());
                oHs.Add("RefStudent", hidElgFormNo.Value.Split('-')[3].ToString());
            }

            else if (hidAppFormNo.Value != string.Empty)
            {
                oHs.Add("ApplicationFormNo", hidAppFormNo.Value);
            }

            odt = clsPaperChange.ListStudentCoursePartTerm(oHs);
            if (odt.Rows.Count > 0)
            {
                TrNote.Visible         = true;
                GV_SrchStud.Visible    = true;
                GV_SrchStud.DataSource = odt;
                GV_SrchStud.DataBind();
            }
            else
            {
                GV_SrchStud.Visible = false;
                TrNote.Visible      = false;
                lblMessage.Text     = "No Records found.";
                if (hidAppFormNo.Value != string.Empty)
                {
                    lblMessage.Text = "Application Form No is Not present In Selected college Or Current Academic Year.";
                }
            }
        }
Exemple #4
0
        public void SearchStudent()
        {
            try
            {
                DataTable dt = srv.SearchStudentForAddPaper(hidPRN.Value, hidElgNo.Value, hidAcademicYear_ID.Value);
                if (dt != null && dt.Rows.Count > 0)
                {
                    DivNoteMsg.Style.Add("display", "block");
                    divStudentSearch.Style.Add("display", "block");
                    divDisplayData.Style.Add("display", "block");
                    divDispAddPaper.Style.Add("display", "none");
                    lblErrorMsg.Text       = string.Empty;
                    GV_SrchStud.DataSource = dt;
                    GV_SrchStud.DataBind();
                }
                else
                {
                    divDisplayData.Style.Add("display", "none");
                    if (txtElgFormNo.Text != string.Empty)
                    {
                        lblErrorMsg.Text = "The Eligibility Form Number  " + txtElgFormNo.Text.Trim() + "  does not exists. Please entered proper Eligibility Form Number.";
                    }
                    else if (txtPRN.Text != string.Empty)
                    {
                        lblErrorMsg.Text = "The PRN Number  " + txtPRN.Text.Trim() + "  does not exists. Please entered proper PRN Number.";
                    }

                    GV_SrchStud.DataSource = null;
                    GV_SrchStud.DataBind();
                    dt = null;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #5
0
        /// <summary>
        /// Binds data to grid view.
        /// </summary>
        private void bindGrid(int PageSize)
        {
            oStudent = new Eligibility.ElgClasses.clsElgStudent();
            createHashTable();
            //oDt = oStudent.SearchStudentLog(oHt);
            // oDt = oStudent.SearchRegStudent(oHt);
            oDt = oStudent.SearchStudent(oHt);

            if (oDt.Tables.Count > 0)
            {
                if (oDt.Tables[0].Rows.Count > 0)
                {
                    if (oDt.Tables[0].Rows.Count == 1)
                    {
                        lblErrorMsg.Text        = string.Empty;
                        hid_pk_Year.Value       = Convert.ToString(oDt.Tables[0].Rows[0]["pk_Year"]);
                        hid_pk_Student_ID.Value = Convert.ToString(oDt.Tables[0].Rows[0]["pk_Student_ID"]);
                        hid_Stud_Name.Value     = Convert.ToString(oDt.Tables[0].Rows[0]["Name"]);
                        hid_OldPRN.Value        = Convert.ToString(oDt.Tables[0].Rows[0]["OldPRN_Number"]);
                        hid_PRN_Number.Value    = Convert.ToString(oDt.Tables[0].Rows[0]["PRN_Number"]);

                        if (Convert.ToString(oDt.Tables[0].Rows[0]["Region"]) != string.Empty)
                        {
                            hid_Inst_Details.Value = "Institute Name : " + Convert.ToString(oDt.Tables[0].Rows[0]["Study_Center"]) + " Institute Code :  " + Convert.ToString(oDt.Tables[0].Rows[0]["Center_Code"]) + " <strong>Region :</strong> " + Convert.ToString(oDt.Tables[0].Rows[0]["Region"]);
                        }
                        else
                        {
                            hid_Inst_Details.Value = "Institute Name : " + Convert.ToString(oDt.Tables[0].Rows[0]["Study_Center"]) + " Institute Code :  " + Convert.ToString(oDt.Tables[0].Rows[0]["Center_Code"]);
                        }

                        Server.Transfer("CancelAdmission__2.aspx");
                    }
                    else
                    {
                        int Record_Count = 0;
                        if (oDt.Tables.Count > 1)
                        {
                            Record_Count = Convert.ToInt32(oDt.Tables[1].Rows[0]["TotalRecords"]);
                        }
                        else
                        {
                            Record_Count = oDt.Tables[0].Rows.Count;
                        }

                        if (Record_Count > PageSize)
                        {
                            int CountStart = (GV_SrchStud.PageIndex * PageSize) + 1;
                            int CountEnd   = (GV_SrchStud.PageIndex * PageSize) + PageSize;

                            if (CountEnd > Record_Count)
                            {
                                CountEnd = Record_Count;
                            }

                            lblCount.Text = "<strong>Results</strong> " + CountStart + " - " + CountEnd + " of about " + Record_Count + " records found.";

                            divStudentCount.Visible = true;
                        }
                        else
                        {
                            divStudentCount.Visible = false;
                        }

                        DivDetails.Visible     = true;
                        lblErrorMsg.Text       = string.Empty;
                        GV_SrchStud.Visible    = true;
                        GV_SrchStud.DataSource = oDt.Tables[0];
                        GV_SrchStud.DataBind();
                    }
                }
                else
                {
                    divStudentCount.Visible = false;
                    DivDetails.Visible      = false;
                    GV_SrchStud.Visible     = false;
                    lblErrorMsg.Text        = "No data available for selected criteria";
                    if (hid_AppFormNo.Value != string.Empty)
                    {
                        lblErrorMsg.Text = "Application Form No is Not present In  Current Academic Year.";
                    }
                }
            }
            else
            {
                divStudentCount.Visible = false;
                DivDetails.Visible      = false;
                GV_SrchStud.Visible     = false;
                lblErrorMsg.Text        = "No data available for selected criteria";
                if (hid_AppFormNo.Value != string.Empty)
                {
                    lblErrorMsg.Text = "Application Form No is Not present In  Current Academic Year.";
                }
            }
        }