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; }
public UserAccess(int id_region) { InitializeComponent(); db = new ConnectContext((new ConfigJson()).StringConnecting()); db.User_access.Local.CollectionChanged += Local_CollectionChanged; this.id_region = id_region; }
public Indicators(ref DataGridView gridSubsidiaryCompanies, ref DataGridView gridSubsidiaryCompaniesRegion) { InitializeComponent(); db = new ConnectContext((new ConfigJson()).StringConnecting()); this.gridSubsidiaryCompanies = gridSubsidiaryCompanies; this.gridSubsidiaryCompaniesRegion = gridSubsidiaryCompaniesRegion; }
public AddEmployee(int id_region) { InitializeComponent(); db = new ConnectContext((new ConfigJson()).StringConnecting()); db.Employees.Local.CollectionChanged += Local_CollectionChanged; this.id_region = id_region; }
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; }
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(); } }
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); } }
public Admin() { InitializeComponent(); db = new ConnectContext((new ConfigJson()).StringConnecting()); }
public Main(User_access user) { InitializeComponent(); db = new ConnectContext((new ConfigJson()).StringConnecting()); this.user = user; }
public Main() { InitializeComponent(); db = new ConnectContext((new ConfigJson()).StringConnecting()); db.Subsidiary_companies_region.Local.CollectionChanged += Local_CollectionChanged; }
public Indicators() { InitializeComponent(); this.db = new ConnectContext((new ConfigJson()).StringConnecting()); }