Esempio n. 1
0
        void BindRejectedRecordsGrid()
        {
            DataSet dsRejectedRecords;

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

            int Count;

            try
            {
                dsRejectedRecords = rejectedRecordsBo.GetUploadMFRejectsDistinctFolios(adviserid, mypager.CurrentPage, out Count);
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CAMSTransInputRejects.ascx:BindRejectedRecordsGrid()");

                object[] objects = new object[0];

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            hdnRecordCount.Value = Count.ToString();
            lblTotalRows.Text    = (Count + 1).ToString();
            if (Count > 0)
            {
                DivPager.Style.Add("display", "visible");
            }

            if (dsRejectedRecords.Tables[0].Rows.Count > 0)
            {
                trInputNullMessage.Visible  = false;
                gvRejectedFolios.DataSource = dsRejectedRecords.Tables[0];
                gvRejectedFolios.DataBind();
            }
            else
            {
                trInputNullMessage.Visible  = true;
                gvRejectedFolios.DataSource = null;
                gvRejectedFolios.DataBind();
            }

            this.GetPageCount();
        }