Exemplo n.º 1
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;
         }
         User        entity = CGridHelper.GetCurrentData <User>(dgv);
         UserOptForm form   = new UserOptForm(entity);
         form.ShowDialog();
     }
     catch (Exception ex)
     {
         FrmTips.ShowTipsError(AppHelper.MainForm, "修改异常!" + ex.Message, ContentAlignment.MiddleCenter, 3000);
     }
 }
Exemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            UserOptForm form = new UserOptForm();

            form.ShowDialog(this);
        }