Beispiel #1
0
        private void btnFilter_Click(object sender, EventArgs e)
        {
            helper.SetAllColumns();

            ReturnViewParam     rlp = new ReturnViewParam();
            AllocationViewParam rp  = new AllocationViewParam();

            if (!string.IsNullOrEmpty(txtCtpy.Text))
            {
                rlp.CtpyCode.AddParamValue(txtCtpy.Text);
                rp.CtpyCode.AddParamValue(txtCtpy.Text);
            }

            if (!string.IsNullOrEmpty(txtSymbol.Text))
            {
                rlp.Ticker.AddParamValue(txtSymbol.Text);
                rp.Ticker.AddParamValue(txtSymbol.Text);
            }

            //Alan Dias
            if (!string.IsNullOrEmpty(txtTradeCategory.Text))
            {
                rlp.TradeCategory.AddParamValue(txtTradeCategory.Text);
                rp.TradeCategory.AddParamValue(txtTradeCategory.Text);
            }



            rf.Load(Returns, rlp);
            af.Load(Allocations, rp);

            lblReturns.Text     = "Returns: " + Returns.Count.ToString();
            lblAllocations.Text = "Allocations: " + Allocations.Count.ToString();
        }
        void OnCusipSelected(object sender, CusipSelectEventArgs e)
        {
            helper.SetAllColumns();

            ReturnViewParam     rlp = new ReturnViewParam();
            AllocationViewParam rp  = new AllocationViewParam();

            rlp.Cusip.AddParamValue(e.Cusip);
            rp.Cusip.AddParamValue(e.Cusip);

            rf.Load(Returns, rlp);
            af.Load(Allocations, rp);

            this.Text = "Returns " + e.Cusip;
        }