Esempio n. 1
0
        public void SaveMultiplexes(List <Multiplex> items)
        {
            foreach (var m in _db.Multiplexes)
            {
                _db.Multiplexes.DeleteOnSubmit(m);
            }
            _db.SubmitChanges();

            _db.Multiplexes.InsertAllOnSubmit(items);

            _db.SubmitChanges();
        }
Esempio n. 2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text == (string)Session["username"])
     {
         if (TextBox2.Text == (string)Session["password"])
         {
             if (TextBox2.Text != TextBox3.Text && TextBox3.Text != null)
             {
                 Ques   a       = new Ques();
                 string account = TextBox1.Text;
                 var    s       = (from r in db.Ques where r.username == account select r).First();
                 s.password = TextBox3.Text;
                 db.SubmitChanges();
                 Session["password"] = s.password;
                 this.Response.Write(" <script language=javascript>alert('修改成功!');location.href='Login.aspx';</script> ");
             }
             else
             {
                 Response.Write("新密码不能与旧密码相同");
             }
         }
         else
         {
             Response.Write("请输入正确的密码");
         }
     }
     else
     {
         Response.Write("用户名不正确!");
     }
 }
Esempio n. 3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        MovieDataContext db   = new MovieDataContext();
        Love             love = new Love();

        love.MovieId = TextBox1.Text;
        db.Love.InsertOnSubmit(love);
        db.SubmitChanges();
        Response.Write("<script type='text/javascript'>alert('收藏成功!正在跳转到登陆页面');location.href='Mylove.aspx';</script> ");
    }
Esempio n. 4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        MovieDataContext db   = new MovieDataContext();
        Ques             ques = new Ques();

        ques.username = txtName.Text;
        ques.password = txtPassword.Text;
        db.Ques.InsertOnSubmit(ques);
        db.SubmitChanges();
        Response.Write("<script type='text/javascript'>alert('注册成功!正在跳转到登陆页面');location.href='Login.aspx';</script> ");
    }