Exemplo n.º 1
0
        private void Submit_Button_Click(object sender, EventArgs e)
        {
            Requests_Handler.Add_Timed_Request(_type, _hour + ":" + _minute + ":00");
            MessageBox.Show("Your request has been acknowledged");

            /*
             * _time = _hour + ":" + _minute;
             * Parameters = new List<string>();
             * Parameters.Add("User_id");
             * Parameters.Add("Type_of");
             * Parameters.Add("Choice");
             * Parameters.Add("First_Name");
             * Parameters.Add("Last_Name");
             * Parameters.Add("Section");
             * Parameters.Add("Room");
             * ParameterValues = new List<string>();
             * ParameterValues.Add(form1.UserIDProperty);
             * ParameterValues.Add("Bathing");
             * ParameterValues.Add(_type);
             * ParameterValues.Add(form1.FirstNameProperty);
             * ParameterValues.Add(form1.LastNameProperty);
             * ParameterValues.Add(form1.SectionProperty);
             * ParameterValues.Add(form1.RoomProperty);
             * _time = _hour + ":" + _minute;
             *
             * connect.Insert("INSERT INTO Requests (User_id, Type_of, Choice, First_Name, Last_Name, Section, Room) VALUES (@User_id, @Type_of, @Choice, @First_Name, @Last_Name, @Section, @Room);", Parameters, ParameterValues);
             * MessageBox.Show("Your request has been acknowledged");*/
        }
Exemplo n.º 2
0
        public void CallRequest()
        {
            /*
             * Parameters = new List<string>();
             * Parameters.Add("User_id");
             * Parameters.Add("Type_of");
             * Parameters.Add("Choice");
             * Parameters.Add("First_Name");
             * Parameters.Add("Last_Name");
             * Parameters.Add("Section");
             * Parameters.Add("Room");
             * ParameterValues = new List<string>();
             * ParameterValues.Add(form1.UserIDProperty);
             * ParameterValues.Add("Emergency Request");
             * ParameterValues.Add("Emergency");
             * ParameterValues.Add(form1.FirstNameProperty);
             * ParameterValues.Add(form1.LastNameProperty);
             * ParameterValues.Add(form1.SectionProperty);
             * ParameterValues.Add(form1.RoomProperty);
             */
            time = DateTime.Now.ToLongTimeString();
            time = time.Substring(0, time.Length - 3);

            if (time.Length == 7)
            {
                time = "0" + time;
            }


            Requests_Handler.Add_Timed_Request("Emergency", time);
            //connect.Insert("INSERT INTO Requests (Request_id, User_id, Type_of, Choice, First_Name, Last_Name, Section, Room) VALUES (Default, @Type_of, 'Emergency Request', 'Emergency', '@First_Name', '@Last_Name', '@Section', '@Room')", Parameters, ParameterValues);
        }
Exemplo n.º 3
0
        // Once user has clicked on submit
        private void Submit_Button_Click(object sender, EventArgs e)
        {
            Requests_Handler.Add_Timed_Request("alarm", Hour + ":" + Minute + ":00");
            MessageBox.Show("You have added an alarm");

            // Reload the alarms so the datagridview is updated
            Display_Alarms();
        }
Exemplo n.º 4
0
 // Once user has clicked on submit
 public void Submit_Button_Click(object sender, EventArgs e)
 {
     if (Hour_Box.Text == "Hour" || Minute_Box.Text == "Minutes")
     {
         MessageBox.Show("You must enter all details");
     }
     else
     {
         Requests_Handler.Add_Timed_Request("alarm", Hour + ":" + Minute + ":00");
         MessageBox.Show("You have added an alarm");
     }
     // Reload the alarms so the datagridview is updated
     Display_Alarms();
 }