Example #1
0
        public ContentResult GetCity(string cityID)
        {
            var    result = locationService.GetLstStateOfCountry((int)UsExpress.Transport.Lib.Business.Common.CountrySupport.VietNam).FirstOrDefault(x => x.Id == cityID);
            string name   = result != null ? result.Name : "";

            return(Content(name));
        }
Example #2
0
        public PartialViewResult _HtmlSelectBoxCity(string Selected)
        {
            var result = locationService.GetLstStateOfCountry((int)CountrySupport.VietNam).Select(x => new SelectItemBase {
                Id = x.Id, Name = x.Name, AttributeId = x.AirPort ?? 0
            }).ToList();

            ViewBag.Selected = Selected;
            return(PartialView(result));
        }
Example #3
0
 public ActionResult CreateOrder()
 {
     //OrderModel od = new OrderModel();
     //od.Code = od.GenOrderCode("AM");
     //od.CreateDate = DateTime.Now;
     //ViewBag.OrderDetail = od;
     ViewBag.Category = _categoryService.GetAllCategory(1, 9999, null).Select(x => new CategoryModel {
         Id = x.id, Name = x.CategoryName, Code = x.Code
     }).ToList();
     ViewBag.CitySender = _locationService.GetLstStateOfCountry((int)CountrySupport.USA).Select(x => new SelectItemBase {
         Id = x.Id, Name = x.Name
     }).ToList();
     ViewBag.CityRecipient = _locationService.GetLstStateOfCountry((int)CountrySupport.VietNam).Select(x => new SelectItemBase {
         Id = x.Id, Name = x.Name, AttributeId = x.AirPort ?? 0
     }).ToList();
     return(View());
 }