Esempio n. 1
0
        public ViewAllShedule()
        {
            InitializeComponent();
            LessonSchool        lessonSchool = new LessonSchool();
            List <LessonSchool> list         = new List <LessonSchool>();

            list = lessonSchool.getSchedule();

            ScheduleList.DataSource = list;
        }
Esempio n. 2
0
        public UserForm()
        {
            InitializeComponent();
            LessonSchool        lessonSchool = new LessonSchool();
            List <LessonSchool> list         = new List <LessonSchool>();

            list = lessonSchool.getSchedule();

            listBox1.DataSource = list;
        }
Esempio n. 3
0
        public void ViewScheduleTest()
        {
            string connStr = @"Data Source=DESKTOP-SDGK59R\SQLEXPRESS;
                            Initial Catalog=dance_school;
                            
                            Integrated Security=True";

            using (TransactionScope ts = new TransactionScope())
            {
                using (SqlConnection connection =
                           new SqlConnection(connStr))
                {
                    connection.Open();
                    LessonSchool lesson = new LessonSchool();

                    List <LessonSchool> list = lesson.getSchedule();


                    Assert.AreEqual(1, list.Count);
                }
            }
        }