Inheritance: BaseEntity
Esempio n. 1
0
 public List<FoodTypeEntity> GetFoodTypeEntityList(FoodTypeEntity condition_entity)
 {
     GenericWhereEntity<FoodTypeEntity> where_entity = new GenericWhereEntity<FoodTypeEntity>();
     if (condition_entity.FOOD_TYPE_ID != null)
         where_entity.Where(n => (n.FOOD_TYPE_ID == condition_entity.FOOD_TYPE_ID));
     if (condition_entity.FOOD_TYPE_NAME != null)
         where_entity.Where(n => (n.FOOD_TYPE_NAME == condition_entity.FOOD_TYPE_NAME));
     return EntityExecution.SelectAll(where_entity);
 }
Esempio n. 2
0
        private void Save()
        {
            try
            {
                IFoodType biz = new FoodTypeBiz();
                var entity = new FoodTypeEntity();
                entity.FOOD_TYPE_NAME = this.tFoodTypeName.Value;

                if (CurOperation == "add")
                    biz.InsertFoodTypeEntity(entity);
                else if (CurOperation == "edit")
                {
                    entity.FOOD_TYPE_ID = CurId;
                    biz.UpdateFoodTypeEntity(entity);
                }

                AlertAndTransfer("保存成功!", base.UrlReferrer);
            }
            catch (Exception ex)
            {
                this.lMsg.InnerText = "保存失败,原因:" + ex.ToString();
            }
        }
Esempio n. 3
0
 public void UpdateFoodTypeEntity(FoodTypeEntity condition_entity)
 {
     condition_entity.Update();
 }
Esempio n. 4
0
 public void InsertFoodTypeEntity(FoodTypeEntity condition_entity)
 {
     condition_entity.Insert();
 }
Esempio n. 5
0
 public void DeleteFoodTypeEntity(FoodTypeEntity condition_entity)
 {
     condition_entity.Delete();
 }