private string method_13() { try { ICheck check = new DataBase(); return (check.Check(this.ConnectDB()) ? "" : "与数据库连接失败"); } catch (Exception exception) { return exception.Message; } }
private bool CheckDB(out string ErrMsg) { ErrMsg = ""; try { ICheck check = new DataBase(); return check.Check(this.ConnectDB()); } catch (Exception exception) { ErrMsg = exception.Message; return false; } }