private void loadDataInComboBox() { List <MemberEntry> allMembers = new List <MemberEntry>(); allMembers = new MemberCodeEntryBLL().getMemberCodeInfo(); memberIdComboBox.DataSource = allMembers; memberIdComboBox.ValueMember = "memberId"; memberIdComboBox.DisplayMember = "memberId"; memberIdComboBox.Text = @"select member Id"; }
private void updateButton_Click(object sender, EventArgs e) { try { MemberCodeEntryBLL aMemberCodeEntryBll = new MemberCodeEntryBLL(); MemberEntry aMemberEntry = new MemberEntry(Convert.ToInt32(memberIdTextBox.Text), memberNameTextBox.Text, roomNoTextBox.Text, addressTextBox.Text, dateTimePicker1.Value); string msg = aMemberCodeEntryBll.update(aMemberEntry); MessageBox.Show(msg, @"Message"); Hide(); new MemberCodeEntryUI().Show(); } catch (Exception exception) { MessageBox.Show(exception.Message, @"Message"); } }