예제 #1
0
 private void buttonDel_Click(object sender, EventArgs e)
 {
     if (dataGridView.SelectedRows.Count == 1)
     {
         if (MessageBox.Show("Удалить запись", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells[0].Value);
             try
             {
                 Bank.Delete(new BankBindingModel {
                     Id = id
                 });
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             LoadData();
         }
     }
 }
예제 #2
0
 public static bool Delete(int bankId)
 {
     return(dal.Delete(bankId));
 }
예제 #3
0
파일: BBank.cs 프로젝트: seezeef/YS_ERP
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(string CODE)
 {
     return(dal.Delete(CODE));
 }