Пример #1
0
        public virtual BrandtypeDomain CreateBrandtypeDomain()
        {
            BrandtypeEntity entity = new BrandtypeEntity();
            entity.BrandtypeId = Guid.NewGuid().ToString();

            return new BrandtypeDomain(entity);
        }
Пример #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;
        }
Пример #3
0
 ///<summary>
 /// Set entity data
 ///</summary>
 private void SetEntity(BrandtypeEntity objEntity)
 {
     Entity_ID = objEntity.BrandtypeId;
     txtBrandType.Text = objEntity.Title;
 }
Пример #4
0
 public virtual void UpdateBrandtypeEntity(BrandtypeEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
Пример #5
0
 public virtual void InsertBrandtypeEntity(BrandtypeEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }
Пример #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;
 }
Пример #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);
        }
Пример #8
0
        DataTable QueryData()
        {
            BrandtypeEntity condition = new BrandtypeEntity();
            condition.Title = this.txtBrandType.Text.Trim();

            return MainService.BrandtypeBLLService.GetByCondintion(condition).Tables[0];
        }
Пример #9
0
 public BrandtypeDomain(BrandtypeEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }