Beispiel #1
0
 public Admin(int id_region)
 {
     InitializeComponent();
     db             = new ConnectContext((new ConfigJson()).StringConnecting());
     this.id_region = id_region;
     this.Text      = db.Subsidiary_companies_region.Where(x => x.id == id_region).First().adress;
 }
Beispiel #2
0
 public UserAccess(int id_region)
 {
     InitializeComponent();
     db = new ConnectContext((new ConfigJson()).StringConnecting());
     db.User_access.Local.CollectionChanged += Local_CollectionChanged;
     this.id_region = id_region;
 }
Beispiel #3
0
 public Indicators(ref DataGridView gridSubsidiaryCompanies, ref DataGridView gridSubsidiaryCompaniesRegion)
 {
     InitializeComponent();
     db = new ConnectContext((new ConfigJson()).StringConnecting());
     this.gridSubsidiaryCompanies       = gridSubsidiaryCompanies;
     this.gridSubsidiaryCompaniesRegion = gridSubsidiaryCompaniesRegion;
 }
Beispiel #4
0
 public AddEmployee(int id_region)
 {
     InitializeComponent();
     db = new ConnectContext((new ConfigJson()).StringConnecting());
     db.Employees.Local.CollectionChanged += Local_CollectionChanged;
     this.id_region = id_region;
 }
Beispiel #5
0
 public ParamsSaleOrder(ref DataGridView grid, ref TextBox labRes, ref Chart Chart)
 {
     InitializeComponent();
     db          = new ConnectContext((new ConfigJson()).StringConnecting());
     this.grid   = grid;
     this.labRes = labRes;
     this.Chart  = Chart;
 }
Beispiel #6
0
 private void Autorization_Load(object sender, EventArgs e)
 {
     try
     {
         db   = new ConnectContext((new ConfigJson()).StringConnecting());
         user = db.User_access.Where(u => (u.login == login.Text && u.password == password.Text));
         user.ToList();
     }
     catch
     {
         MessageBox.Show("Проверьте настройки подключения к серверу БД");
         (new Configuration()).Show();
     }
 }
Beispiel #7
0
        private void button_test_connection_Click(object sender, EventArgs e)
        {
            // string strConnect = "Data Source=" + server.Text + ";Initial Catalog='" + db.Text + "';User ID=" + user.Text + ";Password="******"Подключение установлено");
                connect.Database.Connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ошибка: " + ex.Message);
            }
        }
Beispiel #8
0
 public Admin()
 {
     InitializeComponent();
     db = new ConnectContext((new ConfigJson()).StringConnecting());
 }
Beispiel #9
0
 public Main(User_access user)
 {
     InitializeComponent();
     db        = new ConnectContext((new ConfigJson()).StringConnecting());
     this.user = user;
 }
Beispiel #10
0
 public Main()
 {
     InitializeComponent();
     db = new ConnectContext((new ConfigJson()).StringConnecting());
     db.Subsidiary_companies_region.Local.CollectionChanged += Local_CollectionChanged;
 }
Beispiel #11
0
 public Indicators()
 {
     InitializeComponent();
     this.db = new ConnectContext((new ConfigJson()).StringConnecting());
 }