private void dgFinishedYesterday_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } string patientID = dgFinishedYesterday["ColumnYPatientID", e.RowIndex].Value.ToString(); int visitID = (int)dgFinishedYesterday.Rows[e.RowIndex].Cells["ColumnYVisitID"].Value; int operID = (int)dgFinishedYesterday.Rows[e.RowIndex].Cells["ColumnYOperID"].Value; CellClick(dgFinishedYesterday.CurrentRow, patientID, visitID, operID); if (DataGridViewActionButtonCell.IsVisitButtonClick(sender, e)) { ShowFormByDocName(patientID, visitID, operID, "术后随访"); } if (DataGridViewActionButtonCell.IsMainDocButtonClick(sender, e)) { ExtendApplicationContext.Current.SystemStatus = ProgramStatus.AnesthesiaRecord; CellClick(dgFinishedYesterday.CurrentRow, patientID, visitID, operID); EventHandler eventHandle = Events[_anesDocCellClick] as EventHandler; if (eventHandle != null) { eventHandle(sender, e); } } if (DataGridViewActionButtonCell.IsOtherDocButtonClick(sender, e)) { ExtendApplicationContext.Current.SystemStatus = ProgramStatus.PostoperativePatient; string[] buttonStrings = ExtendApplicationContext.Current.StatusButtonStrList[ExtendApplicationContext.Current.SystemStatus].Split(new char[] { ';' }, StringSplitOptions.None); for (int i = 0; i < buttonStrings.Length; i++) { if (i == 1) { string[] groupButtons = buttonStrings[i].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); List <string> item = new List <string>(); foreach (var text in groupButtons) { if (AccessControl.CheckBrowseRight(text)) { item.Add(text); } } ShowFormByDocName(patientID, visitID, operID, item); } } } }
private void dgTomorrowSchedule_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } string patientID = dgTomorrowSchedule.Rows[e.RowIndex].Cells["ColumnPatientID"].Value.ToString(); int visitID = (int)dgTomorrowSchedule.Rows[e.RowIndex].Cells["ColumnVisitID"].Value; int operID = (int)dgTomorrowSchedule.Rows[e.RowIndex].Cells["ColumnOperID"].Value; CellClick(dgTomorrowSchedule.CurrentRow, patientID, visitID, operID); if (DataGridViewActionButtonCell.IsVisitButtonClick(sender, e)) { ShowFormByDocName(patientID, visitID, operID, "术前访视"); } if (DataGridViewActionButtonCell.IsMainDocButtonClick(sender, e)) { ShowFormByDocName(patientID, visitID, operID, "麻醉同意书"); } if (DataGridViewActionButtonCell.IsOtherDocButtonClick(sender, e)) { ExtendApplicationContext.Current.SystemStatus = ProgramStatus.PeroperativePatient; string[] buttonStrings = ExtendApplicationContext.Current.StatusButtonStrList[ExtendApplicationContext.Current.SystemStatus].Split(new char[] { ';' }, StringSplitOptions.None); for (int i = 0; i < buttonStrings.Length; i++) { if (i == 1) { string[] groupButtons = buttonStrings[i].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); List <string> item = new List <string>(); foreach (var text in groupButtons) { if (AccessControl.CheckBrowseRight(text)) { item.Add(text); } } ShowFormByDocName(patientID, visitID, operID, item); } } } }