Esempio n. 1
0
 public subjectForm()
 {
     InitializeComponent();
     try
     {
         db = new WFPL_Db();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
        public CredForm()
        {
            InitializeComponent();
            try
            {
                db = new WFPL_Db();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            FormBorderStyle = FormBorderStyle.FixedDialog;
            StartPosition   = FormStartPosition.CenterScreen;
            MaximizeBox     = false;
            MinimizeBox     = false;
        }
Esempio n. 3
0
        public LogIn()
        {
            InitializeComponent();
            try
            {
                db = new WFPL_Db();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            try
            {
                if (db.getLastUser() != null)
                {
                    textBoxUser.Text = db.getLastUser().name;
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            monthCalendar1.MaxDate = DateTime.Now;
            //var user = new Subject { name = "oop", surname = "", ID = 1, isLast = 1 };// e sad vidji samo sta ti je islast i id  i prezime :) jer ovo bi puklo, users je set User klase, tako da si pokusao dodati subject
            //db.Users.Add(user);
            //db.SaveChanges();

            currentTableListState = new TableList();
            //currentTableListState.getCurrentList();

            api = new Api(this);
            string res = api.apiTest1();

            MessageBox.Show(res, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }