public Edit(string role, int t, TextBox textb) : this() { text = textb; idappo = t; var temp = SQLLab.GetExamination_Laboratories_ID(t); textBox6.Text = temp.First().Table2.Name.ToString(); textBox4.Text = temp.First().Table2.Exam_Code.ToString(); textBox5.Text = temp.First().Table1.Result; textBox9.Text = temp.First().Table1.Comments_Doctor.ToString(); textBox7.Text = temp.First().Table1.Comments_Man_Lab; var temp2 = SQLLab.GetPacjentID(temp.First().Table1.Id_Appointment); var temp3 = SQLLab.GetPatientData(temp2.First().Id_Patient); textBox1.Text = temp3.First().Name.ToString(); textBox2.Text = temp3.First().Surname.ToString(); textBox3.Text = temp3.First().PESEL.ToString(); textBox10.Text = SQLLab.translateRolePL(temp.First().Table1.State.ToString()); roll = role; if (role == "Lab") { textBox7.Enabled = false; button4.Enabled = false; } if (role == "MLab") { button3.Enabled = false; } }
public Edit(int ID, TextBox text) : this() { apoid = ID; textb = text; var a = SQLRec.GetApoSE(apoid); //comboBox4.drop var res = SQLLab.GetPatientData(a.First().Id_Patient); foreach (var order in res) { textBox1.Text = order.Name; textBox2.Text = order.Surname; textBox3.Text = order.PESEL; } docs = SQLAdm.GetStaff("", "", "", "doc"); foreach (var order in docs) { comboBox1.Items.Add(order.Surname); } var doc = SQLAdm.GetStaff(a.First().Id_Doctor); comboBox1.Text = doc.First().Name.ToString(); //lekarz monthCalendar1.SetDate(a.First().Date_Appointment); //data comboBox3.Text = SQLRec.translateRolePL(a.First().State.ToString()); //stan //string time = a.First().Date_Appointment.Hour.ToString()+":" + a.First().Date_Appointment.Minute.ToString(); string time = a.First().Date_Appointment.ToString("HH:mm"); comboBox2.Text = time;//godzina // comboBox4.DropDownStyle = ComboBoxStyle.DropDownList; // comboBox2.Text = a.First().Date_Appointment.TimeOfDay.ToString(); }
public VisitViewercs(int ID, TextBox text) : this() { listView1.FullRowSelect = true; listView1.GridLines = true; patid = ID; textb = text; var res = SQLLab.GetPatientData(patid); foreach (var order in res) { textBox1.Text = order.PESEL; } docs = SQLAdm.GetStaff("", "", "", "doc"); foreach (var order in docs) { comboBox3.Items.Add(order.Surname); } listView1.Items.Clear(); var temp = SQLRec.GetApo(patid); foreach (var order in temp) { ListViewItem lvi = new ListViewItem(order.Id_Appointment.ToString()); var tmp = SQLRec.GetDocData(order.Id_Doctor); string name = tmp.FirstOrDefault().Name + " " + tmp.FirstOrDefault().Surname; lvi.SubItems.Add(name); lvi.SubItems.Add(order.Date_Appointment.ToString()); lvi.SubItems.Add(SQLRec.translateRolePL(order.State.ToString())); listView1.Items.Add(lvi); } }
private void button4_Click(object sender, EventArgs e) { SQLLab.updateLabExam(idappo, "ZAT", textBox5.Text, textBox7.Text, 1); MessageBox.Show("Zmieniono stan badania"); this.Controls.Clear(); this.Visible = false; this.Parent.Hide(); text.Text = "changed"; }
public PatientEdit(int patid, TextBox text) : this() { textb = text; id = patid; var res = SQLLab.GetPatientData(patid); textBox1.Text = res.First().Name.ToString(); textBox2.Text = res.First().Surname.ToString(); textBox3.Text = res.First().PESEL.ToString(); }
public Lab(int id, string role) : this() { whoami = id; myrole = role; textBox1.Text = myrole; string startowadata = dateTimePicker1.Value.Year.ToString(); startowadata += "-"; startowadata += dateTimePicker1.Value.Month.ToString(); startowadata += "-"; startowadata += dateTimePicker1.Value.Day.ToString(); startowadata += " 00:00:00.000"; listView1.Items.Clear(); if (myrole == "Lab") { var temp = SQLLab.GetExamination_Laboratories("", "ZLE", startowadata); foreach (var order in temp) { ListViewItem lvi = new ListViewItem(order.Table1.Id_Examination.ToString()); lvi.SubItems.Add(order.Table2.Name.ToString()); lvi.SubItems.Add(order.Table1.Date_Of_Order.ToString()); lvi.SubItems.Add(order.Table1.Date_Exec_Cancel.ToString()); lvi.SubItems.Add(order.Table1.State.ToString()); lvi.SubItems.Add(order.Table1.Result); listView1.Items.Add(lvi); } comboBox1.Text = "Zlecone"; } if (myrole == "MLab") { var temp = SQLLab.GetExamination_Laboratories("", "ZAK", startowadata); foreach (var order in temp) { ListViewItem lvi = new ListViewItem(order.Table1.Id_Examination.ToString()); lvi.SubItems.Add(order.Table2.Name.ToString()); lvi.SubItems.Add(order.Table1.Date_Of_Order.ToString()); lvi.SubItems.Add(order.Table1.Date_Exec_Cancel.ToString()); lvi.SubItems.Add(order.Table1.State.ToString()); lvi.SubItems.Add(order.Table1.Result); listView1.Items.Add(lvi); } comboBox1.Text = "Zakonczone"; } listView1.FullRowSelect = true; listView1.GridLines = true; }
public VisitRegistration(int ID, TextBox text, int whoami) : this() { patid = ID; textb = text; idrec = whoami; var res = SQLLab.GetPatientData(patid); foreach (var order in res) { textBox1.Text = order.Name; textBox2.Text = order.Surname; textBox3.Text = order.PESEL; } docs = SQLAdm.GetStaff("", "", "", "doc"); foreach (var order in docs) { comboBox1.Items.Add(order.Surname); } }
public Show(int t, TextBox textb) : this() { text = textb; var temp = SQLLab.GetExamination_Laboratories_ID(t); textBox6.Text = temp.First().Table2.Name.ToString(); textBox4.Text = temp.First().Table2.Exam_Code.ToString(); textBox8.Text = SQLLab.translateRolePL(temp.First().Table1.State.ToString()); textBox5.Text = temp.First().Table1.Result; textBox9.Text = temp.First().Table1.Comments_Doctor; textBox7.Text = temp.First().Table1.Comments_Man_Lab; var temp2 = SQLLab.GetPacjentID(temp.First().Table1.Id_Appointment); var temp3 = SQLLab.GetPatientData(temp2.First().Id_Patient); textBox1.Text = temp3.First().Name.ToString(); textBox2.Text = temp3.First().Surname.ToString(); textBox3.Text = temp3.First().PESEL.ToString(); }
private void refreshlistview() { listView1.Items.Clear(); if (dateTimePicker1.Checked == true) { string tmp = dateTimePicker1.Text; tmp += " 00:00:00.000"; var temp = SQLLab.GetExamination_Laboratories(textBox2.Text, SQLLab.translateRoleDB(comboBox1.Text), tmp); foreach (var order in temp) { ListViewItem lvi = new ListViewItem(order.Table1.Id_Examination.ToString()); lvi.SubItems.Add(order.Table2.Name.ToString()); lvi.SubItems.Add(order.Table1.Date_Of_Order.ToString()); lvi.SubItems.Add(order.Table1.Date_Exec_Cancel.ToString()); lvi.SubItems.Add(SQLLab.translateRolePL(order.Table1.State.ToString())); lvi.SubItems.Add(order.Table1.Result); listView1.Items.Add(lvi); } } else { var temp = SQLLab.GetExamination_Laboratories2(textBox2.Text, SQLLab.translateRoleDB(comboBox1.Text)); foreach (var order in temp) { ListViewItem lvi = new ListViewItem(order.Table1.Id_Examination.ToString()); lvi.SubItems.Add(order.Table2.Name.ToString()); lvi.SubItems.Add(order.Table1.Date_Of_Order.ToString()); lvi.SubItems.Add(order.Table1.Date_Exec_Cancel.ToString()); lvi.SubItems.Add(SQLLab.translateRolePL(order.Table1.State.ToString())); lvi.SubItems.Add(order.Table1.Result); listView1.Items.Add(lvi); } } }
private void button1_Click(object sender, EventArgs e) { if (roll == "MLab") { if (textBox7.Text != "") { SQLLab.updateLabExam(idappo, "ANU", textBox5.Text, textBox7.Text); MessageBox.Show("Zmieniono dane badania"); this.Controls.Clear(); this.Visible = false; this.Parent.Hide(); text.Text = "changed"; } else { MessageBox.Show("Podaj przyczyne anulowania"); } } else { if (textBox5.Text != "") { SQLLab.updateLabExam(idappo, "ANU", textBox5.Text, textBox7.Text); MessageBox.Show("Zmieniono dane badania"); this.Controls.Clear(); this.Visible = false; this.Parent.Hide(); text.Text = "changed"; } else { MessageBox.Show("Podaj przyczyne anulowania"); } } }
public Show(int ID, TextBox text) : this() { apoid = ID; textb = text; var a = SQLRec.GetApoSE(apoid); var res = SQLLab.GetPatientData(a.First().Id_Patient); foreach (var order in res) { textBox1.Text = order.Name; textBox2.Text = order.Surname; textBox3.Text = order.PESEL; } var doc = SQLAdm.GetStaff(a.First().Id_Doctor); textBox4.Text = doc.First().Name.ToString(); //lekarz textBox7.Text = a.First().Date_Appointment.ToString(); //data textBox6.Text = SQLRec.translateRolePL(a.First().State.ToString()); //stan string time = a.First().Date_Appointment.TimeOfDay.ToString(); }