private void buttonPatient_Click_1(object sender, EventArgs e) { if (roles.Contains(Role)) { InpatientUserControl inpatientUserControl = new InpatientUserControl(); ControlClass.ShowControl(inpatientUserControl, Content); } else { DoctorsPatientListControl doctorsPatientListControl = new DoctorsPatientListControl(ID); ControlClass.ShowControl(doctorsPatientListControl, Content); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Columns[e.ColumnIndex].Name == "SELECT") { if (MessageBox.Show("Are you sure you want to select this room?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { InpatientUserControl inpatientUserControl = new InpatientUserControl() { RoomNo = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString(), FloorNo = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString(), RoomType = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString(), }; inpatientUserControl.SelectRoom(); this.Close(); } } }
private void buttonCovid_Click(object sender, EventArgs e) { InpatientUserControl inpatientUser = new InpatientUserControl(); ControlClass.ShowControl(inpatientUser, Content); }