Exemple #1
0
        public static bool FromDBTable(this AdResourceData item, DataRow row)
        {
            if (row == null)
            {
                return(false);
            }

            row.Copy(item);
            return(true);
        }
Exemple #2
0
        public static async Task <bool> FromDBAsync(this AdResourceData item, DBKey adResourceId)
        {
            var query = new DBQuery_AdResource_Select();

            query.IN.DBKey = adResourceId;

            await DBThread.Instance.ReqQueryAsync(query);

            if (query.OUT.FirstItem == null)
            {
                return(false);
            }

            query.OUT.FirstItem.Copy(item);
            return(true);
        }