Exemple #1
0
 /// <summary>
 /// Fills the combo box with data.
 /// </summary>
 private void FillComboBox()
 {
     try
     {
         DeityViewModel deityViewModel = new DeityViewModel();
         cmbDeity.DisplayMember = "DeityName";
         cmbDeity.ValueMember   = "DeityID";
         cmbDeity.DataSource    = deityViewModel.GetAllDeities().ToList();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #2
0
 public Deity()
 {
     InitializeComponent();
     lblMsg.Text    = null;
     deityViewModel = new DeityViewModel();
 }
Exemple #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DeityViewModel dietyViewModel = new DeityViewModel();

            dietyViewModel.GetAllDeities();
        }