Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            DicDefineOptForm form = new DicDefineOptForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                btnSearch_Click(null, null);
            }
        }
Beispiel #2
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgv.CurrentRow == null || dgv.CurrentRow.Index < 0)
         {
             FrmTips.ShowTipsError(AppHelper.MainForm, "未选中任何行!", ContentAlignment.MiddleCenter, 1000);
             return;
         }
         ConstantDefine   entity = CGridHelper.GetCurrentData <ConstantDefine>(dgv);
         DicDefineOptForm form   = new DicDefineOptForm(entity);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             btnSearch_Click(null, null);
         }
     }
     catch (Exception ex)
     {
         FrmTips.ShowTipsError(AppHelper.MainForm, "修改异常!" + ex.Message, ContentAlignment.MiddleCenter, 3000);
     }
 }