public Add_DeliverMan_UserCntrl(LogIn_AdministratorViewModel logIn_AdministratorVM) { deliveyMan_MV = new DeliveryManViewModel(logIn_AdministratorVM); this.DataContext = deliveyMan_MV; InitializeComponent(); CmbBx_City.ItemsSource = deliveyMan_MV.cities; CmbBx_Street.IsEnabled = false; }
public Add_DeliverMan_UserCntrl(DeliveryMan deliveryMan) { deliveyMan_MV = new DeliveryManViewModel(deliveryMan); this.DataContext = deliveyMan_MV; InitializeComponent(); CmbBx_City.ItemsSource = deliveyMan_MV.cities; CmbBx_Street.IsEnabled = false; }
public ActionResult View_Delivery_Man() { if (Session["userId"] == null) { return(RedirectToAction("Index", "UserHome")); } DeliveryManViewModel D = new DeliveryManViewModel(); D.members = _MemberService.GetAll(); D.Invoices = _InvoiceService.GetAll(); D.DeliveryMan = _DeliveryManService.GetAll(); D.MemberCount = _DeliveryManService.GetAll().Count(); D.ReportCount = _ReportService.GetByUnseenStatus().Count(); return(View(D)); }
public ActionResult View_Delivery_Man(string searching, string Searchby) { if (Session["userId"] == null) { return(RedirectToAction("Index", "UserHome")); } DeliveryManViewModel D = new DeliveryManViewModel(); if (Searchby == "Name") { D.members = _MemberService.GetByName(searching); } else if (Searchby == "Email") { D.members = _MemberService.GetByEmail(searching); } else if (Searchby == "Type") { D.members = _MemberService.GetByType(searching); } else { D.members = _MemberService.GetAll(); } D.Invoices = _InvoiceService.GetAll(); D.DeliveryMan = _DeliveryManService.GetAll(); int Count = 0; foreach (var item in D.members) { if (item.Type == "2") { Count++; } } D.MemberCount = Count; D.ReportCount = _ReportService.GetByUnseenStatus().Count(); return(View(D)); }
public AddDeliveryManCommand(DeliveryManViewModel myDeliveryManVM) { this.DeliveryMan_VM = myDeliveryManVM; }