private void BindValues() { using (IDataReader reader = Tariff.GetCurrency(int.Parse(Request["CurrencyId"]))) { if (reader.Read()) { txtName.Text = reader["CurrencyName"].ToString(); txtSymbol.Text = reader["Symbol"].ToString(); } } }
private void BindDG() { dgCurrencies.Columns[0].HeaderText = LocRM.GetString("CurrencyName"); dgCurrencies.Columns[1].HeaderText = LocRM.GetString("CurrencySymbol"); dgCurrencies.DataSource = Tariff.GetCurrency(0); dgCurrencies.DataBind(); foreach (DataGridItem dgi in dgCurrencies.Items) { ImageButton ibDelete = (ImageButton)dgi.FindControl("ibDelete"); if (ibDelete != null) { ibDelete.Attributes.Add("onclick", "return confirm('" + LocRM.GetString("CurrencyWarning") + "')"); } } }
private void BindLists() { ddType.Items.Clear(); ddType.DataSource = Tariff.GetTariffType(0); ddType.DataTextField = "TypeName"; ddType.DataValueField = "TypeId"; ddType.DataBind(); ddCurrency.Items.Clear(); ddCurrency.DataSource = Tariff.GetCurrency(0); ddCurrency.DataTextField = "CurrencyName"; ddCurrency.DataValueField = "CurrencyId"; ddCurrency.DataBind(); txtMaxHdd.Text = "0"; txtMaxUsers.Text = "0"; txtMaxExtUsers.Text = "0"; txtMonthlyCost.Text = ((decimal)0).ToString("f"); }