/// <summary> /// 添加(必须实装) /// </summary> /// <param name="sender"></params> /// <params name="e"></params> private void btnAdd_Click(object sender, EventArgs e) { var faultageInfoEnteringForm = new FaultageInfoEntering(); var result = faultageInfoEnteringForm.ShowDialog(); if (result == DialogResult.OK || result == DialogResult.Cancel) { RefreshData(); } }
/// <summary> /// 修改(必须实装) /// </summary> /// <params name="sender"></params> /// <params name="e"></params> private void btnUpdate_Click(object sender, EventArgs e) { if (gridView1.GetFocusedRow() == null) { Alert.AlertMsg("请选择要修改的信息"); return; } var faultageInfoEnteringForm = new FaultageInfoEntering((Faultage)gridView1.GetFocusedRow()); if (faultageInfoEnteringForm.ShowDialog() == DialogResult.OK) { RefreshData(); } }