public static DateTime LastDegreeOrderTime(string registryID) { DateTime dot = DateTime.MinValue; using (gjtEmrPatients.emrPatients pi = new gjtEmrPatients.emrPatients()) { string msg = pi.LastStratTimeForDegreeOrder(registryID, ref dot); if (msg != null) { MessageBox.Show(msg, ErrorMessage.Error); } } return(dot); }