コード例 #1
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;
 }
コード例 #2
0
        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";
                }
            }
        }