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); }
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(); } }
public void UpdateFoodTypeEntity(FoodTypeEntity condition_entity) { condition_entity.Update(); }
public void InsertFoodTypeEntity(FoodTypeEntity condition_entity) { condition_entity.Insert(); }
public void DeleteFoodTypeEntity(FoodTypeEntity condition_entity) { condition_entity.Delete(); }