public ActionResult Room_EditData(DXInfo.Models.Rooms room) { var gridModel = new RoomGridModel(); SetupRoomGridModel(gridModel.RoomGrid); return(ajaxCallBack <DXInfo.Models.Rooms>(gridModel.RoomGrid, room, addRoom, editRoom, delRoom)); }
private void delRoom(DXInfo.Models.Rooms room) { var oldRoom = Uow.Rooms.GetById(g => g.Id == room.Id); if (oldRoom != null) { Uow.Rooms.Delete(oldRoom); Uow.Commit(); } }
private void editRoom(DXInfo.Models.Rooms room) { var oldRoom = Uow.Rooms.GetById(g => g.Id == room.Id); oldRoom.Comment = room.Comment; oldRoom.DeptId = room.DeptId; oldRoom.Code = room.Code; oldRoom.Name = room.Name; oldRoom.Status = room.Status; Uow.Rooms.Update(oldRoom); Uow.Commit(); }
private void addRoom(DXInfo.Models.Rooms room) { Uow.Rooms.Add(room); Uow.Commit(); }