Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            CounselorMenu a = new CounselorMenu();

            a.Show();
            this.Hide();
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            {
                int        serialNum = Program.Activities.Count + 1;
                SqlCommand s         = new SqlCommand();
                s.CommandText = "EXECUTE dbo.SP_Update_materialPerActivity @term_no	, @term_serialNumber, @term_quantity, @term_id";
                s.Parameters.AddWithValue("@term_no", activityNum);
                s.Parameters.AddWithValue("@term_serialNumber", material2.getSerialNumber());
                s.Parameters.AddWithValue("@term_quantity", int.Parse(textBox1.Text.ToString()));
                s.Parameters.AddWithValue("@term_id", i + 20);
                i = i + 20;

                SQL_CON SC = new SQL_CON();
                SC.execute_non_query(s);
                CounselorMenu mn = new CounselorMenu();
                this.Hide();
                mn.Show();
            }
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            int        serialNum = Program.TechnicalFailures.Count() + 1;
            SqlCommand s         = new SqlCommand();

            s.CommandText = "EXECUTE [dbo].[SP_create_technical_call] @term_no, @term_dt, @term_roomId, @term_employeeId, @term_description";
            s.Parameters.AddWithValue("@term_no", serialNum);
            s.Parameters.AddWithValue("@term_dt", DateTime.Parse(dateTimePicker1.Value.ToShortDateString()));
            s.Parameters.AddWithValue("@term_roomId ", comboBox1.Text.ToString());
            s.Parameters.AddWithValue("@term_employeeId ", EmployeeId);
            s.Parameters.AddWithValue("@term_description ", richTextBox1.Text.ToString());

            SQL_CON SC = new SQL_CON();

            SC.execute_non_query(s);
            Program.init_TechnicalFailures();
            CounselorMenu mn = new CounselorMenu();

            this.Hide();
            mn.Show();
        }