private void buttonRegister_Click(object sender, EventArgs e) { HumanResource hr = GetHumanResource(); if (null == hr) { return; } //社員がいたら更新 state.Register(hr, connection); state = new Default(this); state.EnableControl(); }
private void buttonDelete_Click(object sender, EventArgs e) { //削除時に不正チェックをする必要はない。 //HumanResource hr = GetHumanResource(); //if (null == hr) return; HumanResource hr = new HumanResource(this.textBox社員番号.Text, "", "", ""); var yesno = MessageBox.Show("削除してよろしいですか", "削除確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (yesno != DialogResult.Yes) { return; } state.Delete(hr, connection); state = new Default(this); state.EnableControl(); }