using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Amozeshgah
{
    public partial class New_Course :DevComponents.DotNetBar.Office2007RibbonForm 
    {
        public New_Course()
        {
            InitializeComponent();
        }

        private void New_Course_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'amozeshgahDataSet1.Time' table. You can move, or remove it, as needed.
            this.timeTableAdapter.Fill(this.amozeshgahDataSet1.Time);
            // TODO: This line of code loads data into the 'amozeshgahDataSet1.Class' table. You can move, or remove it, as needed.
            this.classTableAdapter.Fill(this.amozeshgahDataSet1.Class);
            // TODO: This line of code loads data into the 'amozeshgahDataSet1.Lesson' table. You can move, or remove it, as needed.
            this.lessonTableAdapter.Fill(this.amozeshgahDataSet1.Lesson);
            // TODO: This line of code loads data into the 'amozeshgahDataSet1.Teacher' table. You can move, or remove it, as needed.
            this.teacherTableAdapter.Fill(this.amozeshgahDataSet1.Teacher);
            // TODO: This line of code loads data into the 'amozeshgahDataSet1.Term' table. You can move, or remove it, as needed.
            this.termTableAdapter.Fill(this.amozeshgahDataSet1.Term);
           
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnInsert_Click(object sender, EventArgs e)
        {
           courseTableAdapter1.New((int)cmbTeacher.SelectedValue,(int)cmbTerm.SelectedValue,(int)cmbLesson.SelectedValue,(int)cmbClass.SelectedValue,(int)cmbTime.SelectedValue);
            MessageBox.Show("اطلاعات با موفقیت ثبت شد", "مدیریت آموزشگاه", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Close();
        }
    }
}
