Beispiel #1
0
        private void button3_Click(object sender, EventArgs e) //생성자를 이용한 객체 전달
        {
            ChangeBranchInfo branch = new ChangeBranchInfo(this);

            branch.BranchName = DB.BranchName;
            branch.Address    = DB.BrachAddress;
            branch.Ceo        = DB.CeoName;
            branch.ShowDialog();
        }
Beispiel #2
0
 public void ChangeBranchInfo(ChangeBranchInfo branch)
 {
     DS.Clear();
     adapter.SelectCommand = new OracleCommand("select * from branch where id='" + branch_id + "'", conn);
     adapter.Fill(DS, "Branch");
     DS.Tables["Branch"].Rows[0]["name"]     = branch.BranchName;
     DS.Tables["Branch"].Rows[0]["address"]  = branch.Address;
     DS.Tables["Branch"].Rows[0]["ceo_name"] = branch.Ceo;
     BranchName     = branch.BranchName;
     branch_address = branch.Address;
     ceo_name       = branch.Ceo;
     adapter.Update(DS, "Branch");
     DS.AcceptChanges();
 }