/// <summary> /// 通过ID删除 /// </summary> /// <param name="id"></param> /// <returns></returns> public bool Delete(int id) { var dorm = FindById(id); if (dorm != null) { dorm.Dorm_model_state = false; return(DormDb.Update(dorm)); } return(false); }
/// <summary> /// 添加园区信息 /// </summary> /// <param name="dorm"></param> /// <returns></returns> public bool Add(Entity.T_Dorm dorm) { return(DormDb.Insert(dorm)); }
/// <summary> /// 更新园区信息 /// </summary> /// <param name="dorm"></param> /// <returns></returns> public bool Update(Entity.T_Dorm dorm) { return(DormDb.Update(dorm)); }
/// <summary> /// 通过ID查询 /// </summary> /// <param name="id"></param> /// <returns></returns> public Entity.T_Dorm FindById(int id) { return(DormDb.GetById(id)); }