public JsonResult GetProvinceLists() { //var sa = new JsonSerializerSettings(); var list = _IBOCountry.GetProvinceLists(); List <ProvinceVM> objList = new List <ProvinceVM>(); foreach (var item in list) { var pvm = new ProvinceVM() { countryId = item.countryId, provinceId = item.provinceId, provinceName = item.provinceName }; objList.Add(pvm); } return(Json(objList, new JsonSerializerSettings())); }
public JsonResult GetMasterbyId(int id) { var countryList = _IBOCountry.GetCountryLists(); var provinceList = _IBOCountry.GetProvinceLists(); var rcrd = _IBOUsers.GetMasterById(id); var uvm = new NewUserVM() { userId = rcrd.userId, userName = rcrd.userName, userEmail = rcrd.userEmail, userPwd = rcrd.userPwd, userPhone = rcrd.userPhone, userCountry = rcrd.countryId, countryName = (from name in countryList where name.countryId == rcrd.countryId select name.countryName ).FirstOrDefault(), uskillIds = rcrd.skillIds, }; return(Json(uvm, new JsonSerializerSettings())); }