Example #1
0
    void BindCurrency()
    {
        DataView dv;

        dv = (DataView)SqlDataSourceCurrency.Select(DataSourceSelectArguments.Empty);
        if (dv.Count > 0)
        {
            _ddCurrency.DataSource     = dv;
            _ddCurrency.DataTextField  = "CurrencyName";
            _ddCurrency.DataValueField = "CurrencyId";
            _ddCurrency.DataBind();
        }
        _ddCurrency.Items.Insert(0, new ListItem("Please Select", "0"));
    }
Example #2
0
    void BindCurrency()
    {
        //string selectCommand;CurrencyId, CurrencyName + '(' + CurrencySymbol + ')'  as CurrencyName,
        //selectCommand = "SELECT * FROM tCurrency where  CompanyID='" + Session["CompanyId"].ToString() + "' and ParentChartID='" + Session["CashGroup"].ToString() + "' ";
        DataView dv;

        dv = (DataView)SqlDataSourceCurrency.Select(DataSourceSelectArguments.Empty);
        if (dv.Count > 0)
        {
            _ddCurrency.DataSource     = dv;
            _ddCurrency.DataTextField  = "CurrencyName";
            _ddCurrency.DataValueField = "CurrencyId";
            _ddCurrency.DataBind();
        }
        _ddCurrency.Items.Insert(0, new ListItem("Please Select", "0"));
        //SqlDataAdapter dad = new SqlDataAdapter(selectCommand, conString);
        //DataTable dt = new DataTable();
        //dad.Fill(dt);
    }