private IBLLActionResult ValidateCustomer(Customer c) { var result = new BLLActionResult(); if (c == null) { result.AddError("Nie podano danych gościa."); } else { if (c.FirstName == "") { result.AddError("Nie podano Imienia."); } if (c.LastName == "") { result.AddError("Nie podano Nazwiska."); } if (c.Email == "") { result.AddError("Nie podano Emaila."); } if (c.Phone == "") { result.AddError("Nie podano Telefonu."); } } return(result); }
private IBLLActionResult ValidateReservation(Reservation r) { var result = new BLLActionResult(); if (r.FromDate >= r.ToDate) { result.AddError("Niepoprawne daty."); } return(result); }