Esempio n. 1
0
 public virtual SquadronLog AddSquadronLog(SquadronLog squadronLog)
 {
     squadronLog.FlightLog = this;
     squadronLog.MarkedUpdated();
     SquadronLogs.Add(squadronLog);
     squadronLog.Validate();
     return squadronLog;
 }
Esempio n. 2
0
 public virtual SquadronLog AddSquadronLog(SquadronLog squadronLog)
 {
     squadronLog.FlightLog = this;
     squadronLog.MarkedUpdated();
     SquadronLogs.Add(squadronLog);
     squadronLog.Validate();
     return(squadronLog);
 }
Esempio n. 3
0
 private void WriteSquadronMember(XmlWriter writer, SquadronLog member)
 {
     writer.WriteStartElement("Member");
     writer.WriteElementString("FlyingUnit", member.FlyingUnit);
     writer.WriteElementString("Name", member.Person.FileByName());
     writer.WriteElementString("SSN", member.Person.SocialSecurityLastFour);
     writer.WriteElementString("DutyCode", member.DutyCode.ToString());
     writer.WriteElementString("Primary", member.PrimaryHours.ToString("N1"));
     writer.WriteElementString("Secondary", member.SecondaryHours.ToString("N1"));
     writer.WriteElementString("Instructor", member.InstructorHours.ToString("N1"));
     writer.WriteElementString("Evaluator", member.EvaluatorHours.ToString("N1"));
     writer.WriteElementString("Other", member.OtherHours.ToString("N1"));
     writer.WriteElementString("Sorties", member.Sorties.ToString("N1"));
     writer.WriteElementString("PrimaryNight", member.PrimaryNightHours.ToString("N1"));
     writer.WriteElementString("PrimaryInstrument", member.PrimaryInstrumentHours.ToString("N1"));
     writer.WriteElementString("SimulatedInstrument", member.SimulatedInstrumentHours.ToString("N1"));
     writer.WriteElementString("Total", member.CalculateTotalHours().ToString("N1"));
     writer.WriteEndElement();
 }
Esempio n. 4
0
 private SquadronLogViewModel CreateSquadronLogViewModel(SquadronLog squadronLog)
 {
     var viewModel = new SquadronLogViewModel();
     if (squadronLog != null)
     {
         Mapper.Map<SquadronLog, SquadronLogViewModel>(squadronLog, viewModel);
     }
     viewModel.SetAvailablePersons(Repository.GetAllActivePersons());
     viewModel.IsFlightLogManager = CurrentUser.Roles.FlightLogManager;
     return viewModel;
 }