Example #1
0
        public PartialViewResult _HtmlSelectBoxWard(string DistrictID, string Selected)
        {
            var result = locationService.GetLstWardByDistrictId(DistrictID).Select(x => new SelectItemBase {
                Id = x.id, Name = x.WardName
            }).ToList();

            ViewBag.Selected = Selected;
            return(PartialView(result));
        }
Example #2
0
        public ContentResult GetWard(string wardID, string DistrictID)
        {
            var    result = locationService.GetLstWardByDistrictId(DistrictID).FirstOrDefault(x => x.id == wardID);
            string name   = result != null ? result.WardName : "";

            return(Content(name));
        }