Exemplo n.º 1
0
        public virtual StoreEntity GetStoreByBPStoreSEQ(string bpStoreSEQ)
        {
            StoreEntity entity = new StoreEntity();
            entity.BpStoreSeq = bpStoreSEQ;


            Suzsoft.Smart.EntityCore.EntityCollection<StoreEntity> list = new Suzsoft.Smart.EntityCore.EntityCollection<StoreEntity>();
            list = DataAccess.Select<StoreEntity>(entity);

            if (list.Count > 0)
                return list[0];
            else
                return null;
        }
Exemplo n.º 2
0
 public static ProductEntity GetEntity(FakeProductEntity fakeEntity, DateTime actionDate)
 {
     string sqlTemp = "SELECT * from Product_View Where ( Product_StartDate <=CONVERT(datetime,'{0}') AND ISNULL(Product_EndDate,DATEADD(dd,-1,CONVERT(datetime,'{0}'))) > CONVERT(datetime,'{0}') ) ";
     string strSelectSql = string.Format(sqlTemp, actionDate.ToString("yyyy-MM-dd"));
     if (!string.IsNullOrEmpty(fakeEntity.Gbu))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'",ProductTable.C_GBU, fakeEntity.Gbu);
     }
     if (!string.IsNullOrEmpty(fakeEntity.Category))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'", ProductTable.C_Category, fakeEntity.Category);
     }
     if (!string.IsNullOrEmpty(fakeEntity.Brand))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'", ProductTable.C_Brand, fakeEntity.Brand);
     }
     if (!string.IsNullOrEmpty(fakeEntity.SubCategory))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'", ProductTable.C_SubCategory, fakeEntity.SubCategory);
     }
     if (!string.IsNullOrEmpty(fakeEntity.Brandtype))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'", ProductTable.C_BrandType, fakeEntity.Brandtype);
     }
     if (!string.IsNullOrEmpty(fakeEntity.DescCn))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'", ProductTable.C_DESC_CN, fakeEntity.DescCn);
     }
     if (!string.IsNullOrEmpty(fakeEntity.ProductSize))
     {
         strSelectSql += string.Format(" AND {0} = '{1}'", ProductTable.C_Product_Size, fakeEntity.ProductSize);
     }
     //DataTable dt = DataAccess.SelectDataSet(strSelectSql).Tables[0];
     Suzsoft.Smart.EntityCore.EntityCollection<ProductEntity> list = new Suzsoft.Smart.EntityCore.EntityCollection<ProductEntity>();
     list = DataAccess.Select<ProductEntity>(strSelectSql, null, CommandType.Text);
     if (list.Count > 0)
         return list[0];
     else
         return null;
 }
Exemplo n.º 3
0
        //public virtual List<ChkFunctionParamEntity> GetChkFunctionParasByFunctionId(string functionId)
        //{
        //    return SelectByCondition<ChkFunctionParamEntity>(adidas.DataCollection.Common.Utils.QueryCondition.Create().Equals(ChkFunctionParamTable.C_FUNCTION_ID, functionId).Order(ChkFunctionParamTable.C_SORT_ORDER));
        //}

        //public virtual void InsertChkFUnctionParas(List<ChkFunctionParamEntity> functionParas, DataAccessBroker broker)
        //{
        //    DataAccess.Insert(functionParas, broker);
        //}

        //public virtual void DeleteChkFunctionParasByCondition(ChkFunctionParamEntity param, DataAccessBroker broker)
        //{
        //    DataAccess.DeleteEntity(param, broker);
        //}

        public virtual StoreEntity GetStoreEntityById(string storeID, string dmsID)
        {
            StoreEntity entity = new StoreEntity();
            entity.DmsStoreId = storeID;
            entity.DmsId = dmsID;


            Suzsoft.Smart.EntityCore.EntityCollection<StoreEntity> list = new Suzsoft.Smart.EntityCore.EntityCollection<StoreEntity>();
            list = DataAccess.Select<StoreEntity>(entity);

            if (list.Count > 0)
                return list[0];
            else
                return null;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get entity by properties of entity
        /// </summary>
        /// <param name="gbu"></param>
        /// <param name="category"></param>
        /// <param name="brand"></param>
        /// <param name="sub_category"></param>
        /// <param name="brand_type"></param>
        /// <param name="desc_cn"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        public static ProductEntity GetEntity(string gbu, string category, string brand, string sub_category, string brand_type, string desc_cn, string size)
        {
            ProductEntity entity = new ProductEntity();
            entity.Gbu = gbu;
            entity.Category = category;
            entity.Brand = brand;
            entity.Subcategory = sub_category;
            entity.Brandtype = brand_type;
            entity.DescCn = desc_cn;
            entity.ProductSize = size;

            Suzsoft.Smart.EntityCore.EntityCollection<ProductEntity> list = new Suzsoft.Smart.EntityCore.EntityCollection<ProductEntity>();
            list = DataAccess.Select<ProductEntity>(entity);

            if (list.Count > 0)
                return list[0];
            else
                return null;
        }