Exemplo n.º 1
0
        /// <summary>
        ///     添加(必须实装)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var faultageInfoEnteringForm = new FaultageInfoEntering();
            var result = faultageInfoEnteringForm.ShowDialog();

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

            if (faultageInfoEnteringForm.ShowDialog() == DialogResult.OK)
            {
                RefreshData();
            }
        }