Example #1
0
        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));
        }
Example #2
0
        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();
            }
        }
Example #3
0
        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();
        }
Example #4
0
 private void addRoom(DXInfo.Models.Rooms room)
 {
     Uow.Rooms.Add(room);
     Uow.Commit();
 }