示例#1
0
        private void button_click(object s, EventArgs e)
        {
            Button    btn = (Button)s;
            Quat_date qu  = new Quat_date(btn);

            qu.Show();

            //   MessageBox.Show(btn.Text);
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (End.Text != "Browse")
            {
                if (List_Items.Count >= 1)
                {
                    for (int i = 0; i < List_Items.Count; i++)
                    {
                        //if (i > 0)
                        //{
                        //    if (List_Groups[0].Header.Equals(List_Groups[0].Header))
                        //    {
                        //        MessageBox.Show(Lect.Text + " is already teaching in this day");
                        //        return;
                        //    }
                        //}
                        //   db.InsertSce(List_Groups[i].Header, hour, day, List_Items[i].Text, date,Type1.Text,Class.Text,Department.Text,Semester.Text,NumOfExam.Text);

                        //if (check_if_course_exist(Course_list.Items[i].Group.Header, hour, day, Course_list.Items[i].Text,date))
                        //      db.InsertSce(Course_list.Items[i].Group.Header, hour, day, Course_list.Items[i].Text,date);
                    }
                }
                if (db.help == null)
                {
                    MessageBox.Show("Success!!");
                }
                B.Text = "...";
                this.Close();
                if (parent != null)
                {
                    parent.Close();
                }
                else if (parent1 != null)
                {
                    parent1 = null;
                }
                Schedule s2 = new Schedule();
                s2.Show();
            }
            else
            {
                MessageBox.Show("You haven't chose end hour");
            }
        }
示例#3
0
        public AddToSce(Button b, string day, string hour, string date, Button btn, Schedule s = null, Quat_date c = null, string ClassName = null)
        {
            InitializeComponent();

            if (ClassName != null)
            {
                Class_name = ClassName;
            }
            this.hour       = hour;
            this.day        = day;
            parent          = s;
            parent1         = c;
            button2.Enabled = false;

            this.date = date;
            Text      = day + " , " + hour;
            CenterToScreen();
            B                 = b;
            this.btn          = btn;
            LectureID         = new List <int>();
            course_list_items = new List <string>();
        }