private void sBtnNew_ForgetCardDeposit_Click(object sender, System.EventArgs e) { if (myPOS.NCategoryID == 17) { if (myPOS.ReceiptItemsTable.Rows.Count > 0 || myPOS.POSForgetCardAction == ACMSLogic.POS.ForgetCardAction.Refund) { MessageBox.Show(this, "Only One item is allow for Forget Card Deposit per receipt."); return; } // ACMSDAL.TblReceipt sqlReceipt = new ACMSDAL.TblReceipt(); // DataTable receipttable = sqlReceipt.GetToDayForgetCardReceipt(myPOS.StrMembershipID, myPOS.NCategoryID); // // if (receipttable != null && receipttable.Rows.Count > 0) // { // MessageBox.Show(this, "You have paid the forget card deposit today."); // return; // } ACMSDAL.TblCompany comp = new ACMSDAL.TblCompany(); DataTable compTable = comp.SelectAll(); decimal forgetCardRate = ACMS.Convert.ToDecimal(compTable.Rows[0]["mForgetCardRate"]); myPOS.NewReceiptEntry(myPOS.StrMembershipID, -1, "Forget Card", 1, forgetCardRate, myPOS.StrMembershipID); myPOS.POSForgetCardAction = ACMSLogic.POS.ForgetCardAction.ForgetCard; this.Close(); } }