public JsonResult DeleteRecordbyID(int id) { UserAddress obj = _IBOUsers.GetAddressById(id); if (obj == null) { _IBOUsers.DeleteRecord(id); } else { _IBOUsers.DeleteAddress(obj.address_id); _IBOUsers.DeleteRecord(id); } return(Json(new JsonSerializerSettings())); }
public IActionResult GetById(int id) { var address = _IBOUsers.GetAddressById(id); var rcrd = _IBOUsers.GetById(address.userID); var uvm = new UserViewModel() { user_id = rcrd.user_id, user_age = rcrd.user_age, user_email = rcrd.user_email, user_name = rcrd.user_name, user_phone = rcrd.user_phone, user_pwd = rcrd.user_pwd, ImagePathUvm = rcrd.user_ImagePath, //CoverPic=rcrd.CoverPic cityName = address.city_name, addID = address.address_id, }; imgURL = uvm.ImagePathUvm; return(View(uvm)); }