예제 #1
0
        private void newStation_Click(object sender, EventArgs e)
        {
            NovaStanica ft = new NovaStanica();

            ft.ShowDialog();
            if (ft.st != null)
            {
                StationModel.InsertStation(ft.st);

                setStations();
            }
        }
예제 #2
0
        private void editStation_Click(object sender, EventArgs e)
        {
            if (dataGridView1.DataSource == null)
            {
                return;
            }

            NovaStanica st = new NovaStanica(dataGridView1.SelectedRows[0].DataBoundItem as Station);

            st.ShowDialog();

            setStations();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            NovaStanica ft = new NovaStanica();

            ft.ShowDialog();
            if (ft.st != null)
            {
                station = ft.st;
                station = StationModel.InsertStation(ft.st);

                var sta = StationModel.NotInRouteStations(route != null ? route.Id.ToString() : null);
                listBox1.Items.Clear();
                listBox1.Items.AddRange(sta.ToArray());
            }
        }