//Changes the way that the dropdown is sorted
 private void Sort_Lists_Click(object sender, EventArgs e)
 {
     if (Global.sortDropdown == Global.ID)
     {
         Global.sortDropdown = Global.NAME;
     }
     else if (Global.sortDropdown == Global.NAME)
     {
         Global.sortDropdown = Global.ID;
     }
     setSortedButtonText();
     Delete_Existing_Dropdown.DataSource = null;
     Input_1.Clear();
     Input_2.Clear();
     Input_3.Clear();
     Input_4.Clear();
     Input_5.Clear();
     Input_6.Clear();
     Input_7.Clear();
     Input_8.Clear();
     Input_9.Clear();
     Input_10.Clear();
     Input_11.Clear();
     Input_12.Clear();
     Input_13.Clear();
     Input_14.Clear();
     Input_15.Clear();
     Current_Patient.Checked = false;
     GP_Letter.Checked       = false;
 }
        //Deletes patient
        private void Delete_Click(object sender, EventArgs e)
        {
            Patient_Database.DeletePatient(Delete_Existing_Dropdown, Input_1);

            if (Delete_Existing_Dropdown.DataSource == null)
            {
                Input_1.Clear();
                Input_2.Clear();
                Input_3.Clear();
                Input_4.Clear();
                Input_5.Clear();
                Input_6.Clear();
                Input_7.Clear();
                Input_8.Clear();
                Input_9.Clear();
                Input_10.Clear();
                Input_11.Clear();
                Input_12.Clear();
                Input_13.Clear();
                Input_14.Clear();
                Input_15.Clear();
                Current_Patient.Checked = false;
                GP_Letter.Checked       = false;
            }
        }
        //Clears dropdown items if any
        //Also clears any text in the input fields
        private void Add_Dropdown_1_Click(object sender, EventArgs e)
        {
            Dropdown_1.DataSource = null;
            Input_1.Clear();
            Input_2.Clear();
            Input_3.Clear();
            Input_4.Clear();
            Input_5.Clear();
            Input_6.Clear();
            Input_7.Clear();
            Input_8.Clear();
            Input_9.Clear();
            Input_10.Clear();
            Dropdown_3.DataSource = null;
            Input_11.Clear();

            AddOrEditFields(true);              //Allows fields to be entered into
            Current_Patient.Checked = true;     //Changes current patient checkbox to true

            //When creating a Patient it would be impossible to have already sent the letter
            GP_Letter.Checked = false;
            GP_Letter.Enabled = false;
            Dropdown_2.Focus();                 //Focuses on gender dropdown
            Global.editingExistingPatient = false;

            //Sets Save button enabled to false forcing users to satisfy minimum requirements
            Save.Enabled = false;
        }
 //Enables controls to add a new class and if in edit session closes it
 private void Add_Class_Click(object sender, EventArgs e)
 {
     Global.editingExistingClass = false;
     Input_1.ReadOnly            = false;
     Save.Enabled                       = true;
     Input_1.Text                       = null;
     Dropdown_1.DataSource              = null;
     PatientsClassDGV.DataSource        = null;
     PatientsClassWaitingDGV.DataSource = null;
     Add_Patient.Enabled                = false;
     Add_Patient_Waiting.Enabled        = false;
     Input_1.Focus();
 }
 //Deletes Reffering GP
 private void Delete_Click(object sender, EventArgs e)
 {
     Reffering_GP_Database.DeleteRefferingGP(Delete_Existing_Dropdown, Input_1);
     if (Delete_Existing_Dropdown.DataSource == null)
     {
         Input_1.Clear();
         Input_2.Clear();
         Input_3.Clear();
         Input_4.Clear();
         Input_5.Clear();
         Input_6.Clear();
         Input_7.Clear();
     }
 }
 //Deletes Practice
 private void Delete_Click(object sender, EventArgs e)
 {
     Practice_Database.DeletePractice(Delete_Existing_Dropdown, Input_1);
     if (Delete_Existing_Dropdown.DataSource == null)
     {
         Input_1.Clear();
         Input_2.Clear();
         Input_3.Clear();
         Input_4.Clear();
         Input_5.Clear();
         Input_6.Clear();
         Input_7.Clear();
         Input_8.Clear();
     }
 }
 //Allows user to edit details
 private void Edit_Details_Click(object sender, EventArgs e)
 {
     //if user is MASTER then user cannot edit
     if (Global.userId == 1)
     {
         MessageBox.Show("You cannot change details of master user", "Error",
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     Input_1.ReadOnly     = false;
     Input_2.ReadOnly     = false;
     Input_3.ReadOnly     = false;
     Input_4.ReadOnly     = false;
     Input_5.ReadOnly     = false;
     Edit_Details.Enabled = false;
     Save.Visible         = true;
     Input_1.Focus();
 }
        //Clears dropdown datasource
        //Also clears any text in the input fields
        private void Add_Dropdown_1_Click(object sender, EventArgs e)
        {
            Dropdown_1.DataSource = null;
            Input_1.Clear();
            Input_2.Clear();
            Input_3.Clear();
            Input_4.Clear();
            Input_5.Clear();
            Input_6.Clear();
            Input_7.Clear();
            Input_8.Clear();
            Input_8.Clear();
            AddOrEditFields(true); //Allows fields to be entered into
            Input_1.Focus();       //Moves cursor to first name

            Global.editingExistingPractice = false;

            Save.Enabled = true;
        }
        //Clears dropdown datasources
        //Also clears any text in the input fields
        private void Add_Dropdown_1_Click(object sender, EventArgs e)
        {
            Dropdown_1.DataSource = null;
            Input_1.Clear();
            Input_2.Clear();
            Input_3.Clear();
            Input_4.Clear();
            Input_5.Clear();
            Input_6.Clear();
            Dropdown_2.DataSource = null;
            Input_6.Clear();
            AddOrEditFields(true);          //Allows fields to be entered into
            Input_2.Focus();                //Moves cursor to first name

            Global.editingExistingRefferingGP = false;

            //Forces user to choose a practice before saving
            Save.Enabled = false;
        }
 //Changes sorting of lists
 private void Sort_Lists_Click(object sender, EventArgs e)
 {
     if (Global.sortDropdown == Global.ID)
     {
         Global.sortDropdown = Global.NAME;
     }
     else if (Global.sortDropdown == Global.NAME)
     {
         Global.sortDropdown = Global.ID;
     }
     setSortedButtonText();
     Delete_Existing_Dropdown.DataSource = null;
     Input_1.Clear();
     Input_2.Clear();
     Input_2.Clear();
     Input_4.Clear();
     Input_5.Clear();
     Input_6.Clear();
     Input_7.Clear();
 }
Example #11
0
 public ANDGate_2(Input_1 input, NOTOutput_0 input_NOT)
 {
     m_input     = input ?? throw new ArgumentNullException(nameof(input));
     m_input_NOT = input_NOT ?? throw new ArgumentNullException(nameof(input_NOT));
 }
Example #12
0
 public NOTGate_1(Input_1 input)
 {
     m_input = input ?? throw new ArgumentNullException(nameof(input));
 }
Example #13
0
 public ANDGate_3(Input_0 input_0, Input_1 input_1)
 {
     m_input_0 = input_0 ?? throw new ArgumentNullException(nameof(input_0));
     m_input_1 = input_1 ?? throw new ArgumentNullException(nameof(input_1));
 }