Exemple #1
0
        public void BindTrailCommissionRejectedGrid(int processId)
        {
            try
            {
                uploadsCommonBo = new UploadCommonBo();
                DataSet dsRejectedSIP = new DataSet();
                trReprocess.Visible = true;
                if (processId != 0)
                {
                    if (adviserId != 1000)
                    {
                        dsRejectedSIP = uploadsCommonBo.GetTrailCommissionRejectRejectDetails(adviserId, processId, fromDate, toDate, rejectReasonCode);
                    }
                    else
                    {
                        dsRejectedSIP = uploadsCommonBo.GetTrailCommissionRejectRejectDetails(adviserId, processId, fromDate, toDate, rejectReasonCode);
                    }
                }
                else
                {
                    rejectReasonCode = int.Parse(ddlRejectReason.SelectedValue);
                    fromDate         = DateTime.Parse(txtFromMFT.SelectedDate.ToString());
                    toDate           = DateTime.Parse(txtToMFT.SelectedDate.ToString());
                    if (adviserId != 1000)
                    {
                        dsRejectedSIP = uploadsCommonBo.GetTrailCommissionRejectRejectDetails(adviserId, processId, fromDate, toDate, rejectReasonCode);
                    }
                    else
                    {
                        if (Request.QueryString["processId"] != null)
                        {
                            dsRejectedSIP = uploadsCommonBo.GetTrailCommissionRejectRejectDetails(adviserId, processId, fromDate, toDate, rejectReasonCode);
                        }

                        else
                        {
                            dsRejectedSIP = uploadsCommonBo.GetTrailCommissionRejectRejectDetails(Convert.ToInt32(ddlAdviser.SelectedValue), processId, fromDate, toDate, rejectReasonCode);
                        }
                    }
                }
                if (dsRejectedSIP.Tables[0].Rows.Count > 0)
                {
                    if (Cache["TrailCommissionRejectDetails" + adviserId.ToString()] == null)
                    {
                        Cache.Insert("TrailCommissionRejectDetails" + adviserId.ToString(), dsRejectedSIP);
                    }
                    else
                    {
                        Cache.Remove("TrailCommissionRejectDetails" + adviserId.ToString());
                        Cache.Insert("TrailCommissionRejectDetails" + adviserId.ToString(), dsRejectedSIP);
                    }
                    GVTrailTransactionRejects.CurrentPageIndex = 0;
                    GVTrailTransactionRejects.DataSource       = dsRejectedSIP;
                    GVTrailTransactionRejects.DataBind();
                    trReprocess.Visible = true;
                    GVTrailTransactionRejects.Visible = true;
                    Panel2.Visible           = true;
                    imgBtnrgHoldings.Visible = true;
                    Msgerror.Visible         = false;
                }
                else
                {
                    GVTrailTransactionRejects.Visible = false;
                    Panel2.Visible           = false;
                    imgBtnrgHoldings.Visible = false;
                    Msgerror.Visible         = true;
                    trReprocess.Visible      = false;
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
        }