예제 #1
0
파일: OrgSetForm.cs 프로젝트: Gqqq/-
        private void cmbyuan_SelectedIndexChanged(object sender, EventArgs e)
        {
            SpecialityBLL   Speciality = new SpecialityBLL();
            SpecialityModel model      = new SpecialityModel();

            model.Speciality_ID    = "%" + this.cmbyuan.SelectedValue.ToString() + "%";
            cmbzhuan.DisplayMember = "专业名称";
            cmbzhuan.ValueMember   = "专业编号";
            cmbzhuan.DataSource    = Speciality.GetIdSpeciality(model);
        }
예제 #2
0
파일: MainForm.cs 프로젝트: Gqqq/-
        /// <summary>
        /// 树视图二级节点:绑定指定学院下的专业
        /// </summary>
        /// <param name="t">上一级节点</param>
        void BindSpeciality(TreeNode t)
        {
            specmodel.Speciality_ID = "%" + t.Tag.ToString() + "%";
            DataTable dt = speciality.GetIdSpeciality(specmodel);

            foreach (DataRow r in dt.Rows)
            {
                TreeNode spec = new TreeNode();
                spec.Text       = r["专业名称"].ToString();
                spec.Tag        = r["专业编号"];
                spec.ImageIndex = 0;
                t.Nodes.Add(spec);
                BindClass(spec);//在该专业下绑定班级节点
            }
        }
예제 #3
0
파일: OrgSetForm.cs 프로젝트: Gqqq/-
        private void button5_Click(object sender, EventArgs e)
        {
            SpecialityBLL   Speciality = new SpecialityBLL();
            SpecialityModel model      = new SpecialityModel();

            model.Speciality_ID   = "%" + txtzhuanchaname.Text + "%";
            model.Speciality_Name = "%" + txtzhuanchaname.Text + "%";
            if (this.cmbchalei.SelectedIndex == 0)
            {
                datazhuan.DataSource = Speciality.GetIdSpeciality(model);
            }
            else
            {
                datazhuan.DataSource = Speciality.GetNameSpeciality(model);
            }
        }