private void BindRejectedSIPGrid(int processId)
        {
            if (processId == null || processId == 0)
            {
                if (txtFromSIP.SelectedDate != null)
                {
                    fromDate = DateTime.Parse(txtFromSIP.SelectedDate.ToString());
                }
                if (txtToSIP.SelectedDate != null)
                {
                    toDate = DateTime.Parse(txtToSIP.SelectedDate.ToString());
                }
                rejectReasonCode = int.Parse(ddlRejectReason.SelectedValue);
            }
            DataSet dsRejectedSIP = new DataSet();
            Dictionary <string, string> genDictIsRejected   = new Dictionary <string, string>();
            Dictionary <string, string> genDictRejectReason = new Dictionary <string, string>();

            if (adviserId != 1000)
            {
                dsRejectedSIP = uploadsCommonBo.GetRejectedSIPRecords(adviserId, processId, fromDate, toDate, rejectReasonCode);
            }
            else
            {
                if (Request.QueryString["processId"] != null)
                {
                    dsRejectedSIP = uploadsCommonBo.GetRejectedSIPRecords(Convert.ToInt32(adviserId), processId, fromDate, toDate, rejectReasonCode);
                }
                else
                {
                    dsRejectedSIP = uploadsCommonBo.GetRejectedSIPRecords(Convert.ToInt32(ddlAdviser.SelectedValue), processId, fromDate, toDate, rejectReasonCode);
                }
            }

            if (dsRejectedSIP.Tables[0].Rows.Count > 0)
            {   // If Records found, then bind them to grid
                //trMessage.Visible = false;
                trReprocess.Visible = true;
                DivAction.Visible   = true;
                if (Cache["RejectedSIPDetails" + adviserId.ToString()] == null)
                {
                    Cache.Insert("RejectedSIPDetails" + adviserId.ToString(), dsRejectedSIP);
                }
                else
                {
                    Cache.Remove("RejectedSIPDetails" + adviserId.ToString());
                    Cache.Insert("RejectedSIPDetails" + adviserId.ToString(), dsRejectedSIP);
                }
                gvSIPReject.CurrentPageIndex = 0;
                gvSIPReject.DataSource       = dsRejectedSIP.Tables[0];
                gvSIPReject.DataBind();
                btnExport.Visible   = true;
                gvSIPReject.Visible = true;
                Msgerror.Visible    = false;
                Panel3.Visible      = true;
            }
            else
            {
                gvSIPReject.CurrentPageIndex = 0;
                hdnRecordCount.Value         = "0";
                gvSIPReject.DataSource       = null;
                gvSIPReject.DataBind();
                gvSIPReject.Visible = false;
                Panel3.Visible      = false;
                Msgerror.Visible    = true;
                btnExport.Visible   = false;
                DivAction.Visible   = false;
                trReprocess.Visible = false;
            }
        }