Example #1
0
        protected void newapplications_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            var user = db.user_datas.FirstOrDefault(a => a.id == Int32.Parse(Session["User"].ToString()));

            game g = new game();
            g.Api_path = "";
            g.Name = TxtNewGme.Text;
            db.games.InsertOnSubmit(g);

            g.UserID = user.id;
            db.SubmitChanges();
        }
Example #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();

            suggestion su = new suggestion();

               su.message_box = TextBoxmessage.Text;
            su.Full_name = TextBoxCont_Name.Text;
               su.Email = TextBoxContEmail.Text;
            su.user_id = db.user_datas.FirstOrDefault(a => a.id == Int32.Parse(Session["User"].ToString())).id;
            var user= db.user_datas.FirstOrDefault(a => a.id == Int32.Parse(Session["User"].ToString())).first_name;

            db.suggestions.InsertOnSubmit(su);
               db.SubmitChanges();
        }
Example #3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            user_data us = new user_data();
            var ug = new user_game();

                us.first_name = TextBoxName.Text;
            us.last_name = TextBoxLast_N.Text;
            us.user_email = TextBoxEmail.Text;
            us.user_password = TextBoxPassword.Text;
            us.user_c_password = TextBoxconfirmpass.Text;
            us.user_application = TextBoxApp_Name.Text;
            //ug.game_id = db.games.Where(x => x.Name == TextBoxApp_Name.Text).FirstOrDefault();

            db.user_datas.InsertOnSubmit(us);
            db.SubmitChanges();
            Session["User"] = us.id;
            Response.Redirect("Log.aspx");
        }