public ActionResult Index() { search osearch = new search(); osearch.roleID = 2; osearch.cityId = 0; osearch.countryId = 0; osearch.stateId = 0; ViewBag.userId = new SelectList(_IaccountServices.getFilteredUsers(osearch).Select(e => new { e.userId, e.fullName }), "userId", "fullName"); ViewBag.productCategoryId = new SelectList(_IsettingServices.GetAllProductCategories(1).Select(e => new { e.productCategoryId, e.name }), "productCategoryId", "name"); ViewBag.productSubCategoryId = new SelectList(_IProductServices.getProductSubcategoriesByProductCategoryId(1).Select(e => new { e.productSubCategoryId, e.name }), "productSubCategoryId", "name"); return(View()); }
public ActionResult Partial_SearchUsersReult(int roleID, string countryId, string stateId, string cityId, string userName, string fullName, string zipcode) { search osearch = new search(); osearch.roleID = roleID; osearch.countryId = countryId == "" ? 0 : Convert.ToInt32(countryId); osearch.stateId = stateId == ""?0:Convert.ToInt32(stateId); osearch.cityId = cityId == "" ? 0 : Convert.ToInt32(cityId); osearch.userName = userName; osearch.fullName = fullName; osearch.zipcode = zipcode; var result = _IAccountServices.getFilteredUsers(osearch); return(PartialView("Partial_SearchUsersReult", result)); }