Ejemplo n.º 1
0
        /// <summary>
        /// When Robot Support button clicked this method sending notification on Slack
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRobotSupport_Click(object sender, EventArgs e)
        {
            SupportRequesView      srv = new SupportRequesView();
            SupportRequesPresenter srp = new SupportRequesPresenter(srv);

            if (txMainTextBox.Text == "")
            {
                startTime = DateTime.Now;
            }
            newTime = DateTime.Now;
            // example of costume date and time
            //newTime = DateTime.Parse("08/10/2011 23:50:31");

            try
            {
                TimeComparing();
                srp.RoboticSupportReq();
                txMainTextBox.Text += $"{newLine}Robot support request was sent successfully. {DateTime.Now.ToString()}{newLine}";
                logger.Info("Robot Support was requested.");
            }
            catch (Exception)
            {
                logger.Error("It was a problem with your request.");
                txMainTextBox.Text = $"{newLine}It was an ERROR. Please try again.";
            }
        } // end of btnRobotSupport_Click method
Ejemplo n.º 2
0
        } // end of btnRobotSupport_Click method

        /// <summary>
        /// When R4 Support button clicked this method sending notification on Slack
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnR4Support_Click(object sender, EventArgs e)
        {
            SupportRequesView      srv = new SupportRequesView();
            SupportRequesPresenter srp = new SupportRequesPresenter(srv);

            if (txMainTextBox.Text == "")
            {
                startTime = DateTime.Now;
            }

            newTime = DateTime.Now;

            try
            {
                TimeComparing();
                srp.R4supportReq();
                txMainTextBox.Text += $"{newLine}R4 support request was sent successfully. {DateTime.Now.ToString()}{newLine}";
                logger.Info("R4 support was requested.");
            }
            catch (Exception)
            {
                logger.Error("It was a problem with your request.");
                txMainTextBox.Text = $"{newLine}It was an ERROR. Please try again.";
            }
        }