예제 #1
0
        public virtual FakeProductDomain CreateFakeProductDomain()
        {
            FakeProductEntity entity = new FakeProductEntity();
            entity.FakeProductId = Guid.NewGuid().ToString();

            return new FakeProductDomain(entity);
        }
예제 #2
0
 public virtual void UpdateFakeProductEntity(FakeProductEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
예제 #3
0
 public virtual void InsertFakeProductEntity(FakeProductEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }
예제 #4
0
파일: ProductBLL.cs 프로젝트: XiaoQiJun/BPS
 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;
 }
예제 #5
0
 public FakeProductDomain(FakeProductEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }