//窗体加载
        private void StudentLoginForm_Load(object sender, EventArgs e)
        {
            GetGroupsBLL bll = new GetGroupsBLL();

            combSchool.DataSource  = bll.getSchoolGroup();
            combSchool.ValueMember = "SchoolName";
        }
        /// <summary>
        /// 选择学院后
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void combCollege_SelectedIndexChanged(object sender, EventArgs e)
        {
            GetGroupsBLL bll       = new GetGroupsBLL();
            string       collegeID = ((CollegeGroup)combCollege.SelectedItem).CollegeID;

            combProfession.DataSource  = bll.getProfessionGroup(collegeID);
            combProfession.ValueMember = "ProfessionName";
        }
        //选择学校后
        private void combSchool_SelectedIndexChanged(object sender, EventArgs e)
        {
            GetGroupsBLL bll      = new GetGroupsBLL();
            string       schoolID = ((SchoolGroup)(combSchool.SelectedItem)).SchoolID;

            combCollege.DataSource  = bll.getCollegeGroup(schoolID);
            combCollege.ValueMember = "CollegeName";
        }
Exemplo n.º 4
0
        private void BookTypeTree_Load(object sender, EventArgs e)
        {
            GetGroupsBLL         bll  = new GetGroupsBLL();
            List <BookTypeGroup> list = bll.getBookTypeGroup();
            ControlLoad          load = new ControlLoad();

            //初始化树列表
            load.LoadBookTypeTree("0", this.tvSearch.Nodes[0], list);
            this.tvSearch.SelectedNode = this.tvSearch.Nodes[0];
            this.tvSearch.SelectedNode.Expand();
        }
Exemplo n.º 5
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            this.dgvBook.AutoGenerateColumns = false;
            GetGroupsBLL bll = new GetGroupsBLL();

            types = bll.getBookTypeGroup();


            //加载学生管理
            tpStudent.Controls.Clear();
            AdminForm ad = new AdminForm();

            ad.TopLevel = false;
            tpStudent.Controls.Add(ad);
            ad.Show();
        }
Exemplo n.º 6
0
        private void InfoBaseForm_Load(object sender, EventArgs e)
        {
            StudentInfoBLL   stubll   = new StudentInfoBLL();
            StudentInfoModel stuModel = new StudentInfoModel();
            GetGroupsBLL     group    = new GetGroupsBLL();

            stuModel            = stubll.getStudentInfoByID(stuID);
            txtstuName.Text     = stuModel.StuName;
            txtstuName.ReadOnly = true;

            txtstuID.Text     = stuModel.StuID;
            txtstuID.ReadOnly = true;

            txtentrance.Text     = stuModel.StuClass;
            txtentrance.ReadOnly = true;

            BorrowHistoryBLL         bll  = new BorrowHistoryBLL();
            List <ShowBorrowHistory> list = bll.getListBorrowHisoryNow(stuModel.StuID);

            txtnowBorrows.Text = list.Count.ToString();



            string    sql = "select schoolName from SchoolType where schoolid='" + stuModel.SchoolID + "'";
            SQLHelper h   = new SQLHelper();

            SqlParameter[] psa =
            {
                new SqlParameter("@stuID", stuID),
            };
            string s = h.ExecuteScalar(sql, psa).ToString();

            txtschool.Text     = s;
            txtschool.ReadOnly = true;

            string    sqla = "select CollegeName from Collegetype where CollegeId=" + "'" + stuModel.CollegeID + "'";
            SQLHelper a    = new SQLHelper();

            SqlParameter[] psb =
            {
                new SqlParameter("@stuID", stuID),
            };
            string t = a.ExecuteScalar(sqla, psb).ToString();

            txtcollege.Text     = t;
            txtcollege.ReadOnly = true;

            string    sqlb = "select ProfessionName from professiontype where ProfessionID=" + "'" + stuModel.ProfessionID + "'";
            SQLHelper b    = new SQLHelper();

            SqlParameter[] psc =
            {
                new SqlParameter("@stuID", stuID),
            };
            string u = b.ExecuteScalar(sqlb, psc).ToString();

            txtprofession.Text     = u;
            txtprofession.ReadOnly = true;

            txtstuClass.Text     = stuModel.StuClass;
            txtstuClass.ReadOnly = true;
            StudentInfoBLL stublld = new StudentInfoBLL();

            int m = stublld.timeoutBorrowsBook(stuID);

            stuModel.NowsCredit = stuModel.NowsCredit - m;
            txtnowsCredit.Text  = stuModel.NowsCredit.ToString();
            stublld.updateStudentInfo(stuModel);
        }