Ejemplo n.º 1
0
		private void CreditCardDeclareAsSuspended()
		{
			if (mboIsInTransaction)
			{
				MessageBox.Show("Sorry you cannot deaclare a Credit Card as lost while there is an ongoing transaction. Please finish the transaction first.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return;
			}

			DialogResult loginresult = GetWriteAccessAndLogin(mclsSalesTransactionDetails.CashierID, AccessTypes.CreditCardChange, "Credit Card Declaration as Lost");

            if (loginresult == DialogResult.OK)
			{
				try
				{
					DialogResult result; Data.ContactDetails clsContactDetails;
					ContactSelectWnd clsContactWnd = new ContactSelectWnd();
                    clsContactWnd.EnableContactAddUpdate = GetWriteAccess(mclsSalesTransactionDetails.CashierID, AccessTypes.Contacts) == System.Windows.Forms.DialogResult.OK;
                    clsContactWnd.SysConfigDetails = mclsSysConfigDetails;
                    clsContactWnd.TerminalDetails = mclsTerminalDetails;
					clsContactWnd.ContactGroupCategory = AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER;
                    clsContactWnd.Header = "Please select customer for credit card suspension.";
					clsContactWnd.ShowDialog(this);
					clsContactDetails = clsContactWnd.Details;
					result = clsContactWnd.Result;
					clsContactWnd.Close();
					clsContactWnd.Dispose();

					if (result != DialogResult.OK)
					{ return; }

					if (clsContactDetails.ContactID == Constants.ZERO || clsContactDetails.ContactID == Constants.C_RETAILPLUS_CUSTOMERID)
					{ return; }

					clsEvent.AddEvent("[" + lblCashier.Text + "] Declaring credit card as suspended.");

                    Data.Contacts clsContact = new Data.Contacts(mConnection, mTransaction);
                    mConnection = clsContact.Connection; mTransaction = clsContact.Transaction;

					clsContactDetails = clsContact.Details(clsContactDetails.ContactID);
                    Data.ContactDetails clsGuarantor = clsContact.Details(clsContactDetails.CreditDetails.GuarantorID);

					clsContact.CommitAndDispose();

					if (clsContactDetails.CreditDetails.CreditCardNo == string.Empty || clsContactDetails.CreditDetails.CreditCardNo == null)
					{
						clsEvent.AddEventLn("Cancelled!");
						clsEvent.AddEventLn(clsContactDetails.ContactName + " has no valid Credit Card yet. ");
						MessageBox.Show(clsContactDetails.ContactName + " has no valid Credit Card yet. Please select another customer.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}

					ContactCreditWnd clsContactCreditWnd = new ContactCreditWnd();
					clsContactCreditWnd.Header = "Credit Card Suspension";
                    clsContactCreditWnd.CardTypeDetails = clsContactDetails.CreditDetails.CardTypeDetails;
					clsContactCreditWnd.Guarantor = clsGuarantor;
					clsContactCreditWnd.ContactDetails = clsContactDetails;
					clsContactCreditWnd.CreditCardStatus = CreditCardStatus.Suspended;
                    clsContactCreditWnd.TerminalDetails = mclsTerminalDetails;
					clsContactCreditWnd.ShowDialog(this);
					result = clsContactCreditWnd.Result;
					clsContactDetails = clsContactCreditWnd.ContactDetails;
					clsContactCreditWnd.Close();
					clsContactCreditWnd.Dispose();

					if (result == DialogResult.OK)
					{
                        MessageBox.Show("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " has been SUSPENDED.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Information);

						clsEvent.AddEventLn("Done!", true);
                        clsEvent.AddEventLn("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " has been SUSPENDED.", true);
						this.LoadOptions();
					}
					else { clsEvent.AddEventLn("Cancelled!"); }
				}
				catch (Exception ex)
				{ 
                    InsertErrorLogToFile(ex, "ERROR!!! Declaring internal credit card as lost."); 
                }
				Cursor.Current = Cursors.Default;
			}
		}
Ejemplo n.º 2
0
		private void IssueCreditCard()
		{
			if (mboIsInTransaction)
			{
				MessageBox.Show("Sorry you cannot issue a Credit Card while there is an ongoing transaction. Please finish the transaction first.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return;
			}

			DialogResult loginresult = GetWriteAccessAndLogin(mclsSalesTransactionDetails.CashierID, AccessTypes.CreditCardIssuance);

			if (loginresult == DialogResult.OK)
			{
				try
				{
					DialogResult result;
                    Data.CardTypeDetails clsCardTypeDetails = new Data.CardTypeDetails();
                    Data.ContactDetails clsGuarantorDetails = new AceSoft.RetailPlus.Data.ContactDetails();
                    ContactCreditTypeSelectWnd clsContactCreditTypeSelectWnd = new ContactCreditTypeSelectWnd();
                    clsContactCreditTypeSelectWnd.TerminalDetails = mclsTerminalDetails;
                    clsContactCreditTypeSelectWnd.ShowDialog(this);
                    clsCardTypeDetails = clsContactCreditTypeSelectWnd.CardTypeDetails;
                    result = clsContactCreditTypeSelectWnd.Result;
                    clsContactCreditTypeSelectWnd.Close();
                    clsContactCreditTypeSelectWnd.Dispose();

                    if (result != DialogResult.OK)
                    { return; }

					Data.ContactDetails clsContactDetails;
					ContactSelectWnd clsContactWnd = new ContactSelectWnd();
                    clsContactWnd.EnableContactAddUpdate = GetWriteAccess(mclsSalesTransactionDetails.CashierID, AccessTypes.Contacts) == System.Windows.Forms.DialogResult.OK;
                    clsContactWnd.SysConfigDetails = mclsSysConfigDetails;
                    clsContactWnd.TerminalDetails = mclsTerminalDetails;

                    if (clsCardTypeDetails.WithGuarantor)
					{
                        MessageBox.Show("Please select a GUARANTOR to issue Credit Card.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Information);

						clsContactWnd.ContactGroupCategory = AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER;
                        clsContactWnd.Header = "Select GUARANTOR to issue Credit Card.";
						clsContactWnd.ShowDialog(this);
						clsGuarantorDetails = clsContactWnd.Details;
						result = clsContactWnd.Result;
						clsContactWnd.Close();
						clsContactWnd.Dispose();
						
						if (result != DialogResult.OK)
						{ return; }

						MessageBox.Show(clsGuarantorDetails.ContactName + " has been selected as guarantor." + Environment.NewLine + "Please select the CUSTOMER to issue Credit Card.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Information);
					}
					clsContactWnd = new ContactSelectWnd();
                    clsContactWnd.EnableContactAddUpdate = GetWriteAccess(mclsSalesTransactionDetails.CashierID, AccessTypes.Contacts) == System.Windows.Forms.DialogResult.OK;
                    clsContactWnd.SysConfigDetails = mclsSysConfigDetails;
                    clsContactWnd.TerminalDetails = mclsTerminalDetails;
					clsContactWnd.ContactGroupCategory = AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER;
                    clsContactWnd.Header = "Select CUSTOMER to issue Credit Card.";
					clsContactWnd.ShowDialog(this);
					clsContactDetails = clsContactWnd.Details;
					result = clsContactWnd.Result;
					clsContactWnd.Close();
					clsContactWnd.Dispose();

					if (result != DialogResult.OK)
					{ return; }

					if (clsContactDetails.ContactID == Constants.ZERO || clsContactDetails.ContactID == Constants.C_RETAILPLUS_CUSTOMERID)
					{ return; }

                    // if no guarantor
                    if (!clsCardTypeDetails.WithGuarantor) clsGuarantorDetails = new Data.ContactDetails();

					clsEvent.AddEvent("[" + lblCashier.Text + "] Issuing credit card no to " + clsContactDetails.ContactName);

					Data.Contacts clsContact = new Data.Contacts(mConnection, mTransaction);
                    mConnection = clsContact.Connection; mTransaction = clsContact.Transaction;

					clsContactDetails = clsContact.Details(clsContactDetails.ContactID);
					clsContact.CommitAndDispose();

					if (clsContactDetails.CreditDetails.CreditCardNo != string.Empty && clsContactDetails.CreditDetails.CreditCardNo != null)
					{
						clsEvent.AddEventLn("Cancelled!");
						clsEvent.AddEventLn("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " was already issued to " + clsContactDetails.ContactName + " on " + clsContactDetails.CreditDetails.CreditAwardDate.ToString("MMM dd, yyyy hh:mm tt"));
						MessageBox.Show("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " was already issued to " + clsContactDetails.ContactName + " on " + clsContactDetails.CreditDetails.CreditAwardDate.ToString("MMM dd, yyyy hh:mm tt") + "." +
                                        Environment.NewLine + " Please select another customer to issue Credit Card.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}

					clsEvent.AddEvent("[" + lblCashier.Text + "] Issuing credit card no to " + clsContactDetails.ContactName);

					ContactCreditWnd clsContactCreditWnd = new ContactCreditWnd();
					clsContactCreditWnd.Header = "Credit Card Issuance";
                    clsContactCreditWnd.CardTypeDetails = clsCardTypeDetails;
					clsContactCreditWnd.Guarantor = clsGuarantorDetails;
					clsContactCreditWnd.ContactDetails = clsContactDetails;
					clsContactCreditWnd.CreditCardStatus = CreditCardStatus.New;
                    clsContactCreditWnd.TerminalDetails = mclsTerminalDetails;
					clsContactCreditWnd.ShowDialog(this);
					result = clsContactCreditWnd.Result;
					clsContactDetails = clsContactCreditWnd.ContactDetails;
					clsContactCreditWnd.Close();
					clsContactCreditWnd.Dispose();

					if (result == DialogResult.OK)
					{
                        Data.Products clsProducts = new Data.Products(mConnection, mTransaction);
                        mConnection = clsProducts.Connection; mTransaction = clsProducts.Transaction;

                        string strProductBarcode = Data.Products.DEFAULT_CREDIT_CARD_MEMBERSHIP_FEE_BARCODE;
                        //override if with Guarantor
                        if (clsCardTypeDetails.WithGuarantor)
                            strProductBarcode = Data.Products.DEFAULT_SUPER_CARD_MEMBERSHIP_FEE_BARCODE;

                        if (clsProducts.Details(strProductBarcode).ProductID == 0)
                        {
                            if (!clsCardTypeDetails.WithGuarantor)
                                clsProducts.CREATE_CREDIT_CARD_MEMBERSHIP_FEE_BARCODE_PRODUCT();
                            else
                                clsProducts.CREATE_SUPER_CARD_MEMBERSHIP_FEE_BARCODE_PRODUCT();

                            Methods.InsertAuditLog(mclsTerminalDetails, "System Administrator", AccessTypes.RewardCardChange, strProductBarcode + " product has been created coz it's not configured");
                        }
                        clsProducts.CommitAndDispose();

						MessageBox.Show("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " was issued to " + clsContactDetails.ContactName + "." +
										Environment.NewLine + "Please collect the payment then close the transaction.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Information);

						clsEvent.AddEventLn("Done!", true);
						clsEvent.AddEventLn("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " was issued to " + clsContactDetails.ContactName + ".", true);

                        LocalDB clsLocalDB = new LocalDB(mConnection, mTransaction);
                        mConnection = clsLocalDB.Connection; mTransaction = clsLocalDB.Transaction;

                        clsEvent.AddEvent("[" + lblCashier.Text + "] Creating " + strProductBarcode + "transaction for customer: ");
						LoadContact(AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER, clsContactDetails);
						if (!this.CreateTransaction()) return;

                        txtBarCode.Text = strProductBarcode;
						ReadBarCode();
						int iRow = dgItems.CurrentRowIndex;

						txtBarCode.Text = "";
						CloseTransaction();

                        clsLocalDB.CommitAndDispose();
					}
					else { clsEvent.AddEventLn("Cancelled!"); }
				}
				catch (Exception ex)
				{ 
                    InsertErrorLogToFile(ex, "ERROR!!! Issuing internal credit-card."); 
                }
				Cursor.Current = Cursors.Default;
			}

		}
Ejemplo n.º 3
0
		private void CreditCardReplacement(CreditCardStatus pvtCreditCardStatus)
		{
			if (mboIsInTransaction)
			{
				MessageBox.Show("Sorry you cannot replace a Credit Card while there is an ongoing transaction. Please finish the transaction first.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return;
			}

			DialogResult loginresult = GetWriteAccessAndLogin(mclsSalesTransactionDetails.CashierID, AccessTypes.CreditCardChange);

            if (loginresult == DialogResult.OK)
			{
				try
				{
					DialogResult result; Data.ContactDetails clsContactDetails;
					ContactSelectWnd clsContactWnd = new ContactSelectWnd();
                    clsContactWnd.EnableContactAddUpdate = GetWriteAccess(mclsSalesTransactionDetails.CashierID, AccessTypes.Contacts) == System.Windows.Forms.DialogResult.OK;
                    clsContactWnd.SysConfigDetails = mclsSysConfigDetails;
                    clsContactWnd.TerminalDetails = mclsTerminalDetails;
					clsContactWnd.ContactGroupCategory = AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER;
                    clsContactWnd.Header = "Please select customer for credit card replacement.";
					clsContactWnd.ShowDialog(this);
					clsContactDetails = clsContactWnd.Details;
					result = clsContactWnd.Result;
					clsContactWnd.Close();
					clsContactWnd.Dispose();

					if (result != DialogResult.OK)
					{ return; }

					if (clsContactDetails.ContactID == Constants.ZERO || clsContactDetails.ContactID == Constants.C_RETAILPLUS_CUSTOMERID)
					{ return; }

					clsEvent.AddEvent("[" + lblCashier.Text + "] Replacing credit card...");

                    Data.Contacts clsContact = new Data.Contacts(mConnection, mTransaction);
                    mConnection = clsContact.Connection; mTransaction = clsContact.Transaction;

					clsContactDetails = clsContact.Details(clsContactDetails.ContactID);
                    Data.ContactDetails clsGuarantor = clsContact.Details(clsContactDetails.CreditDetails.GuarantorID);
					clsContact.CommitAndDispose();

					if (clsContactDetails.CreditDetails.CreditCardNo == string.Empty || clsContactDetails.CreditDetails.CreditCardNo == null)
					{
						clsEvent.AddEventLn("Cancelled!");
						clsEvent.AddEventLn(clsContactDetails.ContactName + " has no valid Credit Card yet. ");
						MessageBox.Show(clsContactDetails.ContactName + " has no valid Credit Card yet. Please select another customer.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					clsEvent.AddEvent("[" + lblCashier.Text + "] Replacing credit card #: " + clsContactDetails.CreditDetails.CreditCardNo + " of " + clsContactDetails.ContactName + " as " + pvtCreditCardStatus.ToString("G"));

					string strOldCreditCardNo = clsContactDetails.CreditDetails.CreditCardNo;
					ContactCreditWnd clsContactCreditWnd = new ContactCreditWnd();
					if (pvtCreditCardStatus == CreditCardStatus.Replaced_Lost)
						clsContactCreditWnd.Header = "Credit Card Replacement of LOST CARD ";
					else if (pvtCreditCardStatus == CreditCardStatus.Replaced_Expired)
						clsContactCreditWnd.Header = "Credit Card Replacement of EXPIRED CARD ";
                    clsContactCreditWnd.CardTypeDetails = clsContactDetails.CreditDetails.CardTypeDetails;
					clsContactCreditWnd.Guarantor = clsGuarantor;
					clsContactCreditWnd.ContactDetails = clsContactDetails;
					clsContactCreditWnd.CreditCardStatus = pvtCreditCardStatus;
                    clsContactCreditWnd.TerminalDetails = mclsTerminalDetails;
					clsContactCreditWnd.ShowDialog(this);
					result = clsContactCreditWnd.Result;
					clsContactDetails = clsContactCreditWnd.ContactDetails;
					clsContactCreditWnd.Close();
					clsContactCreditWnd.Dispose();

					if (result == DialogResult.OK)
					{
                        Data.Products clsProducts = new Data.Products(mConnection, mTransaction);
                        mConnection = clsProducts.Connection; mTransaction = clsProducts.Transaction;

                        string strProductBarcode = Data.Products.DEFAULT_CREDIT_CARD_REPLACEMENT_FEE_BARCODE;
                        //override if with Guarantor
                        if (clsContactDetails.CreditDetails.CardTypeDetails.WithGuarantor)
                            strProductBarcode = Data.Products.DEFAULT_SUPER_CARD_REPLACEMENT_FEE_BARCODE;

                        if (clsProducts.Details(strProductBarcode).ProductID == 0)
                        {
                            if (!clsContactDetails.CreditDetails.CardTypeDetails.WithGuarantor)
                                clsProducts.CREATE_CREDIT_CARD_REPLACEMENT_FEE_BARCODE_PRODUCT();
                            else
                                clsProducts.CREATE_SUPER_CARD_REPLACEMENT_FEE_BARCODE_PRODUCT();

                            Methods.InsertAuditLog(mclsTerminalDetails, "System Administrator", AccessTypes.CreditCardChange, strProductBarcode + " product has been created coz it's not configured");
                        }
                        clsProducts.CommitAndDispose();

                        MessageBox.Show("Credit Card No: " + strOldCreditCardNo + " has been replaced with new card #: " + clsContactDetails.CreditDetails.CreditCardNo + ".", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Information);

						clsEvent.AddEventLn("Done!", true);
						clsEvent.AddEventLn("Credit Card No: " + strOldCreditCardNo + " has been replaced with new card #: " + clsContactDetails.CreditDetails.CreditCardNo + ".", true);

                        LocalDB clsLocalDB = new LocalDB(mConnection, mTransaction);
                        mConnection = clsLocalDB.Connection; mTransaction = clsLocalDB.Transaction;

						clsEvent.AddEvent("[" + lblCashier.Text + "] Creating " + strProductBarcode + "transaction for customer: ");
						LoadContact(AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER, clsContactDetails);
						if (!this.CreateTransaction()) return;

                        txtBarCode.Text = strProductBarcode;
						ReadBarCode();
						int iRow = dgItems.CurrentRowIndex;

						txtBarCode.Text = "";
						CloseTransaction();

                        clsLocalDB.CommitAndDispose();
					}
					else { clsEvent.AddEventLn("Cancelled!"); }
				}
				catch (Exception ex)
				{ 
                    InsertErrorLogToFile(ex, "ERROR!!! Replacing internal credit card."); 
                }
				Cursor.Current = Cursors.Default;
			}
		}
Ejemplo n.º 4
0
        private void RenewCreditCard()
        {
            if (mboIsInTransaction)
            {
                MessageBox.Show("Sorry you cannot renew a Credit Card while there is an ongoing transaction." + Environment.NewLine + "Please finish the transaction first.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            DialogResult loginresult = GetWriteAccessAndLogin(mclsSalesTransactionDetails.CashierID, AccessTypes.CreditCardChange);

            if (loginresult == DialogResult.OK)
            {
                try
                {
                    DialogResult result; Data.ContactDetails clsContactDetails;
                    ContactSelectWnd clsContactWnd = new ContactSelectWnd();
                    clsContactWnd.EnableContactAddUpdate = GetWriteAccess(mclsSalesTransactionDetails.CashierID, AccessTypes.Contacts) == System.Windows.Forms.DialogResult.OK;
                    clsContactWnd.SysConfigDetails = mclsSysConfigDetails;
                    clsContactWnd.TerminalDetails = mclsTerminalDetails;
                    clsContactWnd.ContactGroupCategory = AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER;
                    clsContactWnd.Header = "Please select customer for credit card renewal.";
                    clsContactWnd.ShowDialog(this);
                    clsContactDetails = clsContactWnd.Details;
                    result = clsContactWnd.Result;
                    clsContactWnd.Close();
                    clsContactWnd.Dispose();

                    if (result != DialogResult.OK)
                    { return; }

                    if (clsContactDetails.ContactID == Constants.ZERO || clsContactDetails.ContactID == Constants.C_RETAILPLUS_CUSTOMERID)
                    { return; }

                    clsEvent.AddEvent("[" + lblCashier.Text + "] Renewing credit card.");

                    Data.Contacts clsContact = new Data.Contacts(mConnection, mTransaction);
                    mConnection = clsContact.Connection; mTransaction = clsContact.Transaction;

                    clsContactDetails = clsContact.Details(clsContactDetails.ContactID);
                    Data.ContactDetails clsGuarantor = clsContact.Details(clsContactDetails.CreditDetails.GuarantorID);

                    clsContact.CommitAndDispose();

                    if (string.IsNullOrEmpty(clsContactDetails.CreditDetails.CreditCardNo))
                    {
                        clsEvent.AddEventLn("Cancelled!");
                        clsEvent.AddEventLn(clsContactDetails.ContactName + " has no valid Credit Card yet. ");
                        MessageBox.Show(clsContactDetails.ContactName + " has no valid Credit Card yet. Please select another customer.", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                    clsEvent.AddEvent("[" + lblCashier.Text + "] Renewing credit card #: " + clsContactDetails.CreditDetails.CreditCardNo + " of " + clsContactDetails.ContactName + ".");

                    ContactCreditWnd clsContactCreditWnd = new ContactCreditWnd();
                    clsContactCreditWnd.Header = "Credit Card Renewal";
                    clsContactCreditWnd.CardTypeDetails = clsContactDetails.CreditDetails.CardTypeDetails;
                    clsContactCreditWnd.Guarantor = clsGuarantor;
                    clsContactCreditWnd.ContactDetails = clsContactDetails;
                    clsContactCreditWnd.CreditCardStatus = CreditCardStatus.ReNew;
                    clsContactCreditWnd.TerminalDetails = mclsTerminalDetails;
                    clsContactCreditWnd.ShowDialog(this);
                    result = clsContactCreditWnd.Result;
                    clsContactDetails = clsContactCreditWnd.ContactDetails;
                    clsContactCreditWnd.Close();
                    clsContactCreditWnd.Dispose();

                    if (result == DialogResult.OK)
                    {
                        Data.Products clsProducts = new Data.Products(mConnection, mTransaction);
                        mConnection = clsProducts.Connection; mTransaction = clsProducts.Transaction;

                        if (clsProducts.Details(Data.Products.DEFAULT_CREDIT_CARD_RENEWAL_FEE_BARCODE).ProductID == 0)
                        {
                            clsProducts.CREATE_CREDIT_CARD_RENEWAL_FEE_BARCODE_PRODUCT();
                            Methods.InsertAuditLog(mclsTerminalDetails, "System Administrator", AccessTypes.RewardCardChange, "CREDIT_CARD_RENEWAL_FEE_BARCODE product has been created coz it's not configured");
                        }
                        clsProducts.CommitAndDispose();

                        MessageBox.Show("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " has been renewed with new expiry date " + clsContactDetails.CreditDetails.ExpiryDate.ToString("yyyy-MM-dd") + ".", "RetailPlus", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                        clsEvent.AddEventLn("Done!", true);
                        clsEvent.AddEventLn("Credit Card No: " + clsContactDetails.CreditDetails.CreditCardNo + " has been renewed with new expiry date " + clsContactDetails.CreditDetails.ExpiryDate.ToString("yyyy-MM-dd") + ".", true);

                        LocalDB clsLocalDB = new LocalDB(mConnection, mTransaction);
                        mConnection = clsLocalDB.Connection; mTransaction = clsLocalDB.Transaction;

                        clsEvent.AddEvent("[" + lblCashier.Text + "] Creating " + Data.Products.DEFAULT_CREDIT_CARD_RENEWAL_FEE_BARCODE + "transaction for customer: ");
                        LoadContact(AceSoft.RetailPlus.Data.ContactGroupCategory.CUSTOMER, clsContactDetails);
                        if (!this.CreateTransaction()) return;

                        txtBarCode.Text = Data.Products.DEFAULT_CREDIT_CARD_RENEWAL_FEE_BARCODE;
                        ReadBarCode();
                        int iRow = dgItems.CurrentRowIndex;

                        txtBarCode.Text = "";
                        CloseTransaction();

                        clsLocalDB.CommitAndDispose();
                    }
                    else { clsEvent.AddEventLn("Cancelled!"); }
                }
                catch (Exception ex)
                {
                    InsertErrorLogToFile(ex, "ERROR!!! Renewing internal credit card.");
                }
                Cursor.Current = Cursors.Default;
            }
        }