private void AddTechnicianClicked(object obj) { newOrder = new Order(); string name = CurrentUser.FirstName + " " + CurrentUser.LastName; newOrder.CustomerName = name; newOrder.CustomerAddress = CurrentUser.UserAddress.ToString(); newOrder.Card = CurrentUser.UserCard; newOrder.ServiceList = CartContents; newOrder.Total = string.Concat("$", Convert.ToString(Total)); SelectTechnicianVM SelectTechnicianVM = new SelectTechnicianVM(this, newOrder, CurrentUser); SelectTechnician tech = new SelectTechnician(newOrder); tech.DataContext = SelectTechnicianVM; tech.ShowDialog(); }
private void AddtoCart(object sender, RoutedEventArgs e) { List <Service> serviceList = new List <Service>(); Order newOrder = new Order(); int total = 0; foreach (Service item in List_view.SelectedItems) { serviceList.Add(item); total += int.Parse(item.Service_Cost); //MessageBox.Show(item.ToString()); } newOrder.ServiceList = serviceList; newOrder.Total = Convert.ToString(total); SelectTechnician tech = new SelectTechnician(newOrder); tech.ShowDialog(); }