1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApp22222
- {
- public partial class Form3 : Form
- {
- public Form3()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- var db = new rewqEntities();
- var data = new Users
- {
- Email = textBox1.Text,
- FirstName = textBox2.Text,
- LastName = textBox3.Text,
- OfficeID = int.Parse(comboBox1.Text),
- Birthdate = DateTime.Parse(textBox4.Text),
- Password = textBox5.Text,
- RoleID = int.Parse(textBox6.Text)
- };
- db.Users.InsertOnSubmit(data);
- db.SubmitChanges();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- Close();
- }
- }
- }
|