/// <summary> /// The cash paid out form closing handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void fiCashPaidOut_FormClosing(object sender, FormClosingEventArgs e) { bOtherFormOpen = false; string sCode = fiCashPaidOut.sGetDataToReturn(); if (sCode != "CANCELLED") { tEngine.OpenTillDrawer(false); tEngine.PayCashOut(sCode); this.Close(); } }
/// <summary> /// Occurs when the user has selected the payment method to receive money on /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void fpiGetPaymentMethod_FormClosing(object sender, FormClosingEventArgs e) { sPaymentMethod = fpiGetPaymentMethod.GetPaymentMethod(); if (sPaymentMethod == "DEPO") { MessageBox.Show("Sorry, you can't receive money on deposit paid."); } if (sPaymentMethod != "NULL" && sPaymentMethod != "DEPO") { tEngine.ReceiveMoneyOnAccount(sAccountCodeToReceive, fAmountToReceive, sPaymentMethod); tEngine.OpenTillDrawer(false); tEngine.PrintReceivedOnAccount(sAccountCodeToReceive, fAmountToReceive, sPaymentMethod); MessageBox.Show("Money successfully received."); } else { MessageBox.Show("Cancelled Receive on Account"); } this.Close(); }