/// <summary> /// הוספת בקשת לקוח /// </summary> /// <param name="guestRequest"></param> public void AddRequest(GuestRequest guestRequest) { //string[] dateIn = guestRequest.EntryDate.Split('/'); //string[] dateOut = guestRequest.ReleaseDate.Split('/'); //if ((ConveryDateStrToDateTime(guestRequest.ReleaseDate) - ConveryDateStrToDateTime(guestRequest.EntryDate)).Days < 1) //int.Parse(dateOut[2] + dateOut[1] + dateOut[0]) <= int.Parse(dateIn[2] + dateIn[1] + dateIn[0])) if ((guestRequest.ReleaseDate - guestRequest.EntryDate).Days < 1) { throw new ExceptionMessage("DATE END ERALIER THAN DATE START"); } if (dal.IsRequestExit(guestRequest)) { throw new ExceptionMessage("REQUEST IS ALREADY EXISTS"); } guestRequest.GuestRequestKey = dal.AddRequest(guestRequest); CreateOrder(guestRequest); }