public List<RestaurantEntity> GetRestaurantEntityList(RestaurantEntity condition_entity) { GenericWhereEntity<RestaurantEntity> where_entity = new GenericWhereEntity<RestaurantEntity>(); if (condition_entity.RESTAURANT_ID != null) where_entity.Where(n => (n.RESTAURANT_ID == condition_entity.RESTAURANT_ID)); if (condition_entity.RESTAURANT_NAME != null) where_entity.Where(n => (n.RESTAURANT_NAME == condition_entity.RESTAURANT_NAME)); return EntityExecution.SelectAll(where_entity); }
private void Save() { try { IRestaurant biz = new RestaurantBiz(); var entity = new RestaurantEntity(); entity.RESTAURANT_NAME = this.tRestaurantName.Value; entity.ADDRESS = this.tAddress.Value; entity.DESCREPTION = this.tDescription.Value; entity.LEVEL = this.hLevel.Value; entity.AREA = this.hArea.Value; entity.PARKING_COUNT = base.ParseInt(this.hPackingCount.Value); string imgUrl = null; if (!SetRestaurantMap(this.fileMap, this.imgMap, this.hDeleteImg.Value, ConfigHelper.GetConfigString("RESTAURANT_MAP_PATH"), ref imgUrl)) return; entity.RESTAURANT_MAP = imgUrl; if (CurOperation == "add") { entity.CREATE_TIME = DateTime.Now; entity.CREATE_PERSON = base.CurEmployeeEntity.EMPLOYEE_ID; biz.InsertRestaurantEntity(entity); } else if (CurOperation == "edit") { entity.RESTAURANT_ID = CurId; entity.UPDATE_TIME = DateTime.Now; entity.UPDATE_PERSON = base.CurEmployeeEntity.EMPLOYEE_ID; biz.UpdateRestaurantEntity(entity); } AlertAndTransfer("保存成功!", base.UrlReferrer); } catch (Exception ex) { this.lMsg.InnerText = "保存失败,原因:" + ex.ToString(); } }
public void UpdateRestaurantEntity(RestaurantEntity condition_entity) { condition_entity.Update(); }
public void InsertRestaurantEntity(RestaurantEntity condition_entity) { condition_entity.Insert(); }
public void DeleteRestaurantEntity(RestaurantEntity condition_entity) { condition_entity.Delete(); }