private void btnDelete_Click(object sender, EventArgs e) { try { if (!vOpenMode) { return; } if (!Message.ConfrmDelMsg()) { return; } objDAL.DeleteRecord(Int64.Parse(txtID.Text)); //Delete Account var AccDAL = new DAL.AccountChart(); AccDAL.connectionstring = objDAL.connectionstring; AccDAL.DeleteRecord(txtID.Tag.ToString()); Message.ShowMessage(MyMessages.MessageType.DeleteRecord); LoadGrid(); btnClear_Click(sender, e); } catch (Exception exc) { Message.ShowMessage(MyMessages.MessageType.Error, exc.Message); } }
private void btnDelete_Click(object sender, EventArgs e) { try { if (!vOpenMode) { return; } if (!Message.ConfrmDelMsg()) { return; } //Delete Account objDAL.DeleteRecord(txtAccountID.Text); Message.ShowMessage(MyMessages.MessageType.DeleteRecord); LoadGrid(); btnClear_Click(sender, e); } catch (Exception exc) { MessageBox.Show(exc.Message.ToString(), "Error"); } }
private void cmdDelete_Click(object sender, RoutedEventArgs e) { try { if (!vOpenMode) return; //if (!MessageBox.ConfrmDelMsg()) return; objDAL.DeleteRecord(Int64.Parse(txtId.Text)); //Delete Account var AccDAL = new DAL.AccountChart(); AccDAL.connectionstring = objDAL.connectionstring; AccDAL.DeleteRecord(txtId.Tag.ToString()); MessageBox.Show("Record Deleted"); //LoadGrid(); cmdClear_Click(sender, e); } catch (Exception exc) { MessageBox.Show("Error", exc.Message); } }