コード例 #1
0
 private void butUndo_Click(object sender, EventArgs e)
 {
     if (radioFinanceCharge.Checked)
     {
         if (MessageBox.Show(Lan.g(this, "Undo all finance charges for ") + textDateUndo.Text + "?", "", MessageBoxButtons.OKCancel)
             != DialogResult.OK)
         {
             return;
         }
         long rowsAffected = Adjustments.UndoFinanceCharges(PIn.Date(textDateUndo.Text));
         MessageBox.Show(Lan.g(this, "Finance charge adjustments deleted: ") + rowsAffected.ToString());
         Ledgers.RunAging();
         SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Finance Charges undo. Date " + textDateUndo.Text);
         DialogResult = DialogResult.OK;
     }
     else if (radioBillingCharge.Checked)
     {
         if (MessageBox.Show(Lan.g(this, "Undo all billing charges for ") + textDateUndo.Text + "?", "", MessageBoxButtons.OKCancel)
             != DialogResult.OK)
         {
             return;
         }
         long rowsAffected = Adjustments.UndoBillingCharges(PIn.Date(textDateUndo.Text));
         MessageBox.Show(Lan.g(this, "Billing charge adjustments deleted: ") + rowsAffected.ToString());
         Ledgers.RunAging();
         SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Billing Charges undo. Date " + textDateUndo.Text);
         DialogResult = DialogResult.OK;
     }
 }