Example #1
0
        private void DisplayDataSup()
        {
            // using this method to fill the datagridview
            SomerenLogic.Supervisors_Service studService = new SomerenLogic.Supervisors_Service();
            List <Supervisors> drinkList = studService.GetSupervisors();

            dataGridView_Sup.AutoGenerateColumns = true;
            dataGridView_Sup.DataSource          = drinkList;
        }
Example #2
0
        //supervisor
        private void but_Addsup_Click(object sender, EventArgs e)
        {
            SomerenLogic.Teacher_Service stud = new SomerenLogic.Teacher_Service();
            List <Teacher> stList             = stud.GetTeachers();

            // trying to make button work but it doesn't work
            int supervisorid = 0;
            int teacherid    = 0;

            SomerenLogic.Supervisors_Service studService = new SomerenLogic.Supervisors_Service();
            studService.Insert_Supervisor_Service(supervisorid, teacherid);

            DisplayDataSup();
            ClearDataSup();
        }
Example #3
0
        private void but_Delete_Click(object sender, EventArgs e)
        {
            if (textBox_FirstName.Text != "" && textBox_Lastname.Text != "")
            {
                SomerenLogic.Supervisors_Service studService = new SomerenLogic.Supervisors_Service();
                studService.Delete_Supervisor_Service(Supervisor_ID);


                DisplayDataSup();
                ClearDataSup();
            }
            else
            {
                MessageBox.Show("Please Select field to Delete");
            }
        }