Esempio n. 1
0
        private void submit_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "")
            {
                MessageBox.Show("please fill all information");
            }
            else
            {
                History s = new History(textBox1.Text, textBox2.Text, textBox3.Text);

                //

                m.arr[p].MedicalCase.Push(s);

                //


                m.Saving_Data();


                this.Hide();
                Form5 f = new Form5(ref m, p.ToString());
                f.ShowDialog();
                this.Close();
            }
        }
        private void submit_Click(object sender, EventArgs e)
        {
            if (m.arr.ContainsKey(int.Parse(textBox1.Text)))
            {
                m.arr.Remove(int.Parse(textBox1.Text));
                MessageBox.Show("The patient has been deleted");
                m.num_patients--;
                m.Saving_Data();
            }

            else
            {
                MessageBox.Show("sorry wrong iD");
            }
        }
Esempio n. 3
0
        private void submit_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox6.Text == "" || textBox7.Text == "")
            {
                MessageBox.Show("please fill all information ");
            }


            else
            {
                m.Append(this.textBox1.Text, int.Parse(this.textBox2.Text), this.textBox3.Text, this.textBox4.Text, this.textBox5.Text, this.textBox6.Text, this.textBox7.Text);
                m.Saving_Data();
                string str = ("patient ID is : ");
                str += (m.ID - 1).ToString();
                MessageBox.Show(str);
                this.Hide();
                Form1 f = new Form1(ref m);
                f.ShowDialog();
                this.Close();
            }
        }