Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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();
        }