Esempio n. 1
0
        /// <summary>
        /// Button to add a contact, launches the View Contact form with a blank form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Add_Click(object sender, EventArgs e)
        {
            this.Hide();

            using (ViewContact frm_ViewContact = new ViewContact())
                frm_ViewContact.ShowDialog();
            this.Show();
            populateFav();
        }
Esempio n. 2
0
        /// <summary>
        /// Button to view the selected favorite contact.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_View_Click(object sender, EventArgs e)
        {
            int selectedID = int.Parse(cbo_Fav.SelectedValue.ToString());

            this.Hide();

            using (ViewContact frm_ViewContact = new ViewContact(selectedID))
                frm_ViewContact.ShowDialog();
            this.Show();
        }