Пример #1
0
        private void BindRejectedSIPGrid(int processId)
        {
            DataSet dsRejectedSIP = new DataSet();
            Dictionary <string, string> genDictIsRejected   = new Dictionary <string, string>();
            Dictionary <string, string> genDictRejectReason = new Dictionary <string, string>();

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

            dsRejectedSIP     = uploadsCommonBo.GetSuperAdminRejectedSIPRecords(mypager.CurrentPage, out Count, int.Parse(hdnProcessIdFilter.Value), hdnRejectReasonFilter.Value, hdnFileNameFilter.Value, hdnFolioFilter.Value, hdnTransactionTypeFilter.Value, hdnInvNameFilter.Value, hdnSchemeNameFilter.Value, hdnAdviserFilter.Value);
            lblTotalRows.Text = hdnRecordCount.Value = Count.ToString();
            if (Count > 0)
            {
                DivPager.Style.Add("display", "visible");
            }


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



                foreach (DataRow dr in dsRejectedSIP.Tables[1].Rows)
                {
                    genDictRejectReason.Add(dr["WRR_RejectReasonDescription"].ToString(), dr[1].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();
                }
                BindProcessId(dsRejectedSIP.Tables[2]);
                BindFolioNumber(dsRejectedSIP.Tables[3]);
                BindInvName(dsRejectedSIP.Tables[4]);
                BindSchemeName(dsRejectedSIP.Tables[5]);
                BindTransactionType(dsRejectedSIP.Tables[6]);
                BindFileName(dsRejectedSIP.Tables[7]);
                BindAdviserName(dsRejectedSIP.Tables[9]);
            }
            else
            {
                hdnRecordCount.Value   = "0";
                gvSIPReject.DataSource = null;
                gvSIPReject.DataBind();
                trMessage.Visible   = true;
                trReprocess.Visible = false;
            }
            this.GetPageCount();
        }