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

            row.Copy(item);
            return(true);
        }
예제 #2
0
        public static async Task <bool> FromDBAsync(this CampaignData item, DBKey campaignId)
        {
            var query = new DBQuery_Campaign_Select();

            query.IN.DBKey = campaignId;

            await DBThread.Instance.ReqQueryAsync(query);

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

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