/// <summary> /// BaseApi(DBHelper dbh, string rS, string cS, string reS, string dtS): 有五个参数的构造函数 /// </summary> /// <param name="dbh">DBHelper对象</param> /// <param name="rS">行分隔符</param> /// <param name="cS">列分隔符</param> /// <param name="reS">结果集分隔符</param> /// <param name="dtS">数据类型, 可以使json, array, html 三种格式 默认是html</param> private void initClass(MySqlDBHelper dbh, string rS, string cS, string reS, string dtS) { if (Native.isNullEmpty(rS)) { rS = "\u0002"; } if (Native.isNullEmpty(cS)) { cS = "\u0001"; } if (Native.isNullEmpty(reS)) { reS = "\u0003"; } if (Native.isNullEmpty(dtS)) { dtS = "html"; } setDBHelper(dbh); setRSplit(rS); setCSplit(cS); setReSplit(reS); setDataType(dtS); MConvert.setKeySplit(','); }
/// <summary> /// BaseApi(DBHelper dbh, string rS, string cS, string reS, string dtS): 有五个参数的构造函数 /// </summary> /// <param name="dbh">DBHelper对象</param> /// <param name="rS">行分隔符</param> /// <param name="cS">列分隔符</param> /// <param name="reS">结果集分隔符</param> /// <param name="dtS">数据类型, 可以使json, array, html 三种格式 默认是html</param> public MyBaseApi(MySqlDBHelper dbh, string rS, string cS, string reS, string dtS) { initClass(dbh, rS, cS, reS, dtS); }
/// <summary> /// BaseApi(DBHelper dbh, string rS, string cS, string reS): 有四个参数的构造函数 /// </summary> /// <param name="dbh">DBHelper对象</param> /// <param name="rS">行分隔符</param> /// <param name="cS">列分隔符</param> /// <param name="reS">结果集分隔符</param> public MyBaseApi(MySqlDBHelper dbh, string rS, string cS, string reS) { initClass(dbh, rS, cS, reS, req["dataType"]); }
/// <summary> /// BaseApi(DBHelper dbh, string rS, string cS, string reS): 有四个参数的构造函数 /// </summary> /// <param name="dbh">DBHelper对象</param> /// <param name="rS">行分隔符</param> /// <param name="cS">列分隔符</param> public MyBaseApi(MySqlDBHelper dbh, string rS, string cS) { initClass(dbh, rS, cS, req["resultSplit"], req["dataType"]); }
private string dataType; //dataType, 数据类型, 可以使json, array, html 三种格式 默认是html #endregion #region MyBaseApi(DBHelper dbh) /// <summary> /// BaseApi(DBHelper dbh): 只有DBHelper一个参数的构造函数 /// </summary> /// <param name="dbh">DBHelper对象</param> public MyBaseApi(MySqlDBHelper dbh) { initClass(dbh, req["rSplit"], req["cSplit"], req["resultSplit"], req["dataType"]); }
public void setDBHelper(MySqlDBHelper dbh) { helper = dbh; }