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);
        }
Esempio n. 2
0
 public virtual void SetAtractions(Attraction atractions)
 {
     this.atraction = atractions.vid;
 }
Esempio n. 3
0
 public void SetAtractions(Attraction[] atractions)
 {
     this.atractions = atractions;
 }
Esempio n. 4
0
 public void SetAtractions(Attraction[] atractions)
 {
     throw new System.Exception("Not implemented");
 }
Esempio n. 5
0
 public virtual void SetAtractions(Attraction atractions)
 {
     this.atraction = atractions.vid;
 }
 public AttractionEdiorForm(Attraction attr)
 {
     // TODO: Complete member initialization
     this.attr = attr;
     InitializeComponent();
 }
Esempio n. 7
0
 public AttractionEdiorForm(Attraction attr)
 {
     // TODO: Complete member initialization
     this.attr = attr;
     InitializeComponent();
 }