public bool SetOrderAsFinished(int oid) { try { var cleanOrderDto = _fixOrderServices.GetById(oid); var userdto = _userService.GetById(new Guid(User.Identity.GetUserId())); userdto.IsBusy = false; _userService.Edit(userdto, new Guid(User.Identity.GetUserId())); cleanOrderDto.enddate = DateTimeHelper.ConvertDateToString(Utils.ServerNow.Date, DateFormats.DD_MM_YYYY) + " " + DateTimeHelper.ConvertTimeToString(Utils.ServerNow.TimeOfDay, TimeFormats.HH_MM_AM); cleanOrderDto.isFinished = true; _fixOrderServices.edit(cleanOrderDto); var rom = _roomService.GetById(Convert.ToInt32(cleanOrderDto.Room_ID)); //rom. = false; rom.Isrequistedfix = false; rom.IsNeedfix = false; _roomService.Edit(rom); MysqlFetchingRoomData.SetFixStatus(rom.RoomNum, rom.IsNeedfix); return(true); } catch (Exception e) { return(false); } }
public ActionResult CheckedToggleFix(int id, int Rid, int Oid) { _equipmentService.checkedToggleFix(id); var room = _roomService.GetById(Rid); room.IsNeedfix = !room.IsNeedfix; _roomService.Edit(room); MysqlFetchingRoomData.SetFixStatus(room.RoomNum, room.IsNeedfix); return(RedirectToAction("EndCleanOrder", new { Rid = Rid, Oid = Oid, Msg = "" })); }
public ActionResult CheckedToggle(int id, int Rid) { _equipmentService.checkedToggle(id); var room = _roomService.GetById(Rid); room.IsNeedfix = !room.IsNeedfix; _roomService.Edit(room); MysqlFetchingRoomData.SetFixStatus(room.RoomNum, room.IsNeedfix); return(RedirectToAction("getAllEquipmentsForcleaningEmp", new { Rid = Rid })); }
public ActionResult EndCleanOrder1(int id) { var cleanOrderDto = _fixOrderServices.GetById(id); var userdto = _userService.GetById(new Guid(User.Identity.GetUserId())); userdto.IsBusy = false; _userService.Edit(userdto, new Guid(User.Identity.GetUserId())); cleanOrderDto.enddate = DateTimeHelper.ConvertDateToString(Utils.ServerNow.Date, DateFormats.DD_MM_YYYY) + " " + DateTimeHelper.ConvertTimeToString(Utils.ServerNow.TimeOfDay, TimeFormats.HH_MM_AM); cleanOrderDto.isFinished = true; _fixOrderServices.edit(cleanOrderDto); var rom = _roomService.GetById(Convert.ToInt32(cleanOrderDto.Room_ID)); rom.IsNeedfix = false; rom.Isrequistedfix = false; _roomService.Edit(rom); MysqlFetchingRoomData.SetFixStatus(rom.RoomNum, rom.IsNeedfix); return(RedirectToAction("Check", "Equipment", rom.Id)); }