{$cfg_webname}
主页 > 计算机 > 论文 >

家教信息管理系统毕业论文设计(ASP.NET)(3)

来源:56doc.com  资料编号:5D4532 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9A5D4532
资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 帮助
资料介绍

            {
                teacherSex = male.Text.Trim();
            }
            else
            {
                teacherSex = female.Text.Trim();
            }
            string teacherAge = txtAge.Text.Trim();
            string teacherSchool = txtSchool.Text.Trim();
            string teacherCourse = txtCourse.Text.Trim();
            string teacherPhone = txtPhone.Text.Trim();
            string teacherEmail = txtEmail.Text.Trim();
            string teacherAddress = txtAddress.Text.Trim();
            string teacherInfo = txtInfo.Text.Trim();
            string price = txtPrice.Text.Trim();
            Teacher tch = new Teacher(teacherName, teacherSex, teacherAge, teacherSchool, teacherCourse, teacherPhone, teacherEmail, teacherAddress, teacherInfo, price,userId);
            bool res = TeacherManager.TeacherInsert(tch);
            if (res)
            {
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('注册成功!');</script>");
                return;
            }
        }

    }
}
5.2.2教员信息修改的代码
#region 修改教员信息
        /// <summary>
        /// 修改教员信息
        /// </summary>
        /// <param name="tch">教员实体类</param>
        /// <returns></returns>
        public bool UpdateTeacher(Teacher tch)
        {
            bool flag = false;
            string cmdText = "teacher_Update";
            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@teacherId",tch.TeacherId),
                new SqlParameter("@teacherName",tch.TeacherName),
                new SqlParameter("@teacherSex",tch.TeacherSex),
                new SqlParameter("@teacherAge",tch.TeacherAge),
                new SqlParameter("@teacherSchool",tch.TeacherSchool),
                new SqlParameter("@teacherCourse",tch.TeacherCourse),
                new SqlParameter("@price",tch.Price),
                new SqlParameter("@teacherPhone",tch.TeacherPhone),
                new SqlParameter("@teacherEmail",tch.TeacherEmail),
                new SqlParameter("@teacherAddress",tch.TeacherAddress),
推荐资料