예제 #1
0
        private void removeButton_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("削除しますか?", "確認", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                NpgsqlConnection     conn = new NpgsqlConnection();
                NpgsqlDataAdapter    adapter;
                NpgsqlCommandBuilder builder;


                conn.ConnectionString = @"Server = 192.168.152.43; Port = 5432; User Id = postgres; Password = postgres; Database = master;"; //変更予定

                string sql_str = "delete from main_category_m where main_category_code = " + mainCode + "";
                conn.Open();

                adapter = new NpgsqlDataAdapter(sql_str, conn);
                builder = new NpgsqlCommandBuilder(adapter);
                adapter.Fill(dt);
                adapter.Update(dt);
                MessageBox.Show("削除完了");

                conn.Close();


                MainCategoryMaster mainCategory = new MainCategoryMaster(master);
                this.Close();
                master.Show();
            }
            else
            {
            }
        }
예제 #2
0
        private void MasterMainte_Click(object sender, EventArgs e)//権限によって
        {
            if (access_auth == "A")
            {
                MasterMaintenanceMenu masterMenu = new MasterMaintenanceMenu(this);

                this.Hide();
                masterMenu.Show();
            }
            else
            {
                MasterMaintenanceMenu_BC masterMenuBC = new MasterMaintenanceMenu_BC(this);

                this.Hide();
                masterMenuBC.Show();
            }
        }
 private void returnButtonClick(object sender, EventArgs e)
 {
     this.Close();
     master.Show();
 }
예제 #4
0
 private void ReturnButton_Click(object sender, EventArgs e)
 {
     this.Close();
     masterMenu.Show();
 }