public static List <EquipM> FindObjS(U_MySQL mySql, string[] judeColS, string[] operationS, string[] valueS) { //这个地方想想,可能不是只有一个dt DataTable dt = mySql.Select(tbName, new string[] { "*" }, judeColS, operationS, valueS).Tables[0]; return(FindObjS(dt)); }
void OpenSql() { DcConf conf = DcConf.Ins; mySql = new U_MySQL(conf.sqlUrl, conf.sqlPort, conf.sqlUser, conf.sqlPassword, conf.sqlDb); mySql.OpenSql(); }
public static List <EquipM> FindObjS(DataTable dt) { if (dt.Rows.Count > 0) { return(U_MySQL.ToModelS <EquipM>(dt)); } else { return(null); } }
//增 public static void Add(U_MySQL mySql, GameObject go, bool isStatic, bool isHoverOutline, bool isClickFlashing) { Delect(mySql, go); mySql.InsertInfo (tbName, new string[] { "goId", "name", "tag", "layer", "isStatic", "isHoverOutline", "isClickFlashing", "oriPos", "oriLocalPos" }, new string[] { go.GetInstanceID().ToString(), go.name, go.tag, LayerMask.LayerToName(go.layer), isStatic.ToTinyint(), isHoverOutline.ToTinyint(), isClickFlashing.ToTinyint(), go.transform.position.ToString(), go.transform.localPosition.ToString() }); }
//查 public static DataRow FindDr(U_MySQL mySql, GameObject go) { DataTable dt = mySql.Select(tbName, "goId", go.IdStr()); if (dt.Rows.Count > 0) { return(dt.Rows[0]); } else { return(null); } }
public static void DebugObj(U_MySQL mySql, GameObject go) { DataTable dt = mySql.Select(tbName, "goId", go.IdStr()); if (dt.Rows.Count > 0) { DebugEquip(U_MySQL.ToModel <EquipM>(dt.Rows[0])); } else { Debug.Log("无此条记录"); } }
public static EquipM FindObj(U_MySQL mySql, string[] judeColS, string[] operationS, string[] valueS) { DataRow dr = mySql.Select(tbName, new string[] { "*" }, judeColS, operationS, valueS).Tables[0].Rows[0]; if (dr != null) { return(U_MySQL.ToModel <EquipM>(dr)); } else { return(null); } }
public static DataTable FindDt(U_MySQL mySql, GameObject go) { return(mySql.Select(tbName, "goId", go.IdStr())); }
//改 public static void Update(U_MySQL mySql, GameObject go, string col, string value) { mySql.Change(tbName, col, value, "goId", go.IdStr()); }
//删 public static void Delect(U_MySQL mySql, GameObject go) { mySql.Delect(tbName, "goId", go.IdStr()); }
public static bool IsExist(U_MySQL mySql, GameObject go) { //return mySql.IsExist(DcConf.Ins.equipTable, "goId", go.IdStr()); return(mySql.IsExist("equip", "goId", go.IdStr())); }