示例#1
0
 public string Add(Building building)
 {
     building.Enabled = 1;
     building.IsDeleted = 0;
     ISqlMapper mapper = MapperHelper.GetMapper();
     BuildingDao dao = new BuildingDao(mapper);
     return dao.Add(building);
 }
示例#2
0
 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 } });
 }
示例#3
0
 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 });
 }
示例#4
0
 public string AddBuilding(Building form)
 {
     string userid = userbll.GetCurrentUser().User.ID;
     form.Creator = userid;
     return buildingbll.Add(form);
 }
示例#5
0
 public bool UpdateBuilding(Building form)
 {
     string userid = userbll.GetCurrentUser().User.ID;
     form.LastUpdator = userid;
     return buildingbll.Update(form);
 }