protected void Change_AccountName(object sender, EventArgs e) { Int32 id = Int32.Parse(SelectedBillingAccountID.Value); (new TFS.Intranet.Data.Billing.BillingAccountController()).Update(id, BillingAccountNameChanger.Text); BillingAccountDropDown.Items.Clear(); BillingAccountDropDown.DataBind(); BillingAccountDropDown.SelectedValue = SelectedBillingAccountID.Value; SelectedBillingAccountName.Text = BillingAccountDropDown.SelectedItem.Text; }
protected void ExpenseAccount_Created(object sender, EventArgs e) { BillingAccountDropDown.Items.Clear(); BillingAccountDropDown.DataBind(); if (String.IsNullOrEmpty(SelectedBillingAccountID.Value)) { BillingAccountDropDown.SelectedValue = BillingAccountDropDown.Items[0].Value; } else { BillingAccountDropDown.SelectedValue = SelectedBillingAccountID.Value; } }