public ActionResult EditRoomForm(RoomModelEntity entity) { RoomBLL bll = new RoomBLL(); RoomEntity model = bll.GetEntity(entity.room_id); model.room_id = entity.room_id; model.floor_number = entity.floor_number; model.room_name = entity.room_name; model.repair_price = entity.repair_price; model.building_dim = entity.building_dim; model.room_dim = entity.room_dim; model.jf_date = entity.jf_date; //主表 bll.SaveForm(model); //修改业主姓名 if (!string.IsNullOrEmpty(entity.owner_id)) { OwnerBLL bll_o = new OwnerBLL(); bll_o.UpdateOwnerName(entity.owner_id, entity.owner_name); } return(Success("操作成功。")); }
public ActionResult GetInfoJson(string keyValue) { string property_id = ""; if (!string.IsNullOrEmpty(Utils.GetCookie("property_id"))) { property_id = Utils.GetCookie("property_id"); } RoomBLL bll = new RoomBLL(); var data = bll.GetInfo(keyValue, property_id); RoomModelEntity rm = new RoomModelEntity(); foreach (RoomModelEntity item in data) { rm = item; break; } return(ToJsonResult(rm)); }