public Compositions(MySQLDriver driver) { this._SQL = driver; _units = new Units(_SQL); _materialTypes = new MaterialTypes(_SQL); _products = new Products(_SQL); }
public Permissions(MySQLDriver driver) { _SQL = driver; _groups = new Groups(_SQL); _formNames = new FormNames(_SQL); _actionNames = new ActionNames(_SQL); }
public ProductExports(MySQLDriver driver) { this._SQL = driver; _units = new Units(_SQL); _products = new Products(_SQL); _months = new Months(); _deadlines = new Deadlines(_SQL); }
public Transfers(MySQLDriver driver) { this._SQL = driver; _deadlines = new Deadlines(_SQL); _units = new Units(_SQL); _companies = new Companies(_SQL); _materialTypes = new MaterialTypes(_SQL); _currencies = new Currencies(_SQL); }
public Inventory(MySQLDriver driver) { _SQL = driver; _deadlines = new Deadlines(_SQL); _materialTypes = new MaterialTypes(_SQL); _units = new Units(_SQL); _companies = new Companies(_SQL); _currencies = new Currencies(_SQL); }
public Materials(MySQLDriver driver, Companies companies, Units units, Deadlines deadlines) { this._SQL = driver; _companies = companies; _units = units; _currencies = new Currencies(_SQL); _materialTypes = new MaterialTypes(_SQL); _deadlines = deadlines; }
public LoginForm() { InitializeComponent(); conn = Authorization.login(AppSettings.Nick, AppSettings.Password); SQL = new MySQLDriver(conn); Auth = new Authorization(SQL); AppSettings.lForm = this; ShowInTaskbar = true; }
public CompanyForm() { InitializeComponent(); connector = Authorization.login(AppSettings.Nick, AppSettings.Password); SQL = new MySQLDriver(connector); Auth = new Authorization(SQL); refreshData(); }
public DeadlineForm() { InitializeComponent(); errorProvider = new ErrorProvider(); connector = Authorization.login(AppSettings.Nick, AppSettings.Password); SQL = new MySQLDriver(connector); Auth = new Authorization(SQL); refreshData(); }
public ProductToMaterialForm() { InitializeComponent(); connector = Authorization.login(AppSettings.Nick, AppSettings.Password); connector.onError = new Action(() => connectorErrorHandler(connector)); SQL = new MySQLDriver(connector); List<Product> products = new Products(SQL).getList(); ((DataGridViewComboBoxColumn)dataGridView1.Columns["Product"]).Items.Clear(); foreach (Product p in products) { ((DataGridViewComboBoxColumn)dataGridView1.Columns["Product"]).Items.Add(p.ToString()); } }
public InventoryForm() { InitializeComponent(); connector = Authorization.login(AppSettings.Nick, AppSettings.Password); SQL = new MySQLDriver(connector); Inventory = new Inventory(SQL); Corrections = new Corrections(SQL); Deadlines = new Deadlines(SQL); Auth = new Authorization(SQL); dateTimePicker1.Value = DateTime.Now; resizeByDataGrid(dataGridView1); }
public SettingsForm() { InitializeComponent(); Conn = Authorization.login(AppSettings.Nick, AppSettings.Password); SQL = new MySQLDriver(Conn); Auth = new Authorization(SQL); Groups = new Groups(SQL); Permissions = new Permissions(SQL); FormNames = new FormNames(SQL); ActionNames = new ActionNames(SQL); Users = new Users(SQL); refreshTab("tabPage1"); refreshTab("tabPage2"); refreshTab("tabPage3"); }
public ShippingTypes(MySQLDriver driver) { this.SQL = driver; }
public Corrections(MySQLDriver driver) { _SQL = driver; _materialTypes = new MaterialTypes(_SQL); _deadlines = new Deadlines(_SQL); }
public Deadlines(MySQLDriver driver) { this._SQL = driver; }
private void HandleSecurity() { exIfConnector conn = Authorization.login(AppSettings.Nick, AppSettings.Password); MySQLDriver driver = new MySQLDriver(conn); Authorization Auth = new Authorization(driver); if (!Auth.HasAccess(AppSettings.User, this.Name, "Edit_DataGridView")) dataGridView1.Enabled = false; if (!Auth.HasAccess(AppSettings.User, this.Name, "Open_CompanyForm")) button1.Enabled = false; if (!Auth.HasAccess(AppSettings.User, this.Name, "Open_UnitForm")) button2.Enabled = false; if (!Auth.HasAccess(AppSettings.User, this.Name, "Open_MaterialTypeForm")) button5.Enabled = false; if (!Auth.HasAccess(AppSettings.User, this.Name, "ExportPDF")) button6.Enabled = false; if (!Auth.HasAccess(AppSettings.User, this.Name, "Open_ShippingForm")) button7.Enabled = false; }
public Companies(MySQLDriver driver) { this._SQL = driver; }
public Groups(MySQLDriver driver) { _SQL = driver; }
public Currencies(MySQLDriver driver) { _SQL = driver; }
public Units(MySQLDriver driver) { this._SQL = driver; }
public override void init(bool firstRun = true) { Status = "Připojování k databázi..."; connector = Authorization.login(AppSettings.Nick, AppSettings.Password); connector.onError = new Action(()=>connectorErrorHandler(connector)); SQL = new MySQLDriver(connector); Transfers = new Transfers(SQL); Currencies = new Currencies(SQL); ExchangeRates = new ExchangeRate("http://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt"); Status = "Inicializace..."; if (firstRun) { } List<Currency> curlst = (Currencies).getList(); if (!connector.IsConnected()) return; if (currencies != curlst) { currencies = curlst; comboBox1.Items.Clear(); ((DataGridViewComboBoxColumn)dataGridView1.Columns["CurrencyColumn"]).Items.Clear(); foreach (Currency cmpn in currencies) { ((DataGridViewComboBoxColumn)dataGridView1.Columns["CurrencyColumn"]).Items.Add(cmpn.ToString()); comboBox1.Items.Add(cmpn.ToString()); } } Status = "Stahuji aktuální kurzovní lístek ČNB..."; comboBox1.Text = "EUR"; kurz = ExchangeRates.getByDate(Currencies.getCurrency("EUR"), DateTime.Now); if (kurz == 0) MessageBox.Show("Dnešní kurzovní lístek není na webu ČNB k dispozici."); if (!connector.IsConnected()) return; textBox1.Text = kurz.ToString(); initState = true; if (!connector.IsConnected()) { handleError(); return; } reload(); refresh(); }
/// <summary> /// Creates object of Authorizaciton class and provides its nonstatic methods /// </summary> /// <param name="driver">MySQLDriver object to connect to DB server trought public exif interface.</param> public Authorization(MySQLDriver driver) { SQL = driver; _groups = new Groups(SQL); _permissions = new Permissions(SQL); }
public override void init(bool firstRun = true) { Status = "Připojování k databázi..."; connector = Authorization.login(AppSettings.Nick, AppSettings.Password); connector.onError = new Action(()=>connectorErrorHandler(connector)); SQL = new MySQLDriver(connector); ProductExports = new ProductExports(SQL); Auth = new Authorization(SQL); Status = "Inicializace..."; if (firstRun) { monthComboBox.Items.Clear(); monthComboBox.Items.AddRange(((new Months()).getList()).ToArray()); monthComboBox.Text = (new Months()).getMonth(DateTime.Now.Month).ToString(); Deadline deadline = (new Deadlines(SQL)).GetLast(); yearUpDown.Value = (deadline.EventDate.Month == 12) ? deadline.EventDate.Year + 1 : deadline.EventDate.Year; } initState = true; if (!connector.IsConnected()) { handleError(); return; } reload(); refresh(); }
public FormNames(MySQLDriver driver) { _SQL = driver; }
public Products(MySQLDriver driver) { this._SQL = driver; }
public Shippings(MySQLDriver driver) { this.SQL = driver; ShippingTypes = new ShippingTypes(SQL); }
public override void init(bool firstRun = true) { Status = "Připojování k databázi..."; connector = Authorization.login(AppSettings.Nick, AppSettings.Password); connector.onError = new Action(()=>connectorErrorHandler(connector)); SQL = new MySQLDriver(connector); Units = new Units(SQL); Auth = new Authorization(SQL); MaterialTypes = new MaterialTypes(SQL); Compositions = new Compositions(SQL); Status = "Inicializace..."; if (firstRun){} initState = true; if (!connector.IsConnected()) { handleError(); return; } reload(); refresh(); }
public Users(MySQLDriver driver) { _SQL = driver; }
public ActionNames(MySQLDriver driver) { _SQL = driver; }
public MaterialTypes(MySQLDriver driver) { this._SQL = driver; }