//customer---------------------- public ActionResult TrackShippingIndex(Guid OrderID) { ShippingViewModel shippingViewModel = new ShippingViewModel(); ShippingBL shippingBL = new ShippingBL(); string shippingStatus = shippingBL.TrackShippingBL(OrderID); shippingViewModel.ShippingStatus = shippingStatus; return(View(shippingViewModel)); }
public ActionResult UpdateShipping(Guid OrderID) { bool isUpdated = false; ShippingBL shippingBL = new ShippingBL(); isUpdated = shippingBL.UpdateShippingDetailBL(OrderID); if (isUpdated) { return(RedirectToAction("ShippingIndex", "Shipping")); } else { return(Content("Shipping was not updated")); } }
//view shipping details of particular order to the customer private void ViewShippingButton_Click(object sender, RoutedEventArgs e) { try { string username = ""; //check null values if (!string.IsNullOrEmpty(txtusername.Text)) { username = txtusername.Text;//take username ShippingBL shippingBL = new ShippingBL(); grid.ItemsSource = shippingBL.GetShippingDetails(username); //show textbox message txtmsg.Text = "THANK YOU FOR SHOPPING"; } } catch (RecipeIngredientSystemExceptions ex) { MessageBox.Show(ex.Message); } }
public ActionResult ShippingIndex() { List <ShippingViewModel> shippingViewModelList = new List <ShippingViewModel>(); ShippingBL shippingBL = new ShippingBL(); List <Shipping> shippingsList = shippingBL.GetAllShipingsBL(); foreach (var shipping in shippingsList) { ShippingViewModel shipingView = new ShippingViewModel() { OrderID = shipping.OrderID, ShippingStatus = shipping.ShippingStatus }; shippingViewModelList.Add(shipingView); } //calling view and passing viewmodel object to view return(View(shippingViewModelList)); }