Пример #1
0
        /* Sets operation name on ticket
         * calls printer to print token receipt
         * Updates display with thanks message and token generated
         * @param1: token string
         * @param2: operation name
         *
         */
        private void PrintToken(string tokStr, string operaName)
        {
            string tempText = null;

            GenerateTokenSuccMessage.BackColor = Color.Green;

            tempText  = "Thank You for choosing Services\nYour token number is " + tokStr;
            tempText += " Your Token Status is Waiting ";
            GenerateTokenSuccMessage.Text      = tempText;
            GenerateTokenSuccMessage.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFF");
            GenerateTokenSuccMessage.BackColor = System.Drawing.ColorTranslator.FromHtml("#43A047");

            Ticket_Design tdObj = new Ticket_Design();

            tdObj.setOperationName(operaName);
            tdObj.setTokenValue(tokStr);
            //tdObj.print();
        }
Пример #2
0
        private void btnReprint_Click(object sender, EventArgs e)
        {
            string temp_token, tempText;;
            string serviceSel = cbChooseService.SelectedItem.ToString();
            string serviceId = null;
            string strToken = null;
            int    ticketStart = 0, ticketEnd = 0;

            for (int i = 0; i < uniqueServices.Count; i++)
            {
                // Get Service id and ticket start and ticket end


                if (serviceSel == uniqueServices[i].ToString())
                {
                    serviceId   = uniqueServices[i].ToString();
                    ticketStart = Convert.ToInt16(uniqueTicketStart[i].ToString());
                    ticketEnd   = Convert.ToInt16(uniqueTicketEnd[i].ToString());
                    temp_token  = tokenCount[i].ToString();
                    int temp_len = temp_token.Length;// get number of digits in count value
                    if (temp_len < 3)
                    {
                        strToken = tokenDigitAdjust(tokenCount[i], temp_len, uniquePrefix[i].ToString()); // return count along with prefix and adjusted digits of token number
                        putTokenInTable(strToken, uniquePrefix[i].ToString(), uniqueServices[i].ToString());
                    }
                    else
                    {
                        strToken = uniquePrefix[i].ToString() + tokenCount[i].ToString();
                        putTokenInTable(tokenCount[i].ToString(), uniquePrefix[i].ToString(), uniqueServices[i].ToString());
                    }

                    //MessageBox.Show("Token " + strToken); test to show token number in alert box
                    tempText  = "Thank You for choosing Services\nYour token number is " + strToken;
                    tempText += " Your Token Status is Waiting ";
                    GenerateTokenSuccMessage.Text = tempText;
                    Ticket_Design tdObj = new Ticket_Design();
                    tdObj.setOperationName(serviceSel);
                    tdObj.setTokenValue(strToken);
                    tdObj.print();
                }
            }
        }
Пример #3
0
 private void ticketDesignToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.ms.Visible == true)
         {
             this.ms.Visible = false;
         }
         else if (this.sc.Visible == true)
         {
             this.sc.Visible = false;
         }
         this.td.Show();
         statusPanel.Text = "Setup Ticket Template";
     }
     catch (System.ArgumentException argExcept)
     {
         Ticket_Design td = new Ticket_Design();
         td.MdiParent = this;
         ms.logError(argExcept);
         this.td.Visible = true;
         this.td.Show();
     }
 }