// ustawia numer labela w zaleznosci od wybranej godziny public string SetLabelNumber(string timeofAppointment) { HourOfAppointment hourOfAppointment = new HourOfAppointment(); var output = hourOfAppointment.GetAppointmentHourKey(timeofAppointment); return(output.ToString()); }
public string GetTimeFromLabel(string labelName) { HourOfAppointment hourOfAppointment = new HourOfAppointment(); string[] namePartial = labelName.Split('_'); int.TryParse(namePartial[1], out int output); return(hourOfAppointment.GetAppointmentHourValue(output)); }
public int CalculateTimeToEndOfWork(string appointmentTime) { int output; int foundKey = 0; HourOfAppointment hourOfAppointment = new HourOfAppointment(); foreach (KeyValuePair <int, string> item in hourOfAppointment.GetAvailableHoursOfAppointmentCollection().Where(a => a.Value == appointmentTime)) { foundKey = item.Key; } output = maxTimeOfWorkInMinutes - (foundKey * 30); return(output); }