Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string clearText  = textBox2.Text.Trim();
            string cipherText = CryptorEngine.Encrypt(clearText, true);

            try
            {
                DataClasses2DataContext data = new DataClasses2DataContext();

                // string Insertstatement = "Insert into Useri values('textBox1.Text', textBox2.Text,textBox3.Text,textBox4.Text)";
                //data.ExecuteQuery<Useri>(Insertstatement);

                var employee = new Useri
                {
                    Username = textBox1.Text,
                    Parola   = cipherText,
                    email    = textBox3.Text,
                    adresa   = textBox4.Text
                };
                data.Useris.InsertOnSubmit(employee);
                data.SubmitChanges();
                MessageBox.Show("User inregistrat");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #2
0
 partial void DeleteUseri(Useri instance);
Beispiel #3
0
 partial void UpdateUseri(Useri instance);
Beispiel #4
0
 partial void InsertUseri(Useri instance);