コード例 #1
0
 private void BtnAdd_Click(object sender, EventArgs e)
 {
     using (frmPostWallMessageAction frm = new frmPostWallMessageAction(AppConfigAction.Add))
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             //TODO
             gv_postwallmessages.Rows.Add(frm.Result.Message);
         }
     }
 }
コード例 #2
0
 private void BtnEdit_Click(object sender, EventArgs e)
 {
     if (gv_postwallmessages.SelectedRows.Count > 0)
     {
         using (frmPostWallMessageAction frm = new frmPostWallMessageAction(AppConfigAction.Edit, new PostWallMessage()
         {
             Message = gv_postwallmessages.SelectedRows[0].Cells["message"].Value.ToString()
         }))
         {
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 //TODO
                 gv_postwallmessages.SelectedRows[0].Cells["message"].Value = frm.Result.Message;
             }
         }
     }
     else
     {
         Until.ShowErrorBox("Please choose data first");
     }
 }