日期:2014-05-18 浏览次数:21025 次
SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); conn.Open(); DateTime jinctime = DateTime.Parse(txtbirthday.Text.Trim()); string str_up = "update person set name='"+txtname.Text+"',birthday='"+jinctime +"',sex='"+txtsex.Text+"',major='"+txtmajor.Text+"',dept='"+txtdept.Text+"',email='"+txtemail.Text+"',sj='"+txtsj.Text+"',gddh='"+txtgddh.Text+"',qq='"+txtqq.Text+"',yx='"+txtyx.Text+"', xlxxxdz='"+txtxlxxxdz.Text+"',jtxxdz='"+txtjtxxdz.Text+"',jtlxfs='"+txtjtlxfs.Text+"',bynf='"+txtbynf.Text+"',yzxrzqk='"+txtyzxrzqk.Text+"',zxsxzy='"+txtzxsxzy.Text+"',fdy='"+txtfdy.Text+"',xjydw='"+txtxjydw.Text+"',dwxxdz='"+txtdwxxdz.Text+"',dwlxfs='"+txtdwlxfs.Text+"',bz='"+txtbz.Text+"' where username='"+username+"'"; SqlCommand sl = new SqlCommand(str_up,conn); sl.ExecuteNonQuery(); conn.Close(); //Maticsoft.BLL.person bll = new Maticsoft.BLL.person(); //bll.Update(str_up); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "../xinxi_new.aspx");