Пример #1
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            if (Helper.un == "root")
            {
                var table = chooseTable_comboBox.SelectedItem.ToString();

                switch (table)
                {
                case "Street":
                    AddMethods.AddStreetRecordDgv(dataGridView1, table);
                    break;

                case "Square":
                    AddMethods.AddSquareRecordDgv(dataGridView1, table);
                    break;

                case "Sight":
                    AddMethods.AddSightRecordDgv(dataGridView1, table);
                    break;

                case "Background":
                    AddMethods.AddBackgroundRecordDgv(dataGridView1, table);
                    break;

                default:
                    MessageBox.Show("Please choose a table.");
                    break;
                }
            }
            else
            {
                MessageBox.Show("No access!");
            }
        }
Пример #2
0
        private void commitButton_Click(object sender, EventArgs e) // square tab
        {
            var sqryear = sqrYearTextBox.Text + "-01-01";

            AddMethods.AddSquareRecordForm(sqrNNameTextBox.Text, sqrONameTextBox.Text, sqryear);

            sqrNNameTextBox.Clear();
            sqrONameTextBox.Clear();
            sqrYearTextBox.Clear();
        }
Пример #3
0
        private void commitSightButton_Click(object sender, EventArgs e)
        {
            var sightyear = sightYearTextBox.Text + "-01-01";

            AddMethods.AddSightRecordForm(sightNameTextBox.Text, sightyear, int.Parse(strFKTextBox.Text));

            sightNameTextBox.Clear();
            sightYearTextBox.Clear();
            strFKTextBox.Clear();
        }
Пример #4
0
        private void commitStreetButton_Click(object sender, EventArgs e)
        {
            var stryear = strYearTextBox.Text + "-01-01";

            AddMethods.AddStreetRecordForm(strNNTextBox.Text, strONTextBox.Text, stryear);

            strNNTextBox.Clear();
            strONTextBox.Clear();
            strYearTextBox.Clear();
        }
Пример #5
0
        private void backgroundCommitButton_Click(object sender, EventArgs e)
        {
            var bcgryear = bcgrYearTextBox.Text + "-01-01";

            AddMethods.AddBackgroundRecordForm(bcgrSourceTextBox.Text, bcgryear, bcgrContTextBox.Text, int.Parse(sightFKTextBox.Text));

            bcgrSourceTextBox.Clear();
            bcgrYearTextBox.Clear();
            bcgrContTextBox.Clear();
            sightFKTextBox.Clear();
        }