private void refresh()
        {
            textBoxX3.Text = RandomString(7);
            var q = from a in BL.Read()
                    join b in patBL.Read() on a.PatientId equals b.Id
                    join c in recBL.Read() on a.ReceptionistId equals c.Id
                    where (a.ReceptionistId == recId)
                    select new { a.Id, a.BillNo, a.Amount, PName = b.Name, RName = c.Name };

            dataGridView1.DataSource = q.ToList();

            //Patients Combos
            comboBoxEx1.DataSource    = patBL.Read().Where(a => a.ReceptionistId == recId).Select(a => new { a.Id, a.Name }).ToList();
            comboBoxEx1.DisplayMember = "Name";
            comboBoxEx1.ValueMember   = "Id";
            comboBoxEx4.DataSource    = patBL.Read().Where(a => a.ReceptionistId == recId).Select(a => new { a.Id, a.Name }).ToList();
            comboBoxEx4.DisplayMember = "Name";
            comboBoxEx4.ValueMember   = "Id";

            //Receptionist Combos
            comboBoxEx2.DataSource    = recBL.Read().Select(a => new { a.Id, a.Name }).Where(a => a.Id == recId).ToList();
            comboBoxEx2.DisplayMember = "Name";
            comboBoxEx2.ValueMember   = "Id";
            comboBoxEx3.DataSource    = recBL.Read().Select(a => new { a.Id, a.Name }).Where(a => a.Id == recId).ToList();
            comboBoxEx3.DisplayMember = "Name";
            comboBoxEx3.ValueMember   = "Id";
        }
        private void refresh()
        {
            var q = from a in BL.Read()
                    join b in DocBL.Read() on a.DoctorId equals b.Id
                    join c in RooBL.Read() on a.RoomId equals c.Id
                    join d in RecBL.Read() on a.ReceptionistId equals d.Id
                    select new { a.Id, Pname = a.Name, a.PhoneNo, a.Address, a.Age, a.Gender, DocName = b.Name, c.Location, RecName = d.Name };

            dataGridView1.DataSource = q.ToList();

            //doctors combos
            comboBoxEx5.DataSource    = DocBL.Read().Select(a => new { a.Id, a.Name }).ToList();
            comboBoxEx5.DisplayMember = "Name";
            comboBoxEx5.ValueMember   = "Id";
            comboBoxEx1.DataSource    = DocBL.Read().Select(a => new { a.Id, a.Name }).ToList();
            comboBoxEx1.DisplayMember = "Name";
            comboBoxEx1.ValueMember   = "Id";

            //rooms combos
            comboBoxEx2.DataSource    = RooBL.Read().Select(a => new { a.Id, a.Location }).ToList();
            comboBoxEx2.DisplayMember = "Location";
            comboBoxEx2.ValueMember   = "Id";
            comboBoxEx4.DataSource    = RooBL.Read().Select(a => new { a.Id, a.Location }).ToList();
            comboBoxEx4.DisplayMember = "Location";
            comboBoxEx4.ValueMember   = "Id";

            //receptionist combos
            comboBoxEx3.DataSource    = RecBL.Read().Select(a => new { a.Id, a.Name }).ToList();
            comboBoxEx3.DisplayMember = "Name";
            comboBoxEx3.ValueMember   = "Id";
            comboBoxEx6.DataSource    = RecBL.Read().Select(a => new { a.Id, a.Name }).ToList();
            comboBoxEx6.DisplayMember = "Name";
            comboBoxEx6.ValueMember   = "Id";
        }
        private void refresh()
        {
            var q = from a in BL.Read()
                    join b in DocBL.Read() on a.DoctorId equals b.Id
                    join c in RooBL.Read() on a.RoomId equals c.Id
                    join d in RecBL.Read() on a.ReceptionistId equals d.Id
                    where (a.DoctorId == DocId)
                    select new { a.Id, Pname = a.Name, a.PhoneNo, a.Address, a.Age, a.Gender, DocName = b.Name, c.Location, RecName = d.Name };

            dataGridView1.DataSource = q.ToList();
        }
        private void refresh()
        {
            var q = from a in BL.Read()
                    join b in patBL.Read() on a.PatientId equals b.Id
                    join c in recBL.Read() on a.ReceptionistId equals c.Id
                    where (a.ReceptionistId == recId)
                    select new { a.Id, a.BillNo, a.Amount, PName = b.Name, RName = c.Name };

            dataGridView1.DataSource = q.ToList();
            if (dataGridView1.SelectedCells.Count > 0)
            {
                labelX4.Text = getValue(1).ToString();
            }
        }