private void AddVoyImage(string title, string URL, Voy voy) { _context.Voyimages.Add(new Voyimage { Title = title, ImageUrl = URL, Voy = voy, } ); }
public VoysViewModel ToVoyViewModel(Voy voy) { return(new VoysViewModel { Account = voy.Account, Altitude = voy.Altitude, Cargo = voy.Cargo, Cargo_Charterer = voy.Cargo_Charterer, Company_id = voy.Company.Id, Consignee = voy.Consignee, Contract = voy.Contract, Employ_id = voy.Employee.Id, Employee_list = _combosHelper.GetComboEmployees(), Id = voy.Id, Eta = voy.EtaLocal, Etb = voy.EtbLocal, Etc = voy.EtcLocal, Etd = voy.EtdLocal, Facility = voy.Facility, LastKnowPosition = voy.LastKnowPosition, Latitude = voy.Latitude, Laycan = voy.Laycan, Opinions = voy.Opinions, Owner_Charterer = voy.Owner_Charterer, Pod = voy.Pod, Pol = voy.Pol, Port_id = voy.Port.Id, Port_list = _combosHelper.GetComboPorts(), Sf = voy.Sf, Shipper = voy.Shipper, Statuses = voy.Statuses, Vessel_id = voy.Vessel.Id, Vessel_list = _combosHelper.GetComboVessels(), Voyimages = voy.Voyimages, Voy_number = voy.Voy_number, }); }
private void AddStatus(String name_status, DateTime arrival, DateTime anchored, DateTime pob, DateTime allfast, DateTime commenced, DateTime dateupdate, Voy voy) { _context.Statuses.Add(new Status { Name_status = name_status, Arrival = arrival, Anchored = anchored, Pob = pob, AllFast = allfast, Commenced = commenced, DateUpdate = dateupdate, Voy = voy, } ); }