/// <summary> /// 用于一些无模型的数据写入(ZL_GroupModel) /// </summary> public static int Insert(string tbname, string fields, string values, SqlParameter[] sp = null) { SqlModel model = new SqlModel() { cmd = SqlCmd.Insert, tbName = tbname }; model.fields = fields; model.values = values; model.AddSpToList(sp); return(DB.InsertID(model)); }
public static int Insert(M_Base data, SqlBase db) { SqlModel model = new SqlModel() { cmd = SqlCmd.Insert, tbName = data.TbName, pk = data.PK }; model.AddSpToList(data.GetParameters()); model.fields = DB.GetFields(data); model.values = DB.GetParams(data); PreSPList(model); return(db.InsertID(model)); }