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 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); } } }