Ejemplo n.º 1
0
 /// <summary>
 /// This method must be overridden by inheriting classes and should apply the
 /// methodology used by the customer location for getting their RFID tags for a
 /// particular location
 /// </summary>
 /// <param name="location">The location for which you need the RFID tag. This may not be a necessary parameter for all customers</param>
 /// <returns>returns the RFID tag for 'location'</returns>
 internal virtual string retrieveRFIDTagNumber(int location, LocationTransactionData transdata)
 {
     return("");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This method is meant to contain any customer specific processing which must happen after all customer screens have been successfully
 /// completed and after the door is open. Possible examples include scanning for an RFID tag upon the key's return.
 /// </summary>
 /// <param name="data1"></param>
 /// <param name="data2"></param>
 /// <param name="data3"></param>
 /// <returns></returns>
 internal virtual bool postDoorOpeningProcessing(LocationTransactionData transaction)
 {
     return(true);
 }
Ejemplo n.º 3
0
 internal override bool showReservationData(ref LocationTransactionData transaction, ref YesNoForm ReservationConfirmScreen)
 {
     return(getBoxNum(ref transaction, ref ReservationConfirmScreen));
 }
Ejemplo n.º 4
0
        private bool getBoxNum(ref LocationTransactionData transaction, ref YesNoForm ReservationConfirmScreen)
        {
            //
            //Put new stored procedure into place
            //Confirm Operator Number
            //Set BoxNumber
            //Display Destination & Return Time
            //
            int intReturnValue = 0;
            OregonStateUTransactionData transData = (OregonStateUTransactionData)transaction;
            SqlCommand             comm           = new SqlCommand();//This is needed because there is no public contructor for SqlParameterCollection
            SqlParameterCollection Parameters     = comm.Parameters;
            SqlParameterCollection ReturnParameters;

            try
            {
                //Add inputs
                Parameters.Add(Program.SqlManager.CreateParameter("ResvNum", ParameterDirection.Input, transData.AccessCode, SqlDbType.VarChar));
                Parameters.Add(Program.SqlManager.CreateParameter("OperNum", ParameterDirection.Input, transData.OperatorNumber, SqlDbType.VarChar));
                Parameters.Add(Program.SqlManager.CreateParameter("KioskDateOut", ParameterDirection.Input, String.Format("{0:yyyy/MM/dd HH:mm:ss}", DateTime.Now), SqlDbType.VarChar));
                Parameters.Add(Program.SqlManager.CreateParameter("KioskNumOut", ParameterDirection.Input, Program.KIOSK_ID.PadLeft(4, '0'), SqlDbType.VarChar));
                Parameters.Add(Program.SqlManager.CreateParameter("KeyNumMax", ParameterDirection.Input, Program.NUMBER_RELAYS, SqlDbType.Int));
                Parameters.Add(Program.SqlManager.CreateParameter("KeyMode", ParameterDirection.Input, transaction.ReturningKey, SqlDbType.Int));
                //Add Outputs & Return
                Parameters.Add(Program.SqlManager.CreateParameter("KeyNumOut", ParameterDirection.Output, 0, SqlDbType.Int));
                Parameters.Add(Program.SqlManager.CreateParameter("DestCity", ParameterDirection.Output, "", SqlDbType.VarChar, 20));
                Parameters.Add(Program.SqlManager.CreateParameter("DueDate", ParameterDirection.Output, "", SqlDbType.VarChar, 20));
                Parameters.Add(Program.SqlManager.CreateParameter("Return_Val", ParameterDirection.ReturnValue, 0, SqlDbType.Int));

                ReturnParameters = Program.SqlManager.SqlStoredProcedure("SPA_GetBoxNum", Parameters);
                if (ReturnParameters == null) //Error msg already given by SQLManager
                {
                    return(false);
                }

                //set the return code (of the stored procedure) to the results sent back.
                intReturnValue = (int)ReturnParameters["Return_Val"].Value;
                Program.logEvent("Show Reservation Data: Return Value - " + intReturnValue);
                switch (intReturnValue)
                {
                case 1:
                    //Success
                    Program.logEvent("Show Reservation Data: Box Number - " + (int)ReturnParameters["KeyNumOut"].Value);
                    transaction.BoxNumber = (int)ReturnParameters["KeyNumOut"].Value;
                    Program.logEvent("Destination City: " + (string)ReturnParameters["DestCity"].Value);
                    Program.logEvent("Due Date: " + (string)ReturnParameters["DueDate"].Value);

                    if (!transaction.ReturningKey)
                    {
                        //return time prep
                        string   dt       = (string)ReturnParameters["DueDate"].Value;
                        string[] datetime = dt.Replace("  ", " ").Split(' ');
                        Program.logEvent("ScreenPrint Datetime0:" + datetime[0]);
                        Program.logEvent("ScreenPrint Datetime1:" + datetime[1]);
                        Program.logEvent("ScreenPrint Datetime2:" + datetime[2]);
                        Program.logEvent("ScreenPrint Datetime3:" + datetime[3]);

                        ReservationConfirmScreen.setFormMessage("Trip To:\r\n" + (string)ReturnParameters["DestCity"].Value + "\r\nDue Back:\r\n" + datetime[0] + '-' + datetime[1] + '-' + datetime[2].Remove(0, 2) + ' ' + datetime[3].Remove(datetime[3].Length - 2, 2));
                        Program.logEvent("Reservation Confirmation In Progress");
                    }
                    return(true);

                case 5:
                    //Failure -
                    Program.ShowErrorMessage("Sorry Your Entry Did\r\nNot Find A Match\r\nPlease Re-Enter Or\r\nCall " + Program.SERVICE_MANAGER_NUMBER, 5000);
                    Program.logEvent("Failure - can't find data - perhaps RES_MAIN table reservation row does not exist");
                    Program.SqlManager.ErrorDatabaseEntry(transaction.AccessCode, "", DateTime.Now.ToString(), Program.KIOSK_ID, 0, "Failure - can't find data - perhaps RES_MAIN table reservation row does not exist", "", 0);
                    return(false);

                case 6:
                    //Failure -
                    Program.ShowErrorMessage("Sorry Your Entry Did\r\nNot Find A Match\r\nPlease Re-Enter Or\r\nCall " + Program.SERVICE_MANAGER_NUMBER, 5000);
                    Program.logEvent("Failure - Key # not in range");
                    Program.SqlManager.ErrorDatabaseEntry(transaction.AccessCode, "", DateTime.Now.ToString(), Program.KIOSK_ID, 0, "Failure - Key # not in range", "", 0);
                    return(false);
                }
            }
            catch (Exception ex)
            {
                //An application exception was thrown - process/display exception.
                Program.logEvent("GENERAL EXCEPTION:" + "ReservationConfirmation: " + ex.Message);
                Program.SqlManager.ErrorDatabaseEntry(transaction.AccessCode, "", DateTime.Now.ToString(), Program.KIOSK_ID, 0, "GENERAL EXCEPTION:" + "ReservationConfirmation: " + ex.Message, "", 0);
                return(false);
            }
            return(true);
        }
Ejemplo n.º 5
0
        internal override string retrieveRFIDTagNumber(int location, LocationTransactionData transdata)
        {
            int RFIDTagindex = transdata.ObjectList.FindIndex(0, delegate(LocationTransactionData.TransactionDataObject ltd) { return(ltd.name == "TagNum"); });

            return(transdata.ObjectList[RFIDTagindex].data.ToString());
        }
Ejemplo n.º 6
0
 internal override string retrieveRFIDTagNumber(int location, LocationTransactionData transdata)
 {
     return(Program.passwordMgr.FindGenericData(location));
 }