public static void SyncPat(RelationalDatabase db) { TrasenFrame.Forms.DlgInputBox dlgInput = new TrasenFrame.Forms.DlgInputBox("", "请输入住院号:", "同步病人信息"); dlgInput.NumCtrl = true; dlgInput.ShowDialog(); if (DlgInputBox.DlgResult) { string zyh = DlgInputBox.DlgValue; GetOldHISInpatientInfo(zyh, db); } }
/// <summary> /// 静态调用InputBox对话框 /// </summary> /// <param name="prompt">说明文字</param> /// <param name="title">标题文字</param> /// <param name="defaultValue">默认值</param> /// <returns></returns> public static string InputBox(string prompt, string title, string defaultValue) { DlgInputBox dlgInputBox = new DlgInputBox(defaultValue, prompt, title); dlgInputBox.ShowDialog(); if (DlgInputBox.DlgResult) { dlgResult = DialogResult.OK; return(DlgInputBox.DlgValue); } else { dlgResult = DialogResult.Cancel; return(null); } }
/// <summary> /// 静态调用InputBox对话框 /// </summary> /// <param name="prompt">说明文字</param> /// <param name="title">标题文字</param> /// <param name="defaultValue">默认值</param> /// <param name="numCtrl">是否只允许输入数字</param> /// <param name="hideChar">是否隐藏输入值</param> /// <returns></returns> public static string InputBox(string prompt, string title, string defaultValue, bool numCtrl, bool hideChar) { DlgInputBox dlgInputBox = new DlgInputBox(defaultValue, prompt, title); dlgInputBox.NumCtrl = numCtrl; dlgInputBox.HideChar = hideChar; dlgInputBox.ShowDialog(); if (DlgInputBox.DlgResult) { dlgResult = DialogResult.OK; return(DlgInputBox.DlgValue); } else { dlgResult = DialogResult.Cancel; return(null); } }