private void button1_Click(object sender, EventArgs e)
        {
            Attraction a;
            if (attr.vid == 0)
            {
                a = new Attraction();
            }
            else {
                a = attr;
            }
            AttractionType attractiontype = comboBox1.SelectedIndex == (int)AttractionType.Viewport ? AttractionType.Viewport : comboBox1.SelectedIndex == (int)AttractionType.Vechicle ? AttractionType.Vechicle : comboBox1.SelectedIndex == (int)AttractionType.Nature ? AttractionType.Nature : AttractionType.Building;

            a.SetName(textBoxNameAttraction.Text);
            a.SetLongitude(float.Parse(textBoxLongitudeAttraction.Text));
            a.SetLatitude(float.Parse(textBoxLatiudeAttraction.Text));
            a.vtype = attractiontype;

            TripsService.AppFiles.Database.DbService.Update<Attraction>(a);
        }
Beispiel #2
0
 public virtual void SetAtractions(Attraction atractions)
 {
     this.atraction = atractions.vid;
 }
Beispiel #3
0
 public void SetAtractions(Attraction[] atractions)
 {
     this.atractions = atractions;
 }
Beispiel #4
0
 public void SetAtractions(Attraction[] atractions)
 {
     throw new System.Exception("Not implemented");
 }
Beispiel #5
0
 public virtual void SetAtractions(Attraction atractions)
 {
     this.atraction = atractions.vid;
 }
 public AttractionEdiorForm(Attraction attr)
 {
     // TODO: Complete member initialization
     this.attr = attr;
     InitializeComponent();
 }
Beispiel #7
0
 public AttractionEdiorForm(Attraction attr)
 {
     // TODO: Complete member initialization
     this.attr = attr;
     InitializeComponent();
 }