コード例 #1
0
    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));
    }
コード例 #2
0
    void OpenSql()
    {
        DcConf conf = DcConf.Ins;

        mySql = new U_MySQL(conf.sqlUrl, conf.sqlPort, conf.sqlUser, conf.sqlPassword, conf.sqlDb);
        mySql.OpenSql();
    }
コード例 #3
0
 public static List <EquipM> FindObjS(DataTable dt)
 {
     if (dt.Rows.Count > 0)
     {
         return(U_MySQL.ToModelS <EquipM>(dt));
     }
     else
     {
         return(null);
     }
 }
コード例 #4
0
 //增
 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() });
 }
コード例 #5
0
    //查
    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);
        }
    }
コード例 #6
0
    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("无此条记录");
        }
    }
コード例 #7
0
    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);
        }
    }
コード例 #8
0
 public static DataTable FindDt(U_MySQL mySql, GameObject go)
 {
     return(mySql.Select(tbName, "goId", go.IdStr()));
 }
コード例 #9
0
 //改
 public static void Update(U_MySQL mySql, GameObject go, string col, string value)
 {
     mySql.Change(tbName, col, value, "goId", go.IdStr());
 }
コード例 #10
0
 //删
 public static void Delect(U_MySQL mySql, GameObject go)
 {
     mySql.Delect(tbName, "goId", go.IdStr());
 }
コード例 #11
0
 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()));
 }