Exemple #1
0
        private static List <ShopCollectDaily> MapShopCollectDaily(List <PrescoShopCollect> shopCollectionResponses)
        {
            var result = new List <ShopCollectDaily>();

            foreach (var shopcollect in shopCollectionResponses)
            {
                foreach (var item in shopcollect.data)
                {
                    var shopcollectdaily = new ShopCollectDaily();
                    shopcollectdaily.SCD02 = Guid.NewGuid().ToString();
                    shopcollectdaily.SCD03 = DateTime.Now.ToString("yyyy-MM-dd");
                    shopcollectdaily.SCD04 = item.ShortName;
                    shopcollectdaily.SCD05 = item.PostalCode;
                    shopcollectdaily.SCD06 = item.Address1;
                    shopcollectdaily.SCD07 = item.Address2;
                    shopcollectdaily.SCD08 = item.Name;
                    shopcollectdaily.SCD09 = item.MaxParcelStayDuration;
                    shopcollectdaily.SCD10 = "SHOP";
                    shopcollectdaily.SCD11 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");;
                    shopcollectdaily.SCD12 = 1;
                    shopcollectdaily.SCD13 = shopcollect.CountryId;

                    result.Add(shopcollectdaily);
                }
            }
            return(result);
        }
Exemple #2
0
 public bool insertShopCollectDaily(ShopCollectDaily obj)
 {
     if (SqlDbmanager.ExecuteNonQry(SqlExtension.GetInsertSqlCmd("ShopCollectDaily", obj)))
     {
         return(true);
     }
     return(false);
 }
Exemple #3
0
 public bool deleteShopCollectDaily(ShopCollectDaily obj)
 {
     if (SqlDbmanager.ExecuteNonQry(SqlExtension.GetDeleteSqlCmd("ShopCollectDaily", obj, new List <string> {
         "SCD02=@SCD02"
     })))
     {
         return(true);
     }
     return(false);
 }