예제 #1
0
		private void regist_btn_Click(object sender, EventArgs e) {
			OSControl osc = new OSControl();
			Register frmReg = new Register(_db);
			DialogResult dr = frmReg.ShowDialog();
			if (dr == DialogResult.OK) {
				osc.MakeUserDir(_db.CheckLastId());
				RefreshDGV();
				//一番下の行を選択状態
				SelectRow(dataGridView1.Rows.Count - 1);
			}
			frmReg.Dispose();
		}
예제 #2
0
		private void edit_btn_Click(object sender, EventArgs e) {
            if (dataGridView1.Rows.Count > 0) {
                string id = (string)dataGridView1.CurrentRow.Cells[0].Value;
                Register frmReg = new Register(_db, _db.GetData(int.Parse(id)));
                DialogResult dr = frmReg.ShowDialog();
                if (dr == DialogResult.OK) {
                    RefreshDGV();
                }
                frmReg.Dispose();
            }
		}