1. 程式人生 > >Ext.Net 1.x_Ext.Net.Combox選擇觸發事件

Ext.Net 1.x_Ext.Net.Combox選擇觸發事件

事件:ChangeCurrency

 <DirectEvents>
       <Select  OnEvent="ChangeCurrency"></Select>
 </DirectEvents>

cs程式碼:

    protected void ChangeCurrency(object sender, DirectEventArgs e)
    {
     
        if (this.cbxCurrency.SelectedItem.Value.Trim() == "RMB")
        {
            this.txtRate.Text = "1.000000";
        }
        else
        {
            ZMQuotation zmq = new ZMQuotation();
            zmq.Currency=this.cbxCurrency.SelectedItem.Value.Trim();
            ZMQuotationManager zmqm=new ZMQuotationManager ();
            this.txtRate.Text =zmqm .GetRate(zmq);
        }
    }