Exemplo n.º 1
0
 protected void UpdateBtn_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         Admin admin = new Admin();
         admin.ID            = Int32.Parse(ID.Value.ToString());
         admin.UserName      = UserName.Text.ToString();
         admin.Password      = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text.ToString(), "MD5");
         admin.LastLoginIP   = LastLoginIP.Value.ToString();
         admin.LastLoginTime = DateTime.Parse(LastLoginTime.Value.ToString());
         AdminSystem adminSystem = new AdminSystem();
         adminSystem.Update_Admin(admin);
         Response.Write("<script>alert('修改成功');location.href='Get_admin.aspx';</script>");
     }
 }