コード例 #1
0
        private void DeleteToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            // delete
            var empId = gridResult.SelectedRows[0].Cells[1].Value.ToString();

            var emp = _lstEmployeeTotal.Where(o => o.empId.Equals(empId)).FirstOrDefault();

            if (MessageBox.Show(string.Format("이름 : {0}, 직급 : {1} \r\n 삭제하시겠습니까?", emp.empNm, emp.rank.rankName), string.Empty, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.OK)
            {
                ANBTX.Delete(API_EMPLOYEE_URL, empId);
                InitControl();
                btnSearch_Click(null, null);
            }
        }
コード例 #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         var prj = new ProjectVO()
         {
             prjId = edPrjId.Text
         };
         if (edPrjId.Text != null)
         {
             ANBTX.Delete(API_URL, prjId);
             MessageBox.Show("성공적으로 삭제되었습니다.");
         }
         else
         {
             MessageBox.Show("이미 없는 데이터 입니다.");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("An exception occurred :" + ex.ToString());
     }
 }
コード例 #3
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     // delete
     ANBTX.Delete(API_URL, textBox4.Text);
     btnRead_Click(null, null);
 }