public void AddGuestRequest(GuestRequest My_GuestRequest) { //נקודה 1 int days = (My_GuestRequest.ReleaseDate - My_GuestRequest.EntryDate).Days; if (days < 1) { throw new NotImplementedException("תאריך הכניסה שהכנסת אינו תקין בבקשה הכנס תאריך חדש"); } dal.AddGuestRequest(My_GuestRequest); //List_of_available_units(My_GuestRequest.EntryDate, days); }
public void AddGuestRequestB(GuestRequest T)//הוספת יחידת לקוח { DAL.IDAL dal = DAL.FactoryDal.GetDal(); try { CheckSumDay(T); CheackMail(T.MailAddress); CheackNumOfPeople(T.Adults + T.Children); AvailableUnit(T.EntryDate, (T.ReleaseDate - T.EntryDate).Days); dal.AddGuestRequest(T); } catch (Exception b) { throw b; } }
//IDAL //------------------------------------------------------------------------- public void AddGuestRequestB(GuestRequest T) { DAL.IDAL dal = DAL.FactoryDal.GetDal(); try { CheckSumDay(T); CheackMail(T.MailAddress); CheackNumOfPeople(T.Adults + T.Children); AvailableUnit(T.EntryDate, (T.ReleaseDate - T.EntryDate).Days); } catch (KeyNotFoundException ex) { throw ex; } catch (FormatException a) { throw a; } catch (OverflowException e) { throw e; } dal.AddGuestRequest(T); }