public Ad_UpdateCourse(Ad_CourseManage parent, string cid, string cname, string cterm, string cpoint, string ctime, string cquality)
        {
            InitializeComponent();
            pform             = parent;
            tbox_cid.Text     = cid;
            tbox_cname.Text   = cname;
            tbox_credit.Text  = cpoint;
            cbox_term.Text    = cterm;
            tbox_hour.Text    = ctime;
            cbox_feature.Text = cquality;
            oldcid            = cid.Trim();
            string sql = "select distinct cquality from courses";

            if (Ad_CourseManage.ExecuteSql(sql) != 0)
            {
                this.cbox_feature.DataSource = Ad_CourseManage.Query(sql).Tables["courses"];
                cbox_feature.DisplayMember   = "cquality";
            }

            string sql1 = "select distinct cterm from courses";

            if (Ad_CourseManage.ExecuteSql(sql) != 0)
            {
                this.cbox_term.DataSource = Ad_CourseManage.Query(sql1).Tables["courses"];
                cbox_term.DisplayMember   = "cterm";
            }
        }
        public Ad_CourseManage(LoginIn_Ad parent)
        {
            InitializeComponent();
            pform = parent;
            string sql = "select distinct cterm from courses";

            if (Ad_CourseManage.ExecuteSql(sql) != 0)
            {
                this.cbox_term.DataSource = Ad_CourseManage.Query(sql).Tables["courses"];
                cbox_term.DisplayMember   = "cterm";
            }
        }