Ejemplo n.º 1
0
        public virtual BrandtypeDomain CreateBrandtypeDomain()
        {
            BrandtypeEntity entity = new BrandtypeEntity();
            entity.BrandtypeId = Guid.NewGuid().ToString();

            return new BrandtypeDomain(entity);
        }
Ejemplo n.º 2
0
        private BrandtypeEntity GetEntity()
        {

            BrandtypeEntity objEntity = null;
            if (!string.IsNullOrEmpty(Entity_ID))
                objEntity = MainService.BrandtypeBLLService.GetBrandtypeEntityById(Entity_ID);
            else
            {
                objEntity = new BrandtypeEntity();
                objEntity.BrandtypeId = Guid.NewGuid().ToString();
            }
            objEntity.Title = txtBrandType.Text.Trim();

            return objEntity;
        }
Ejemplo n.º 3
0
 ///<summary>
 /// Set entity data
 ///</summary>
 private void SetEntity(BrandtypeEntity objEntity)
 {
     Entity_ID = objEntity.BrandtypeId;
     txtBrandType.Text = objEntity.Title;
 }
Ejemplo n.º 4
0
 public virtual void UpdateBrandtypeEntity(BrandtypeEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
Ejemplo n.º 5
0
 public virtual void InsertBrandtypeEntity(BrandtypeEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 检查是否有同名存在,用于添加记录前的检查。
 /// </summary>
 /// <returns></returns>
 public virtual bool CheckIsExist(string title)
 {
     BrandtypeEntity entity = new BrandtypeEntity();
     entity.Title = title;
     return DataAccess.Select<BrandtypeEntity>(entity).Count > 0;
 }
Ejemplo n.º 7
0
        public virtual DataSet GetByCondintion(BrandtypeEntity condition)
        {
            WhereBuilder wb = WhereBuilder.SelectAll(BrandTypeTable.C_TableName);
            if (!string.IsNullOrEmpty(condition.Title))
                wb.AddAndCondition(BrandTypeTable.C_Title, SQLOperator.Like, condition.Title);

            return DataAccess.SelectDataSet(wb);
        }
Ejemplo n.º 8
0
        DataTable QueryData()
        {
            BrandtypeEntity condition = new BrandtypeEntity();
            condition.Title = this.txtBrandType.Text.Trim();

            return MainService.BrandtypeBLLService.GetByCondintion(condition).Tables[0];
        }
Ejemplo n.º 9
0
 public BrandtypeDomain(BrandtypeEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }