// return: // 错误信息字符串是否确实被改变 public static bool SetEditErrorInfo(EntityEditControl edit, string strErrorInfo) { if (edit.InvokeRequired) { return (bool)edit.Invoke(new Func<EntityEditControl, string, bool>(SetEditErrorInfo), edit, strErrorInfo); } if (edit.ErrorInfo != strErrorInfo) { edit.ErrorInfo = strErrorInfo; return true; } return false; }
// return: // 错误信息字符串是否确实被改变 public bool SetEditErrorInfo(EntityEditControl edit, string strErrorInfo) { if (edit.InvokeRequired) { return (bool)edit.Invoke(new Func<EntityEditControl, string, bool>(SetEditErrorInfo), edit, strErrorInfo); } if (edit.ErrorInfo != strErrorInfo) { edit.ErrorInfo = strErrorInfo; AdjustFlowLayoutHeight(); // 2015.7.9 return true; } return false; }
static string GetEditRefID(EntityEditControl edit) { if (edit.InvokeRequired) { return (string)edit.Invoke(new Func<EntityEditControl, string>(GetEditRefID), edit); } return edit.RefID; }
// 构造事项称呼 static string GetEntitySummary(EntityEditControl control) { if (control.InvokeRequired) { return (string)control.Invoke(new Func<EntityEditControl, string>(GetEntitySummary), control); } string strBarcode = control.Barcode; if (String.IsNullOrEmpty(strBarcode) == false) return "册条码号为 '" + strBarcode + "' 的事项"; string strRegisterNo = control.RegisterNo; if (String.IsNullOrEmpty(strRegisterNo) == false) return "登录号为 '" + strRegisterNo + "' 的事项"; string strRecPath = control.RecPath; if (String.IsNullOrEmpty(strRecPath) == false) return "记录路径为 '" + strRecPath + "' 的事项"; string strRefID = control.RefID; if (String.IsNullOrEmpty(strRefID) == false) return "参考ID为 '" + strRefID + "' 的事项"; return "无任何定位信息的事项"; }