コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                User_access addAccess = new User_access
                {
                    login    = login.Text,
                    password = password.Text,
                    type     = type.Text,
                    status   = status.Text,
                    id_subsidiary_companies_region = this.id_region,
                    date_up = DateTime.Now
                };
                db.User_access.Add(addAccess);
                db.SaveChanges();
                refreshModel();
            }

            catch
            {
                MessageBox.Show("Заполните поля");
            }
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: ruban173/Control
 public Main(User_access user)
 {
     InitializeComponent();
     db        = new ConnectContext((new ConfigJson()).StringConnecting());
     this.user = user;
 }