private ShippingInfo CollectShippingInfo() { ShippingInfo shippingInfo = new ShippingInfo(); shippingInfo.ContactPerson = txtContact.Text.Trim(); shippingInfo.ContactPhone = txtPhone.Text.Trim(); shippingInfo.Address = txtAddress.Text.Trim(); shippingInfo.ZipCode = txtZipCode.Text.Trim(); shippingInfo.Notes = txtNotes.Text.Trim(); shippingInfo.Email = txtEmail.Text.Trim(); if (deShipByTime.SelectedDate.HasValue) { shippingInfo.TimeShipBy = deShipByTime.SelectedDate.Value; } return(shippingInfo); }
private void UpdateOrders() { ShippingInfo shippingInfo = CollectShippingInfo(); foreach (OrderInfoDto order in Orders) { order.ShipTo.ContactPhone = shippingInfo.ContactPhone; order.ShipTo.ContactPerson = shippingInfo.ContactPerson; order.ShipTo.AddressLine1 = shippingInfo.Address; order.ShipTo.ZipCode = shippingInfo.ZipCode; order.TimeShipBy = shippingInfo.TimeShipBy; order.Notes = shippingInfo.Notes; order.NotificationEmail = shippingInfo.Email; } LoadOrderPreview(); }