Beispiel #1
0
        //=======================================
        //
        // <Summary>
        //      Method for Showing the Update
        //  Contact Popup form
        //
        //=======================================
        private void ShowUpdateContact()
        {
            string studentNumber = "";

            if (StudentRecords.CurrentRow.Index >= 0 && StudentRecords.CurrentRow.Cells[0] != null)
            {
                studentNumber = StudentRecords.CurrentRow.Cells[0].Value.ToString();
                UpdateContact usc = new UpdateContact(studentNumber);
                if (usc.ShowDialog() == DialogResult.OK)
                {
                    GetStudentContact();
                }
            }
        }
        //================================
        //  <Summary>
        //      Method for showing
        //      Update Contact Modal
        //  </Summary>
        //================================
        private void ShowUpdateContactModal()
        {
            string studentNumber = StudentNumber.Text;

            if (studentNumber == "No Record")
            {
                studentNumber = "";
            }

            if (studentNumber != "")
            {
                UpdateContact modal = new UpdateContact(studentNumber);
                modal.ShowDialog();
            }
            else
            {
                MessageBox.Show("Please Search For student before updating the contact");
            }
        }