private void BindWerpProfileGrid(int ProcessId)
        {
            //Dictionary<string, string> genDictIsRejected = new Dictionary<string, string>();
            Dictionary <string, string> genDictRejectReason = new Dictionary <string, string>();

            // Dictionary<string, string> genDictIsCustomerExisting = new Dictionary<string, string>();

            if (hdnCurrentPage.Value.ToString() != "")
            {
                mypager.CurrentPage  = Int32.Parse(hdnCurrentPage.Value.ToString());
                hdnCurrentPage.Value = "";
            }

            int Count;

            rejectedRecordsBo = new RejectedRecordsBo();

            if (ProcessId == 0)
            {   // Bind All Processes
                dsRejectedRecords = rejectedRecordsBo.getSuperAdminWERPRejectedProfile(ProcessId, mypager.CurrentPage, out Count, hdnSort.Value, hdnPANFilter.Value, hdnRejectReasonFilter.Value, hdnBrokerCodeFilter.Value, hdnCustomerNameFilter.Value, hdnAdviserFilter.Value);
                //   PANFilter, RejectReasonFilter, BrokerFilter, CustomerNameFilter);
            }
            else
            {   // Bind Grid for the specific Process Id
                dsRejectedRecords = rejectedRecordsBo.getSuperAdminWERPRejectedProfile(ProcessId, mypager.CurrentPage, out Count, hdnSort.Value, hdnPANFilter.Value, hdnRejectReasonFilter.Value, hdnBrokerCodeFilter.Value, hdnCustomerNameFilter.Value, hdnAdviserFilter.Value);
            }

            lblTotalRows.Text = hdnRecordCount.Value = Count.ToString();
            if (Count > 0)
            {
                DivPager.Style.Add("display", "visible");
            }

            if (dsRejectedRecords.Tables[0].Rows.Count > 0)
            {   // If Records found, then bind them to grid
                trMessage.Visible              = false;
                trReprocess.Visible            = true;
                gvWERPProfileReject.DataSource = dsRejectedRecords.Tables[0];
                gvWERPProfileReject.DataBind();

                if (dsRejectedRecords.Tables[2].Rows.Count > 0)
                {
                    // Get the Reject Reason Codes Available into Generic Dictionary
                    foreach (DataRow dr in dsRejectedRecords.Tables[2].Rows)
                    {
                        genDictRejectReason.Add(dr["RejectReason"].ToString(), dr["RejectReasonCode"].ToString());
                    }

                    DropDownList ddlRejectReason = GetRejectReasonDDL();
                    if (ddlRejectReason != null)
                    {
                        ddlRejectReason.DataSource     = genDictRejectReason;
                        ddlRejectReason.DataTextField  = "Key";
                        ddlRejectReason.DataValueField = "Value";
                        ddlRejectReason.DataBind();
                        ddlRejectReason.Items.Insert(0, new ListItem("Select", "Select"));
                    }

                    if (hdnRejectReasonFilter.Value != "")
                    {
                        ddlRejectReason.SelectedValue = hdnRejectReasonFilter.Value.ToString().Trim();
                    }
                }

                BindPanNumber(dsRejectedRecords.Tables[3]);
                BindProcessId(dsRejectedRecords.Tables[4]);
                BindAdviser(dsRejectedRecords.Tables[5]);
            }
            else
            {
                hdnRecordCount.Value           = "0";
                gvWERPProfileReject.DataSource = null;
                gvWERPProfileReject.DataBind();
                trMessage.Visible   = true;
                trReprocess.Visible = false;
            }
            this.GetPageCount();
        }