Example #1
0
 void fasGetAccountCode_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
 {
     sAccountCodeToReceive = fasGetAccountCode.sGetAccountCode();
     if (sAccountCodeToReceive != "NONE_SELECTED")
     {
         string[] sExtraInfo = { tEngine.sGetAccountDetailsFromCode(sAccountCodeToReceive)[2].TrimEnd('\0').TrimEnd(' ') };
         fiGetAmount = new frmInput(frmInput.FormType.ReceivedOnAccount, pLocation, new Size(sSize.Width, 75), sExtraInfo);
         fiGetAmount.Show();
         fiGetAmount.FormClosing += new FormClosingEventHandler(fiGetAmount_FormClosing);
     }
 }
Example #2
0
        void fasGetAccountToRefund_FormClosing(object sender, FormClosingEventArgs e)
        {
            string sCompanyToCharge = fasGetAccountToRefund.sGetAccountCode();

            sPaymentMethod = "CHRG," + sCompanyToCharge.TrimEnd(' ');
            if (MessageBox.Show("Complete refund with Charge To Account?", "Charge To Account Refund", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                if (sBarcodeToRefund != "$GENERAL_REFUND")
                {
                    tEngine.RefundItem(sBarcodeToRefund, fAmountToRefund, nQuantityToRefund, sPaymentMethod);
                }
                else
                {
                    tEngine.RefundGeneral(fAmountToRefund, sPaymentMethod);
                }
                this.Close();
            }
            else
            {
                MessageBox.Show("Refund cancelled.");
                this.Close();
            }
        }