Exemple #1
0
 public void LoadData()
 {
     solutionLocationList        = SolutionLocationComponent.GetSolutionLocationsPerSolution(solutionId).ToList();
     locationRepeater.DataSource = solutionLocationList;
     locationRepeater.EditIndex  = -1;
     locationRepeater.DataBind();
 }
Exemple #2
0
    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();
    }
Exemple #3
0
        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_);
        }
Exemple #4
0
 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;
     }
 }