Beispiel #1
0
    protected void fundNameDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable dtLastPrice = opendMFDAO.dtgetLastPrice(fundNameDropDownList.SelectedValue.ToString());

        if (dtLastPrice.Rows.Count > 0)
        {
            PriceDateTextBox.Text = Convert.ToDateTime(dtLastPrice.Rows[0]["REFIX_DT"]).ToString("dd-MMM-yyyy");
            SalePriceTextBox.Text = dtLastPrice.Rows[0]["REFIX_SL_PR"].ToString();
            RepPriceTextBox.Text  = dtLastPrice.Rows[0]["REFIX_REP_PR"].ToString();
        }
        else
        {
            PriceDateTextBox.Text = "";
            SalePriceTextBox.Text = "";
            RepPriceTextBox.Text  = "";
            fundNameDropDownList.Focus();

            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('No Data Found');", true);
        }
    }