private void btnAdd_Click(object sender, EventArgs e)
        {
            ChargeDefineOptForm form = new ChargeDefineOptForm();

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