Пример #1
0
        //  Public Functions    ///////////////////////////////////////////////////////////////////

        /// <summary>
        /// Creates a new instance of customerTicket for use with a new customer.
        /// </summary>
        /// <param name="sNid">WSU NID of the customer.</param>
        public static void CreateCustomerTicket(string sNid)
        {
            int n;

            if (int.TryParse(sNid, out n)) //If the NID string contains a number
            {
                //Create a normal ticket for walk-in customer
                string sFirstname = Wsu_Database.Get_FirstName(sNid);
                string sWsuEmail  = Wsu_Database.Get_WsuEmail(sNid);

                m_CustomerTicket = new CougtechTicket(sNid, sFirstname, sWsuEmail);
            }
            else
            {
                m_CustomerTicket = new CougtechTicket("000000000", "Butch", "*****@*****.**", m_QuickCodes[sNid].f_sCode,  //Create a quick-pick ticket
                                                      m_QuickCodes[sNid].f_sDescription, false, true);
            }

            //Turn off startup boolean
            m_bStartup = false;
        }
Пример #2
0
        /// <summary>
        /// Enters a completed customer ticket into the current log file.
        /// </summary>
        /// <param name="customerTicket">Populated customer ticket.</param>
        public void LogTicket(CougtechTicket customerTicket)
        {
            m_CsvLogger.AddToCurrent(DateTime.Now.ToShortTimeString()); //1st column is the time that the ticket was logged

            //2nd column is the ticket type
            if (customerTicket.IsAppointment)                     //If the ticket is an appointment
            {
                m_CsvLogger.AddToCurrent("Apt");                  //Set the type to "Apt"
            }
            else if (customerTicket.IsQuickPick)                  //Else if the ticket is a quick-pick
            {
                m_CsvLogger.AddToCurrent("QickPick");             //Set the type to "QuickPick"
            }
            else                                                  //Else
            {
                m_CsvLogger.AddToCurrent("WI");                   //Set the type to "WI" for walk-in
            }
            m_CsvLogger.AddToCurrent(customerTicket.Self);        //2nd column is the url to the ticket within Jira
            m_CsvLogger.AddToCurrent(customerTicket.Nid);         //3rd column is the NID of the student
            m_CsvLogger.AddToCurrent(customerTicket.Problem);     //4th column is the walk-in problem
            m_CsvLogger.AddToCurrent(customerTicket.Description); //5th column is the problem description
            m_CsvLogger.WriteLine();                              //Write the line to the log file
        }