/// <summary> /// 修改按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnModify_Click(object sender, EventArgs e) { if (dgvInfos.SelectedRows.Count > 0) { object id = dgvInfos.SelectedRows[0].Cells["id"].Value; if (id != null) { FrmAccountInfo frmAccountInfo = new FrmAccountInfo(id.ToString(), AfterEditFunc); frmAccountInfo.ShowDialog(); } } }
private void dgvInfos_MouseDoubleClick(object sender, MouseEventArgs e) { object id = dgvInfos.SelectedRows[0].Cells["id"].Value; if (id != null) { FrmAccountInfo frmAccountInfo = new FrmAccountInfo(id.ToString(), AfterEditFunc); frmAccountInfo.ShowDialog(); } }
public void SaveAccountInfo(string title, string pw) { FrmAccountInfo frmAccountInfo = new FrmAccountInfo(title, pw, AfterEditFunc); frmAccountInfo.ShowDialog(); }
/// <summary> /// 新建按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNew_Click(object sender, EventArgs e) { FrmAccountInfo frmAccountInfo = new FrmAccountInfo("", AfterEditFunc); frmAccountInfo.ShowDialog(); }