Ejemplo n.º 1
0
        public LoginForm_O()
        {
            InitializeComponent();
            int w = this.Size.Width;
            int h = this.Size.Height;

            label1.Location       = new Point(w / 2 - 175, label1.Location.Y);
            label2.Location       = new Point(w / 2 - 175, label2.Location.Y);
            tbxLogin.Location     = new Point(w / 2 - 175, tbxLogin.Location.Y);
            tbxPass.Location      = new Point(w / 2 - 175, tbxPass.Location.Y);
            lblPassError.Location = new Point(w / 2 - 175, lblPassError.Location.Y);
            btnEnter.Location     = new Point(w / 2 - 175, btnEnter.Location.Y);
            btn1.Location         = new Point(w / 2 - 175, btn1.Location.Y);
            btn2.Location         = new Point(w / 2 - 80, btn2.Location.Y);
            btn3.Location         = new Point(w / 2 + 15, btn3.Location.Y);
            btn4.Location         = new Point(w / 2 - 175, btn4.Location.Y);
            btn5.Location         = new Point(w / 2 - 80, btn5.Location.Y);
            btn6.Location         = new Point(w / 2 + 15, btn6.Location.Y);
            btn7.Location         = new Point(w / 2 - 175, btn7.Location.Y);
            btn8.Location         = new Point(w / 2 - 80, btn8.Location.Y);
            btn9.Location         = new Point(w / 2 + 15, btn9.Location.Y);
            btn0.Location         = new Point(w / 2 - 80, btn0.Location.Y);
            btnDel.Location       = new Point(w / 2 + 15, btnDel.Location.Y);

            DBclass DB = new Classes.DB.DBclass(new string[] { "users" });

            tbxPass.Focus();
        }
Ejemplo n.º 2
0
        private void CheckForUpdate(object argument)
        {
            DBclass dbcl = new DBclass();

            while (true)
            {
                if (haveCheck)
                {
                    while (listExpenseID.Count != 0)
                    {
                        DataTable table = new DataTable();

                        int[] expenseT = listExpenseID.Dequeue();

                        DataSetTpos.ordersRow[] ordRows = (DataSetTpos.ordersRow[])ordersTable.Select("expenseId = " + expenseT[0]);
                        ordersTableAdapter      ordDa   = new ordersTableAdapter();
                        ordDa.Update(ordRows);
                        //ordersTable.Clear();
                        switch (expenseT[1])
                        {
                        case 0:
                            dbcl.triggerExecute("ExpenseTrigger", expenseT[0]);
                            break;

                        case 1:
                            dbcl.triggerExecute("BackTrigger", expenseT[0]);
                            break;
                        }
                    }
                }

                Thread.Sleep(5000);
            }
        }