Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            RegisterEntities db = new RegisterEntities();

            User objuse = new User();

            objuse.Email      = TextBox3.Text;
            objuse.First_name = TextBox1.Text;
            objuse.Last_name  = TextBox2.Text;
            objuse.Password   = TextBox4.Text;
            objuse.Username   = TextBox5.Text;

            db.SaveChanges();
        }
Exemplo n.º 2
0
        //AddCard func
        protected void regbtn_Click(object sender, EventArgs e)
        {
            RegisterEntities db = new RegisterEntities();

            Credit_Card objuse = new Credit_Card();

            objuse.Email              = UID.Text;
            objuse.Card_number        = Convert.ToInt32(ccNumber.Text);
            objuse.Security_code      = Convert.ToInt32(CCW.Text);
            objuse.Expiration_date    = Convert.ToDateTime(cExpDate.Text);
            objuse.Card_holder_s_name = cHolder.Text;
            objuse.Username           = UName.Text;

            db.SaveChanges();

            //con.Open();
            //SqlCommand cmd = new SqlCommand("insert into Credit Card values('"+UID.Text+"','"+Convert.ToInt32(ccNumber.Text)+"','"+Convert.ToInt32(CCW.Text)+"','" + Convert.ToDateTime(cExpDate.Text) +"', '"+cHolder.Text+"','" +UName.Text+"')", con);
        }