public string Add(Building building) { building.Enabled = 1; building.IsDeleted = 0; ISqlMapper mapper = MapperHelper.GetMapper(); BuildingDao dao = new BuildingDao(mapper); return dao.Add(building); }
public bool Update(Building building) { if (string.IsNullOrEmpty(building.ID)) { throw new Exception("没有楼盘ID"); } ISqlMapper mapper = MapperHelper.GetMapper(); BuildingDao dao = new BuildingDao(mapper); return dao.Update(new BuildingUpdateForm { Entity = building, BuildingQueryForm = new BuildingQueryForm { ID = building.ID } }); }
public bool DeleteBuilding(Building form) { if (form == null || string.IsNullOrEmpty(form.ID)) throw new Exception("form或者ID不能为空"); string userid = userbll.GetCurrentUser().User.ID; return buildingbll.Update(new Building { ID = form.ID, IsDeleted = 1, LastUpdator = userid }); }
public string AddBuilding(Building form) { string userid = userbll.GetCurrentUser().User.ID; form.Creator = userid; return buildingbll.Add(form); }
public bool UpdateBuilding(Building form) { string userid = userbll.GetCurrentUser().User.ID; form.LastUpdator = userid; return buildingbll.Update(form); }