コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: elatier/BLB
        protected void SearchButton_Click(object sender, EventArgs e)
        {
            BEnd bend = new BEnd();
            Bond b = new Bond();

            //Regex numRegex = new Regex("/^\\d+\\.?\\d*$/");

            b.Name = Util.Filter(Name.Text);
            b.Cusip = Util.Filter(CUSIP.Text);
            b.Rating_low = RatingLow1.SelectedIndex + 1;
            b.Rating_high = RatingHigh1.SelectedIndex + 1;

            //
            b.Coupon_low = Util.Parse(b.Coupon_low, CouponLow.Text);
            b.Coupon_high = Util.Parse(b.Coupon_high, CouponHigh.Text);
            b.Current_yield_low = Util.Parse(b.Current_yield_low, CurrentYieldLow.Text);
            b.Current_yield_high = Util.Parse(b.Current_yield_high, CurrentYieldHigh.Text);
            b.Yield_to_maturity_low = Util.Parse(b.Yield_to_maturity_low, YieldToMaturityLow.Text);
            b.Yield_to_maturity_high = Util.Parse(b.Yield_to_maturity_high, YieldToMaturityHigh.Text);
            // maturity date
            //
            b.Price_low = Util.Parse(b.Price_low,PriceLow.Text);
            b.Price_high = Util.Parse(b.Price_high,PriceHigh.Text);
            b.Par_value_low = Util.Parse(b.Par_value_low, ParValueLow.Text);
            b.Par_value_high= Util.Parse(b.Par_value_high, ParValueHigh.Text);

            ErrorBox.Text = Convert.ToString(b.Rating_low);

            DataSet ds = bend.SearchBonds(b);
            BondGrid.DataSource = ds.Tables[0];
            BondGrid.DataBind();
        }
コード例 #2
0
ファイル: SelectBond.aspx.cs プロジェクト: elatier/BLB
        protected void Page_Load(object sender, EventArgs e)
        {
            BEnd bend = new BEnd();
            Bond b = new Bond();

               // b.Price_low = Convert.ToDouble(PriceLow.Text);
            //b.Price_high = Convert.ToDouble(PriceHigh.Text); ;

            DataSet ds = bend.SearchBonds(b);
            BondGrid.DataSource = ds.Tables[0];
            BondGrid.DataBind();
        }