Esempio n. 1
0
        private void btnPark_Click(object sender, RoutedEventArgs e)
        {
            string result = "";

            if (!string.IsNullOrEmpty(Cmd) && (Cmd.Equals("Payment") || Cmd.Equals("Taking Photo")) && !string.IsNullOrEmpty(Gate))
            {
                if (MessageBox.Show("Do you want to return back this car with id   " + queueId + "?", "Return Car", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
                {
                    objERPDba.CompleteTransaction(queueId);
                    objERPDba.AbortTransaction(queueId);
                    QueueData objQueueData = new QueueData();
                    objQueueData.eesNumber   = (int)Char.GetNumericValue(Gate[Gate.Length - 1]);
                    objQueueData.plateNumber = this.txtPlate.Text;
                    objQueueData.patronName  = this.txtName.Text;
                    objQueueData.customerId  = txtCustomerId.Text;
                    objQueueData.isRotate    = txtRotation.Text.Equals("TRUE");
                    this.Close();


                    kioskDataForm objForm = new kioskDataForm(objQueueData.eesNumber);
                    objForm.SetRequestData(objQueueData);

                    objForm.Show();
                }
            }
            else
            {
                MessageBox.Show("You can do this operation only when car reached in the gate in exit.");
            }
        }
Esempio n. 2
0
 void CompleteTransaction(int queueid, string mode)
 {
     try
     {
         if (mode.Contains("ENTRY") || mode.Contains("EXIT") ||
             mode.Contains("TRANSFER") || mode.Contains("REHANDLE") || mode.Contains("WASH"))
         {
             if (MessageBox.Show("Do you want to complete Transaction : " + queueid + "?", "ERP Task", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
             {
                 objERPDba.CompleteTransaction(queueid);
                 RefreshGrid();
             }
         }
         else
         {
             MessageBox.Show("Complete operation needs a valid transaction", "ERP Task", MessageBoxButton.YesNo, MessageBoxImage.Information);
         }
     }
     catch (Exception errMsg)
     {
     }
 }