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