Exemplo n.º 1
0
        public void FillCollegeList()
        {
            dtCollege = new System.Data.DataTable();
            oclsEligibilityDBAccess = new clsEligibilityDBAccess();
            int uniID = Convert.ToInt32(clsGetSettings.UniversityID);

            try
            {
                dtCollege = oclsEligibilityDBAccess.ListColleges(uniID);

                if (dtCollege.Rows.Count > 0)
                {
                    foreach (DataRow drCollege in dtCollege.Rows)
                    {
                        string itemValue = drCollege["pk_Inst_ID"].ToString() + "|" + drCollege["Inst_Code"].ToString();
                        ddlCollegeName.Items.Add(new ListItem(drCollege["Inst_Name"].ToString() + "," + drCollege["Inst_City"].ToString(), itemValue));
                    }
                    foreach (ListItem li in this.ddlCollegeName.Items)
                    {
                        li.Attributes.Add("title", li.Text);
                    }
                    ddlCollegeName.Items.Insert(0, new ListItem("--- Select ---", "0"));
                }

                ddlCollegeName.Attributes.Add("onmouseover", "this.title=this.options[this.selectedIndex].title");
            }
            catch (Exception)
            {
                dtCollege = null;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Delete button click event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void btDel_Click(object sender, EventArgs e)
 {
     if (hid_Del_New_Identity.Value != string.Empty)
     {
         oclsEligibilityDBAccess = new clsEligibilityDBAccess();
         user = (clsUser)Session["user"];
         //Get the student IDs by splitting button ID
         string[] delIDs  = ((Button)sender).ID.Split('-');
         string[] baseIDs = hid_Del_New_Identity.Value.Split('-');
         int      iRet    = oclsEligibilityDBAccess.DeleteDuplicateProfile(delIDs[1], delIDs[2], delIDs[3], Convert.ToString(user.User_ID), baseIDs[0], baseIDs[1], baseIDs[2]);
         if (iRet > 0)
         {
             //lblMsg.Text = "Profile deleted successfully.";
             //lblMsg.CssClass = "saveNote";
             hid_FromPage.Value = "MatchingProfile__2.aspx";
             GetRecords();
         }
         else
         {
             lblMsg.Text     = "Error occured while deleting Profile.";
             lblMsg.CssClass = "errorNote";
         }
         oclsEligibilityDBAccess = null;
     }
     else
     {
         lblMsg.Text     = "Profile cannot be deleted. Please contact administrator.";
         lblMsg.CssClass = "errorNote";
     }
 }
 protected void GV_DeleteProfile_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteProfile")
     {
         string[] IDs = e.CommandArgument.ToString().Split('|');
         oclsEligibilityDBAccess = new clsEligibilityDBAccess();
         string          sRet = string.Empty;
         Classes.clsUser user = (Classes.clsUser)Session["User"];
         //
         //DeleteDanglingStudent(uniID, year, studentID, userID, New identity);
         //
         sRet = oclsEligibilityDBAccess.DeleteDanglingStudent(IDs[0], IDs[1], IDs[2], user.User_ID, string.Empty);
         if (sRet == "Y")
         {
             lblMsg.Text     = "Profile deleted successfully.";
             lblMsg.CssClass = "saveNote";
             GetRecords(hid_pindex.Value);
         }
         else
         {
             lblMsg.Text     = "Profile could be deleted. Please contact the administrator.";
             lblMsg.CssClass = "errorNote";
         }
     }
 }
        protected void btnMerge_Click(object sender, EventArgs e)
        {
            if (hid_MergeFlag.Value == "N")
            {
                lblMsg.Text      = "These profiles could not be merged.<BR>Selected profile has opted the Additional Paper of the " + (string)GetLocalResourceObject("Course") + " Part/Term which is already available with the Base Profile. ";
                lblMsg.CssClass  = "errorNote";
                btnMerge.Enabled = false;
                GetRecords();
                return;
            }
            else
            {
                string[] arrBaseStudentIDs  = hid_BaseStudentIDs.Value.Split('-');
                string[] arrMergeStudentIDs = hid_ProfileToBeMerged.Value.Split('-');

                StringBuilder sb = new StringBuilder("<Student>");
                foreach (GridViewRow row in GVTermRetain.Rows)
                {
                    string[] courseIds = row.Cells[3].Text.Split('|');

                    if (((RadioButtonList)row.FindControl("rblMergeRemove")).SelectedValue == "M")
                    {
                        sb.Append("<Term Base_Uni_ID=\"" + arrBaseStudentIDs[0] + "\" Base_Year=\"" + arrBaseStudentIDs[1] + "\" Base_Student_ID=\"" + arrBaseStudentIDs[2] + "\" ToMerge_Uni_ID=\"" + arrMergeStudentIDs[0] + "\" ToMerge_Year=\"" + arrMergeStudentIDs[1] + "\" ToMerge_Student_ID=\"" + arrMergeStudentIDs[2] + "\" ");
                        sb.Append("pk_Fac_ID=\"" + courseIds[0] + "\" pk_Cr_ID=\"" + courseIds[1] + "\" pk_MoLrn_ID=\"" + courseIds[2] + "\" pk_Ptrn_ID=\"" + courseIds[3] + "\" pk_Brn_ID=\"" + courseIds[4] + "\" pk_CrPr_Details_ID=\"" + courseIds[5] + "\" pk_CrPrCh_ID=\"" + courseIds[6] + "\" />");
                    }
                }
                sb.Append("</Student>");


                oclsEligibilityDBAccess = new clsEligibilityDBAccess();
                user = (clsUser)Session["user"];

                /// <param name="base_Uni_ID"></param>
                /// <param name="base_Year"></param>
                /// <param name="base_Student_ID"></param>
                /// <param name="toMerge_Uni_ID"></param>
                /// <param name="toMerge_Year"></param>
                /// <param name="toMerge_Student_ID"></param>
                /// <param name="termsToBeMerge"></param>
                /// <param name="uSERID"></param>
                /// <param name="new_Identity"></param>
                string sReturn = oclsEligibilityDBAccess.ConfirmMerge(arrBaseStudentIDs[0], arrBaseStudentIDs[1], arrBaseStudentIDs[2], arrMergeStudentIDs[0], arrMergeStudentIDs[1], arrMergeStudentIDs[2], sb.ToString(), Convert.ToString(user.User_ID), hid_BaseStudentIDs.Value);
                oclsEligibilityDBAccess = null;

                if (hid_FromPage.Value == "MatchingProfile__1.aspx")
                {
                    hid_BaseStudentIDs.Value    = string.Empty;
                    hid_ProfileToBeMerged.Value = string.Empty;
                    hid_FromPage.Value          = "MatchingProfile__3.aspx";
                    Server.Transfer("MatchingProfile__1.aspx");
                }
                else
                {
                    hid_FromPage.Value = "MatchingProfile__3.aspx";
                    Server.Transfer("MatchingProfile__2.aspx");
                }
            }
        }
Exemplo n.º 5
0
        public void ProcessRequest(HttpContext context)
        {
            string imgType   = context.Request.QueryString["img"];
            string UniId     = context.Request.QueryString["UniID"];
            string StudentId = context.Request.QueryString["StudentID"];
            string Year      = context.Request.QueryString["YearID"];

            oclsElgDBAccess = new clsEligibilityDBAccess();
            DataTable odt = new DataTable();

            odt = oclsElgDBAccess.ShowPhotoSign(UniId, Year, StudentId);

            context.Response.ContentType = "image/jpeg";
            System.Drawing.Image img;

            if (odt.Rows.Count > 0)
            {
                if (imgType == "Photo")
                {
                    byte[]           Bytes = (byte[])odt.Rows[0]["Photograph"];
                    System.IO.Stream s     = new System.IO.MemoryStream(Bytes);
                    img = System.Drawing.Image.FromStream(s);

                    MemoryStream ms = new MemoryStream();
                    img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
                    img = clsResizeImage.ResizeImage(ms, 55, 80);

                    // Save the image to the OutputStream.
                    if (img != null)
                    {
                        img.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
                    }
                }
                else if (imgType == "Sign")
                {
                    byte[]           Bytes = (byte[])odt.Rows[0]["Signature"];
                    System.IO.Stream s     = new System.IO.MemoryStream(Bytes);
                    img = System.Drawing.Image.FromStream(s);

                    MemoryStream ms = new MemoryStream();
                    img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
                    img = clsResizeImage.ResizeImage(ms, 80, 55);

                    // Save the image to the OutputStream.
                    if (img != null)
                    {
                        img.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
                    }
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Repeater data binding method.
        /// </summary>
        /// <param name="crTable"></param>
        private void BindRepeater()
        {
            clsEligibilityDBAccess oclsEligibilityDBAccess = new clsEligibilityDBAccess();

            crTable = oclsEligibilityDBAccess.GetStudentsCourseProfile(uniID, year, studentID);
            if (crTable != null && crTable.Rows.Count > 0)
            {
                RptCourse.DataSource = crTable;
                RptCourse.DataBind();
                divCourseProfile.Visible = true;
            }
            else
            {
                divCourseProfile.Visible = false;
            }
        }
        /// <summary>
        /// Repeater data binding method.
        /// </summary>
        /// <param name="crTable"></param>
        public void BindRepeater()
        {
            clsEligibilityDBAccess oclsEligibilityDBAccess = new clsEligibilityDBAccess();

            crTable = oclsEligibilityDBAccess.GetStudentsCourseProfileForCancelAdmission(uniID, year, studentID);

            if (crTable != null && crTable.Rows.Count > 0)
            {
                RptCourse.DataSource = crTable;
                RptCourse.DataBind();
                divCourseProfile.Visible = true;
                divCourse.Visible        = true;
                hid_Term_Count.Value     = crTable.Rows.Count.ToString();
            }
            else
            {
                divCourseProfile.Visible = false;
                divCourse.Visible        = false;
            }
        }
        /// <summary>
        /// Get records of Dangling students
        /// </summary>
        /// <param name="p_index">Paging index</param>
        void GetRecords(string p_index)
        {
            oclsEligibilityDBAccess = new clsEligibilityDBAccess();
            DataTable dt = oclsEligibilityDBAccess.GetDanglingStudent(hidUniID.Value, p_index);

            if (dt != null && dt.Rows.Count > 0)
            {
                GV_DeleteProfile.DataSource = dt;
                GV_DeleteProfile.DataBind();
                GV_DeleteProfile.Visible = true;
                lblGridTitle.Visible     = true;
            }
            else
            {
                lblMsg.Text              = "No record(s) found.";
                lblMsg.CssClass          = "errorNote";
                GV_DeleteProfile.Visible = false;
                lnkViewFullList.Visible  = false;
                lblGridTitle.Visible     = false;
            }
        }
        public void DisPlayData()
        {
            oDt = new DataTable();
            clsEligibilityDBAccess oclsElgDBAcess = new clsEligibilityDBAccess();

            oDt = oclsElgDBAcess.getMergeAndCancelAdmissionRequestStatus();
            if (oDt != null && oDt.Rows.Count > 0)
            {
                lblNodata.Visible              = false;
                lblNodata.Text                 = "";
                GV_MergeProfileStat.Visible    = true;
                GV_MergeProfileStat.DataSource = oDt;
                GV_MergeProfileStat.DataBind();
            }
            else
            {
                GV_MergeProfileStat.Visible = false;
                lblNodata.Text    = "No any request is in process or pending.";
                lblNodata.Visible = true;
            }
        }
Exemplo n.º 10
0
 /// <summary>
 /// Get records for the given match profile ID
 /// </summary>
 private void GetRecords()
 {
     //
     //Datatable 1 lists top 5 profiles
     //Datatable 2 gets all the details of profile
     //
     oclsEligibilityDBAccess = new clsEligibilityDBAccess();
     ds = oclsEligibilityDBAccess.GetMatchProfileForStudentIDs(hid_MatchingStudentIDs.Value, hid_BaseStudentIDs.Value);
     if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
     {
         //Listing profiles and categories
         FillFilter(ds.Tables[0]);
         //Rendering profile details
         RenderTable(ds.Tables[1]);
         //Check for locked profile
         if (ds.Tables[2] != null && Convert.ToInt32(ds.Tables[2].Rows[0][0]) > 0)
         {
             hidLockedProfile.Value = "1";
             //Display request submitted message
             if (hid_FromPage.Value == "MatchingProfile__3.aspx" || hid_FromPage.Value == "MatchingProfile__2.aspx")
             {
                 lblInfo.Text    = "Your request has been submitted and is currently in process.<br/>You cannot perform any actions on this profile i.e. Delete Profile or Merge Profile.<br/>However you can compare the profiles if available.";
                 lblInfo.Visible = true;
                 //lblMsg.Text = ".";
                 //lblMsg.CssClass = "saveNote";
             }
             else
             {
                 lblInfo.Text    = "Request related to this profile is already submitted and is in process.<br/>You cannot perform any actions on this profile i.e. Delete Profile or Merge Profile.<br/>However you can compare the profiles if available.";
                 lblInfo.Visible = true;
             }
         }
     }
     else
     {
         lblMsg.Text     = "No records found.";
         lblMsg.CssClass = "errorNote";
     }
     ds = null;
 }
Exemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                hidIsPRNValidationRequired.Value = Classes.clsGetSettings.IsPRNValidationRequired;
            }
            catch
            {
                if (hidIsPRNValidationRequired.Value == "")
                {
                    hidIsPRNValidationRequired.Value = "N";
                }
            }

            if (!IsPostBack)
            {
                oElg = new clsEligibilityDBAccess();
                dt   = new DataTable();
                dt   = oElg.ListMatchingProfiles();
                if (dt.Rows.Count > 0)
                {
                    DataView odv = dt.DefaultView;
                    ViewState["AutoGeneratedData"] = dt;

                    lblcnt.Text = "Total Profiles matched by the system: " + Convert.ToString(dt.Rows.Count);

                    rptStudNameIntials.DataSource = odv.ToTable(true, "StudentNameIntials");
                    rptStudNameIntials.DataBind();

                    bindGrid(null);
                }
                else
                {
                    lblcnt.Text = "Total Profiles matched by the system: 0";
                    divGridHead.Attributes.Add("style", "display:none;");
                }
            }
        }
        void GetRecords()
        {
            oclsEligibilityDBAccess = new clsEligibilityDBAccess();
            ds = oclsEligibilityDBAccess.GetMatchProfileForStudentIDs(hid_ProfileToBeMerged.Value + "," + hid_BaseStudentIDs.Value, hid_BaseStudentIDs.Value);
            if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
            {
                //Rendering profile details
                RenderTable(ds.Tables[1]);
            }

            string[] arrBaseStudentIDs  = hid_BaseStudentIDs.Value.Split('-');
            string[] arrMergeStudentIDs = hid_ProfileToBeMerged.Value.Split('-');

            ds = oclsEligibilityDBAccess.GetCourseDetailsForConfirmMerge(arrMergeStudentIDs[0], arrMergeStudentIDs[1], arrMergeStudentIDs[2], arrBaseStudentIDs[0], arrBaseStudentIDs[1], arrBaseStudentIDs[2]);
            if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
            {
                //lblPName.Text = Convert.ToString(ds.Tables[0].Rows[0]["StudentName"]);
                //lblBName.Text = Convert.ToString(ds.Tables[0].Rows[1]["StudentName"]);

                //lblPPRN.Text = Convert.ToString(ds.Tables[0].Rows[0]["PRN"]);
                //lblBPRN.Text = Convert.ToString(ds.Tables[0].Rows[1]["PRN"]);

                //string[] MergeArr = hid_ProfileToBeMerged.Value.Split('-');
                //string[] BaseArr = hid_BaseStudentIDs.Value.Split('-');

                //MPImg.ImageUrl = "PhotoSignHandler.ashx?img=Photo&UniID=" + MergeArr[0] + "&StudentID=" + MergeArr[2] + "&YearID=" + MergeArr[1];
                //MSImg.ImageUrl = "PhotoSignHandler.ashx?img=Sign&UniID=" + MergeArr[0] + "&StudentID=" + MergeArr[2] + "&YearID=" + MergeArr[1];

                //BPImg.ImageUrl = "PhotoSignHandler.ashx?img=Photo&UniID=" + BaseArr[0] + "&StudentID=" + BaseArr[2] + "&YearID=" + BaseArr[1];
                //BSImg.ImageUrl = "PhotoSignHandler.ashx?img=Sign&UniID=" + BaseArr[0] + "&StudentID=" + BaseArr[2] + "&YearID=" + BaseArr[1];
            }

            if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
            {
                DataView dv1 = ds.Tables[1].DefaultView;
                dv1.RowFilter = "MergeStatus = 'N'";

                if (dv1.ToTable().Rows.Count > 0)
                {
                    GVTermRemove.DataSource = dv1.ToTable();
                    GVTermRemove.DataBind();
                    divGridRemoveTitle.Visible   = true;
                    divGridRemoveTitle.InnerText = "List of Terms already available with Base profile";
                }
                else
                {
                    divGridRemoveTitle.Visible = false;
                }

                DataView dv2 = ds.Tables[1].DefaultView;
                dv2.RowFilter = "MergeStatus = 'Y'";

                if (dv2.ToTable().Rows.Count > 0)
                {
                    GVTermRetain.DataSource = dv2.ToTable();
                    GVTermRetain.DataBind();
                    divGridRetainTitle.Visible   = true;
                    divGridRetainTitle.InnerText = "List of Terms to be retained with Base profile";
                }
                else
                {
                    divGridRetainTitle.Visible = false;
                }
            }

            if (ds.Tables[2].Rows.Count > 0)
            {
                DataView dvFilter = ds.Tables[2].DefaultView;
                dvFilter.RowFilter = "AddPaperStatus = 'Y'";
                if (dvFilter.ToTable().Rows.Count > 0)
                {
                    hid_MergeFlag.Value = "N";
                }
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Bind grid for manual match
        /// </summary>
        private void bindManualSearchGrid()
        {
            CreateHashTable();
            oElg = new clsEligibilityDBAccess();

            ds = new DataSet();
            ds = oElg.ManualProfileMatch(ht);
            if (ds.Tables[0].Rows.Count == 1)
            {
                if (ds.Tables[0].Rows[0]["LockedProfile"].ToString() == "1")
                {
                    ManualSearch.Attributes.Add("style", "display:inline;width:100%");
                    lblSmplSrch.Attributes.Add("style", "display:inline");
                    lblSmplSrch.Text = "(Match Profile Automatically)";
                    divNote.Attributes.Add("style", "display:none");
                    ManualSrchGrid.Attributes.Add("style", "display:none");
                    lblErrorMsg.Attributes.Add("style", "display:inline");

                    string sCriteria = string.Empty;
                    if (txtPRN.Text != string.Empty)
                    {
                        sCriteria = sCriteria + lblPRN.Text + ", ";
                    }
                    if (txtOldPRN.Text != string.Empty)
                    {
                        sCriteria = sCriteria + Label2.Text + ", ";
                    }
                    if (txtElgFrmNo.Text != string.Empty)
                    {
                        sCriteria = sCriteria + "Eligibility form number,";
                    }

                    sCriteria        = sCriteria.Remove(sCriteria.LastIndexOf(','));
                    lblErrorMsg.Text = "Merge/Delete Profile request for this profile is already submitted and is in process.";
                    return;
                }
                if (Convert.ToString(ds.Tables[0].Rows[0]["PRN_Number"]).Trim() == string.Empty || Convert.ToString(ds.Tables[0].Rows[0]["PRN_Number"]).Trim() == "Not Available")
                {
                    ManualSearch.Attributes.Add("style", "display:inline;width:100%");
                    lblSmplSrch.Attributes.Add("style", "display:inline");
                    lblSmplSrch.Text = "(Match Profile Automatically)";
                    divNote.Attributes.Add("style", "display:none");
                    ManualSrchGrid.Attributes.Add("style", "display:none");
                    lblErrorMsg.Attributes.Add("style", "display:inline");

                    string sCriteria = string.Empty;
                    if (txtPRN.Text != string.Empty)
                    {
                        sCriteria = sCriteria + lblPRN.Text + ", ";
                    }
                    if (txtOldPRN.Text != string.Empty)
                    {
                        sCriteria = sCriteria + Label2.Text + ", ";
                    }
                    if (txtElgFrmNo.Text != string.Empty)
                    {
                        sCriteria = sCriteria + "Eligibility form number,";
                    }

                    sCriteria        = sCriteria.Remove(sCriteria.LastIndexOf(','));
                    lblErrorMsg.Text = (string)GetLocalResourceObject("lblPRNResource1.Text") + " does not exists for the searched student.";
                    return;
                }

                lblSubHeader.Text = "<B>Student: </B>" + Convert.ToString(ds.Tables[0].Rows[0]["StudentName"]) + ", <B>" + lblPRN.Text + ": </B>" + Convert.ToString(ds.Tables[0].Rows[0]["PRN_Number"]) + ", <B>" + Label2.Text + ": </B>" + Convert.ToString(ds.Tables[0].Rows[0]["OldPRN_Number"]);

                if (ds.Tables[1].Rows.Count > 1)
                {
                    ManualSrchGrid.Attributes.Add("style", "display:inline");
                    divMCriteria.Attributes.Add("style", "display:inline");
                    Mcriteria.InnerText = hid_MatchingCriteria.Value;

                    int TotalMatchingCount = Convert.ToInt32(ds.Tables[2].Rows[0][0]);
                    if (TotalMatchingCount > 5)
                    {
                        gCaption.InnerHtml = "<b>Showing Top 5 Student Profiles out of " + TotalMatchingCount + " Matching Profiles found.</b>";
                    }

                    lblErrorMsg.Attributes.Add("style", "display:none");
                    divNote.Attributes.Add("style", "display:inline");
                    ManualInfo.Attributes.Add("style", "display:inline");
                    AutoGeneratedInfo.Attributes.Add("style", "display:none");
                    hid_BaseStudentIDs.Value     = ds.Tables[0].Rows[0][0].ToString();
                    gVSearchDuplicate.DataSource = ds.Tables[1];
                    gVSearchDuplicate.DataBind();
                }
                else
                {
                    lblErrorMsg.Attributes.Add("style", "display:inline");
                    lblErrorMsg.Text = "No Matching Profile Found.";

                    ManualSrchGrid.Attributes.Add("style", "display:none");
                    divMCriteria.Attributes.Add("style", "display:none");
                    divNote.Attributes.Add("style", "display:none");
                    ManualSearch.Attributes.Add("style", "display:inline;width:100%");
                    lblSmplSrch.Attributes.Add("style", "display:inline");
                    lblSmplSrch.Text = "(Match Profile Automatically)";
                }
            }
            else
            {
                ManualSearch.Attributes.Add("style", "display:inline;width:100%");
                lblSmplSrch.Attributes.Add("style", "display:inline");
                lblSmplSrch.Text = "(Match Profile Automatically)";
                divNote.Attributes.Add("style", "display:none");
                ManualSrchGrid.Attributes.Add("style", "display:none");
                lblErrorMsg.Attributes.Add("style", "display:inline");

                string sCriteria = string.Empty;
                if (txtPRN.Text != string.Empty)
                {
                    sCriteria = sCriteria + lblPRN.Text + ", ";
                }
                if (txtOldPRN.Text != string.Empty)
                {
                    sCriteria = sCriteria + Label2.Text + ", ";
                }
                if (txtElgFrmNo.Text != string.Empty)
                {
                    sCriteria = sCriteria + "Eligibility form number,";
                }

                sCriteria        = sCriteria.Remove(sCriteria.LastIndexOf(','));
                lblErrorMsg.Text = "Given " + sCriteria + " doesn't exists.";
            }
        }