110,539
社区成员
发帖
与我相关
我的任务
分享
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");