Beispiel #1
0
      public Handle(int IDP, string IDV)
      {
          InitializeComponent();

          IDVis = IDV;
          //textb = text;
          idpat = IDP;
          PatientsSearchCriteria searchCriteria = new PatientsSearchCriteria();

          searchCriteria.setPatientId(IDP);

          var res = SQLDoc.GetPatient(searchCriteria);

          foreach (var order in res)
          {
              textBox1.Text = order.patientTable.Name;
              textBox2.Text = order.patientTable.Surname;
              textBox3.Text = order.patientTable.PESEL;
          }


          int x    = Int32.Parse(IDV);
          var res1 = SQLDoc.GetAppointment(x);

          foreach (var order in res1)
          {
              textBox4.Text = order.Descirption;
              textBox5.Text = order.Diagnosis;
          }
      }
Beispiel #2
0
        public Show(int IDPatient, string IDVisit)
        {
            InitializeComponent();

            IdVisit   = IDVisit;
            IdPatient = IDPatient;

            PatientsSearchCriteria searchCriteria = new PatientsSearchCriteria();

            searchCriteria.setPatientId(IDPatient);

            var res = SQLDoc.GetPatient(searchCriteria);

            foreach (var order in res)
            {
                textBox1.Text = order.patientTable.Name;
                textBox2.Text = order.patientTable.Surname;
                textBox3.Text = order.patientTable.PESEL;
            }


            int x    = Int32.Parse(IDVisit);
            var res1 = SQLDoc.GetAppointment(x);

            foreach (var order in res1)
            {
                textBox4.Text = order.Descirption;
                textBox5.Text = order.Diagnosis;
            }
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {//pokaz opis i diagnoze
            if (Mainlist.SelectedItems.Count > 0)
            {
                ListViewItem item = Mainlist.SelectedItems[0];


                var vis = SQLDoc.GetAppointment(Int32.Parse(item.SubItems[0].Text));

                {
                    textBox1.Text = vis.First().Descirption; //opis
                    textBox2.Text = vis.First().Diagnosis;   //diag
                }
            }
        }
Beispiel #4
0
      private void button2_Click(object sender, EventArgs e)   //back
      {
          int idDoctor = -1;
          int x        = Int32.Parse(IDVis);
          var res1     = SQLDoc.GetAppointment(x);

          foreach (var order in res1)
          {
              idDoctor = order.Id_Doctor;
          }

          this.Controls.Clear();
          this.Hide();
          this.Controls.Add(new MedicalClinic.Doctor.Doctor(idDoctor));
          this.Visible = true;
          this.Dock    = DockStyle.Fill;
          this.BringToFront();
      }
Beispiel #5
0
      private void button6_Click(object sender, EventArgs e)  //anulowanie
      {
          SQLDoc.updateDescDia(Int32.Parse(IDVis), textBox5.Text.ToString(), textBox4.Text.ToString(), "C");
          MessageBox.Show("Zapisano i anulowano wizytę");
          //this.Controls.Clear();
          //this.Visible = false;
          //this.Parent.Hide();
          int idDoctor = -1;
          int x        = Int32.Parse(IDVis);
          var res1     = SQLDoc.GetAppointment(x);

          foreach (var order in res1)
          {
              idDoctor = order.Id_Doctor;
          }
          if (idDoctor != -1)
          {
              Panel P = new Panel();
              P.Controls.Clear();
              this.Hide();
              this.Parent.Controls.Add(new Doctor(idDoctor));
          }
      }