private void lastIssuedMedList_Click(object sender, EventArgs e) { IEnumerator it = hospitalPatientsTbl.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[0]; DdtIssuedMedicineList issuedMedicineList = service.GetDdtIssuedMedicineListService().GetLastMedList(cell.Value.ToString()); if (issuedMedicineList == null || string.IsNullOrEmpty(issuedMedicineList.ObjectId)) { MessageBox.Show("Для пациента еще не создано ни одного листа назначений", "Предупреждение", MessageBoxButtons.OK); } else { DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(cell.Value.ToString()); IssuedMedicine form = new IssuedMedicine(this.service, hospitalSession, issuedMedicineList.ObjectId); form.ShowDialog(); } } }
private void issuingMedicineMenuItem_Click(object sender, EventArgs e) { IssuedMedicine form = new IssuedMedicine(service, hospitalitySession, null); form.ShowDialog(); }