Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            DicTypeOptForm form = new DicTypeOptForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                btnSearch_Click(null, null);
            }
        }
Exemplo n.º 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;
         }
         ConstantType   entity = CGridHelper.GetCurrentData <ConstantType>(dgv);
         DicTypeOptForm form   = new DicTypeOptForm(entity);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             btnSearch_Click(null, null);
         }
     }
     catch (Exception ex)
     {
         FrmTips.ShowTipsError(AppHelper.MainForm, "修改异常!" + ex.Message, ContentAlignment.MiddleCenter, 3000);
     }
 }