public void OnGet() { DeliveryTypes = BuildTypes(); CustomerSelectList = _pinhuaContext.GetCustomerSelectList(); ContactsSelectList = _pinhuaContext.GetContactsSelectList(); ContactsList = _pinhuaContext.往来单位联系人.ToList(); }
public void OnGet(string Id) { DeliveryTypes = BuildTypes(); Customers = _pinhuaContext.GetCustomerSelectList(); ContactsSelectList = _pinhuaContext.GetContactsSelectList(); ContactsList = _pinhuaContext.往来单位联系人.ToList(); Order.Main = _mapper.Map <Gi2Main, Gi2MainDTO>(_pinhuaContext.Gi2Main.AsNoTracking().Where(p => p.DeliveryId == Id).FirstOrDefault()); Order.Details = _mapper.Map <List <Gi2Details>, List <Gi2DetaislDTO> >(_pinhuaContext.Gi2Details.AsNoTracking().Where(p => p.DeliveryId == Id).ToList()); }