班级电子信息档案管理系统设计与实现毕业设计论文 - 图文(8)

2019-01-12 18:17

陈XX:三明学院班级电子信息档案管理系统设计与实现

protected void btn_add_Click(object sender, EventArgs e) {

string strconn = ConfigurationSettings.AppSettings[\]; SqlConnection conn = new SqlConnection(strconn); String sqlstr = \

student(stID,stName,sex,birthday,minZu,jiGuan,classID,enterTime,suShe,tel,homeAddress,mianMao,renZhi,teChang,beiZhu) values( '\ + TextBox1.Text.ToString() + \ + TextBox2.Text.ToString() + \ + TextBox3.Text.ToString() + \ + TextBox4.Text.ToString() + \ + TextBox5.Text.ToString() + \ + TextBox6.Text.ToString() + \ + Session[\] + \ + TextBox7.Text.ToString() + \ + TextBox8.Text.ToString() + \ + TextBox9.Text.ToString() + \ + TextBox10.Text.ToString() + \ + this.DropDownList1.SelectedItem.Text + \ + TextBox11.Text.ToString() + \ + TextBox12.Text.ToString() + \ + TextBox13.Text.ToString() + \; SqlCommand cmd = new SqlCommand(sqlstr, conn); conn.Open();

cmd.ExecuteNonQuery(); conn.Close();

Response.Write(\添加成功!!! '); \); } }

4. 班长添加积分

public partial class Class_Class_add_jifen : System.Web.UI.Page {

protected void Page_Load(object sender, EventArgs e) {

if (!Page.IsPostBack) {

Band_DropDownList1(); } }

protected void Band_DropDownList1() {

//绑定DropDownList1

string strconn = ConfigurationSettings.AppSettings[\]; SqlConnection conn = new SqlConnection(strconn);

SqlDataAdapter dap = new SqlDataAdapter(\, conn); DataTable dt = new DataTable(); dap.Fill(dt);

DropDownList1.DataSource = dt; DropDownList1.DataTextField = \; DropDownList1.DataValueField = \; DropDownList1.DataBind();

30

2011届网络工程班毕业设计

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e) {

string strconn = ConfigurationSettings.AppSettings[\]; SqlConnection conn = new SqlConnection(strconn); SqlCommand cmd3 = new SqlCommand(\

jifen.chengJi,jifen.avgScore,cePing,jiaJiang,yanCheng from student,jifen where

student.stID=jifen.stID and year='\ + DropDownList1.SelectedValue + \ + DropDownList3.SelectedValue + \+Session[\]+\, conn); conn.Open();

SqlDataReader dr3 = cmd3.ExecuteReader(CommandBehavior.CloseConnection); GridView1.DataSource = dr3; GridView1.DataBind();

string sqlstr = \stID,score.year,score.xueQi,sum(score*xueFen) cc ,0.7*sum(score*xueFen)/sum(xueFen) dd from course ,score where course.cID=score.cID group by stID,score.year,score.xueQi) b where jifen.stID=b.stID and jifen.year=b.year and jifen.xueQi=b.xueQi \; SqlCommand cmd = new SqlCommand(sqlstr, conn); conn.Open();

cmd.ExecuteNonQuery(); conn.Close(); }

protected void Button1_Click(object sender, EventArgs e) {

string strconn = ConfigurationSettings.AppSettings[\]; SqlConnection conn = new SqlConnection(strconn); foreach (GridViewRow gvr in GridView1.Rows) {

string txtCeping = ((TextBox)gvr.Cells[0].FindControl(\)).Text; string txtJiajiang = ((TextBox)gvr.Cells[0].FindControl(\)).Text; string txtYancheng = ((TextBox)gvr.Cells[0].FindControl(\)).Text; string id = gvr.Cells[0].Text;

String sqlstr = \ + txtCeping + \ + txtJiajiang + \ + txtYancheng + \ + id + \+DropDownList1.SelectedValue+\xueQi='\+DropDownList3.SelectedValue+\;

SqlCommand cmd = new SqlCommand(sqlstr, conn); conn.Open();

cmd.ExecuteNonQuery(); conn.Close();

//Response.Write(\添加成功');\ }

//添加综合总积分

string sqlstr1 = \stID,year,xueQi,(avgScore+cePing+jiaJiang+yanCheng) bb from jifen group by

stID,year,xueQi,avgScore,cePing,jiaJiang,yanCheng) a where jifen.stID=a.stID and jifen.year=a.year and

31

陈XX:三明学院班级电子信息档案管理系统设计与实现

jifen.xueQi=a.xueQi \;

SqlCommand cmd1 = new SqlCommand(sqlstr1, conn); conn.Open();

cmd1.ExecuteNonQuery(); conn.Close(); } }

32


班级电子信息档案管理系统设计与实现毕业设计论文 - 图文(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:商业银行更名及其原因

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: