private void GetAllAccount()
        {
            BankManagementSystem.DATA_SET.BMSDataSetTableAdapters.SelectAllAccountTableAdapter getAllAccount = new SelectAllAccountTableAdapter();
            DataTable dt = new DataTable();

            dt = getAllAccount.GetAllAccount();
            if (dt.Rows.Count > 0)
            {
                comboAccountList.ItemsSource       = dt.DefaultView;
                comboAccountList.DisplayMemberPath = dt.Columns["Id"].ToString();
                comboAccountList.SelectedValuePath = dt.Columns["Id"].ToString();
            }
        }
Exemplo n.º 2
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     BankManagementSystem.DATA_SET.BMSDataSetTableAdapters.SelectAllAccountTableAdapter accountInfo = new SelectAllAccountTableAdapter();
     dt.Constraints.Clear();
     dt = accountInfo.GetAllTransaction();
     DataGridAllTransaction.DataContext = dt;
 }