protected void btnGetRatingDetails_ServerClick(object sender, EventArgs e)
        {
            //Validate users input
            ValidateBusinessData();

            //Validate the date
            string selectedDateTsring = this.txtWorkcollectionDate.Text.Trim();
            bool   isDateValid        = ValidateDate(selectedDateTsring);

            divAlert.Visible = true;
            if (isDateValid == true)
            {
                divAlert.Visible = false;
            }
            else
            {
                lblError.Text = "The selcted date is not in the right format";
                return;
            }

            //Get the bank rating setup details and isplay in gridview
            int ritypeid = Convert.ToInt32(this.cmbRiType.SelectedValue);
            int riid     = Convert.ToInt32(this.cmbReportingInstitution.SelectedValue);
            int count    = _setuphandler.GetBankRatingSetupDetails(ritypeid, riid).Rows.Count;

            if (count > 0)
            {
                this.gridviewRatingSetup.DataSource = _setuphandler.GetBankRatingSetupDetails(ritypeid, riid);
            }
            else
            {
                divAlert.Visible = true;
                lblError.Text    = "No bank rating setup details available for the selected institution type";
            }
            this.gridviewRatingSetup.DataBind();
            this.divGridResult.Visible = true;
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //currentUser = Request.QueryString[SharedConst.QUERY_STRING_USER_NAME];

                ////Get the user name of the currently logged in user and decrypt it
                //if (!String.IsNullOrWhiteSpace(Request.QueryString[SharedConst.QUERY_STRING_USER_NAME]))
                //{
                //    //Uncomment the below line of code when the crypographics module is okay
                //    //var encryptedQueryString = Request.QueryString[SharedConst.QUERY_STRING_USER_NAME];
                //    //currentUser = HttpUtility.UrlDecode(encryptedQueryString.Trim());
                //    //currentUser = CryptoServiceHandler.Decrypt(currentUser, CryptoServiceHandler.ENCRYPTION_PASS_PHRASE);
                //}
                //else
                //{
                //    this.frmBankRatingSetupView.Visible = false;
                //}

                if (base.Error.Count > 0)
                {
                    this.frmBankRatingSetupView.Visible = false;
                    return;
                }

                if (!Page.IsPostBack)
                {
                    //Bind the computation bank setup
                    this.gridViewBankRatingSetup.DataSource = _bankRatinghandler.GetBankRatingSetupDetails();
                    this.gridViewBankRatingSetup.DataBind();
                }
            }
            catch (Exception ex)
            {
                LogUtitlity.LogToText(ex.ToString());
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (base.Error.Count > 0)
                {
                    this.frmBankRating.Visible = false;
                    return;
                }

                //Check if the request is an update request
                string bankRatingCode = Request.QueryString[SharedConst.QUERY_STRING_BRC];
                if (!string.IsNullOrWhiteSpace(bankRatingCode))
                {
                    this.txtBankRatingCode.Value    = bankRatingCode.Trim();
                    this.txtBankRatingCode.Disabled = true;
                    _bankRatingModel               = _bankRatinghandler.GetBankRatingSetupDetails(bankRatingCode);
                    this.cmbRiType.SelectedValue   = _bankRatingModel.ri_type_id.ToString();
                    this.txtParam.Value            = _bankRatingModel.param;
                    this.txtDescription.Value      = _bankRatingModel.description;
                    this.txtComponentWeight.Value  = _bankRatingModel.component_weight;
                    this.txtStartValidityDate.Text = _bankRatingModel.start_validity_date.ToString();
                }

                if (!Page.IsPostBack)
                {
                    riType.GetAllRiTypes(this.cmbRiType);
                    this.cmbRiType.Items.Insert(0, "-choose one-");
                }
            }
            catch (Exception ex)
            {
                LogUtitlity.LogToText(ex.ToString());
                LogUtitlity.LogToText(ex.ToString());
            }
        }