Ejemplo n.º 1
0
        public ActionResult AddRoom(RoomDto dto, int hid, int tid)
        {
            dto.RoomType_id   = tid;
            dto.HotelBlock_id = hid;
            // if()
            int        i          = _roomService.Add(dto);
            roomrecDto roomrecDto = new roomrecDto();

            roomrecDto.Room_Id = i;
            roomrecDto.Recoed  = "تم أضافة الغرفة ";
            _RoomRecServices.Add(roomrecDto);

            return(RedirectToAction("AddEquipment", "Equipment", new { Rid = i }));
        }
Ejemplo n.º 2
0
        public ActionResult AddOrder(CleanOrderDto dto, int rid)
        {
            dto.Hoster        = Guid.Parse(User.Identity.GetUserId());
            dto.Creation_Date = DateTimeHelper.ConvertDateToString(Utils.ServerNow.Date, DateFormats.DD_MM_YYYY);
            dto.Creation_Time = DateTimeHelper.ConvertTimeToString(Utils.ServerNow.TimeOfDay, TimeFormats.HH_MM_AM);
            dto.Creation_At   = DateTimeHelper.ConvertDateToString(Utils.ServerNow.Date, DateFormats.DD_MM_YYYY) + " " + DateTimeHelper.ConvertTimeToString(Utils.ServerNow.TimeOfDay, TimeFormats.HH_MM_AM);
            dto.Room_ID       = rid;
            dto.moshId        = _fixOrderServices.getmoshbyroomId((int)rid);
            int i    = _orderService.addOrder(dto);
            var room = _RoomService.GetById(rid);

            room.Isrequisted = true;
            _RoomService.Edit(room);

            roomrecDto roomrecDto = new roomrecDto();

            roomrecDto.Room_Id = rid;
            roomrecDto.Recoed  = "  تم أضافة طلب تنظيف على الغرفة  ";
            _roomrec.Add(roomrecDto);
            //NotifictationDto dto1 = new NotifictationDto();
            //dto1.senderId = Guid.Parse(User.Identity.GetUserId());
            //dto1.RevieverId = _RoomService.getMangerIdForRoom(Convert.ToInt32( rid));
            //var roomnum = _RoomService.GetById(dto.Room_ID.Value).RoomNum;

            //var s1 = "الغرفة رقم";
            //var s2 = roomnum;
            //var s3 = " بحاجة الى ";
            //var s4 = "&";
            //var s5 = i;
            //var s6 = "تنظيف";

            //dto1.NotDateTime = DateTimeHelper.ConvertDateToString(Utils.ServerNow.Date, DateFormats.DD_MM_YYYY);
            //dto1.Room_ID = dto.Room_ID;
            //_notifictationService.Add(dto1);
            return(RedirectToAction("getAllRoom", "Room"));
        }