public void LoadData() { solutionLocationList = SolutionLocationComponent.GetSolutionLocationsPerSolution(solutionId).ToList(); locationRepeater.DataSource = solutionLocationList; locationRepeater.EditIndex = -1; locationRepeater.DataBind(); }
protected void locationRepeater_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DELETE") { SolutionLocationComponent sol = new SolutionLocationComponent(new Guid(e.CommandArgument.ToString())); if (sol.SolutionLocation.SolutionLocationId != Guid.Empty) { sol.Delete(); } } LoadData(); }
public static List <SolutioLocationJson> GetSolutionLocations(Guid solutionId) { List <SolutioLocationJson> return_ = new List <SolutioLocationJson>(); var solutionLocationSource = SolutionLocationComponent.GetSolutionLocationsPerSolution(solutionId).ToList(); foreach (var solLoc in solutionLocationSource) { return_.Add(new SolutioLocationJson() { City = MIFWebServices.LocationService.GetCityName(solLoc.City), Region = MIFWebServices.LocationService.GetStateName(solLoc.Region), Country = MIFWebServices.LocationService.GetCountryName(solLoc.Country), Latitude = solLoc.Latitude.GetValueOrDefault(0), Longitude = solLoc.Longitude.GetValueOrDefault(0) }); } return(return_); }
protected void btnAddToList_Click(object sender, EventArgs e) { try { if (CountryStateCity1.SelectedCountry != string.Empty) { SolutionLocationComponent location = new SolutionLocationComponent(solutionId, CountryStateCity1.SelectedCountry, CountryStateCity1.SelectedState, CountryStateCity1.SelectedCity); int dd = location.Save(); LoadData(); } } catch (Exception ee) { { } throw; } }