Ejemplo n.º 1
0
 public Compositions(MySQLDriver driver)
 {
     this._SQL = driver;
     _units = new Units(_SQL);
     _materialTypes = new MaterialTypes(_SQL);
     _products = new Products(_SQL);
 }
Ejemplo n.º 2
0
 public Permissions(MySQLDriver driver)
 {
     _SQL = driver;
     _groups = new Groups(_SQL);
     _formNames = new FormNames(_SQL);
     _actionNames = new ActionNames(_SQL);
 }
Ejemplo n.º 3
0
 public ProductExports(MySQLDriver driver)
 {
     this._SQL = driver;
     _units = new Units(_SQL);
     _products = new Products(_SQL);
     _months = new Months();
     _deadlines = new Deadlines(_SQL);
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
 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;
 }
Ejemplo n.º 7
0
 public LoginForm()
 {
     InitializeComponent();
     conn = Authorization.login(AppSettings.Nick, AppSettings.Password);
     SQL = new MySQLDriver(conn);
     Auth = new Authorization(SQL);
     AppSettings.lForm = this;
     ShowInTaskbar = true;
 }
Ejemplo n.º 8
0
        public CompanyForm()
        {
            InitializeComponent();

            connector = Authorization.login(AppSettings.Nick, AppSettings.Password);
            SQL = new MySQLDriver(connector);

            Auth = new Authorization(SQL);
            refreshData();
        }
Ejemplo n.º 9
0
        public DeadlineForm()
        {
            InitializeComponent();

            errorProvider = new ErrorProvider();
            connector = Authorization.login(AppSettings.Nick, AppSettings.Password);
            SQL = new MySQLDriver(connector);
            Auth = new Authorization(SQL);

            refreshData();
        }
Ejemplo n.º 10
0
        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());
            }
        }
Ejemplo n.º 11
0
        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);
        }
Ejemplo n.º 12
0
        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");
        }
Ejemplo n.º 13
0
 public ShippingTypes(MySQLDriver driver)
 {
     this.SQL = driver;
 }
Ejemplo n.º 14
0
 public Corrections(MySQLDriver driver)
 {
     _SQL = driver;
     _materialTypes = new MaterialTypes(_SQL);
     _deadlines = new Deadlines(_SQL);
 }
Ejemplo n.º 15
0
 public Deadlines(MySQLDriver driver)
 {
     this._SQL = driver;
 }
Ejemplo n.º 16
0
        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;
        }
Ejemplo n.º 17
0
 public Companies(MySQLDriver driver)
 {
     this._SQL = driver;
 }
Ejemplo n.º 18
0
 public Groups(MySQLDriver driver)
 {
     _SQL = driver;
 }
Ejemplo n.º 19
0
 public Currencies(MySQLDriver driver)
 {
     _SQL = driver;
 }
Ejemplo n.º 20
0
 public Units(MySQLDriver driver)
 {
     this._SQL = driver;
 }
Ejemplo n.º 21
0
        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();
        }
Ejemplo n.º 22
0
 /// <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);
 }
Ejemplo n.º 23
0
        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();
        }
Ejemplo n.º 24
0
 public FormNames(MySQLDriver driver)
 {
     _SQL = driver;
 }
Ejemplo n.º 25
0
 public Products(MySQLDriver driver)
 {
     this._SQL = driver;
 }
Ejemplo n.º 26
0
 public Shippings(MySQLDriver driver)
 {
     this.SQL = driver;
     ShippingTypes = new ShippingTypes(SQL);
 }
Ejemplo n.º 27
0
        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();
        }
Ejemplo n.º 28
0
 public Users(MySQLDriver driver)
 {
     _SQL = driver;
 }
Ejemplo n.º 29
0
 public ActionNames(MySQLDriver driver)
 {
     _SQL = driver;
 }
Ejemplo n.º 30
0
 public MaterialTypes(MySQLDriver driver)
 {
     this._SQL = driver;
 }