Exemplo n.º 1
0
        private void frmFolder_Load(object sender, EventArgs e)
        {
            frmPrimary frmPrimary = Application.OpenForms["frmPrimary"] as frmPrimary;

            if (frmPrimary != null)
            {
                db = frmPrimary.db;
            }
            if (UserManagement.UserSession.Type == false)
            {
                return;
            }
            if (db != null)
            {
                List <Info> lstInfo = null;
                lstInfo = db.Query <Info>("select * from tblInfo").ToList();
                if (lstInfo == null)
                {
                    lstInfo = new List <Info>();
                }
                BindingList <Info> bi = new BindingList <Info>(lstInfo);
                gridControl1.DataSource = null;
                gridControl1.DataSource = bi;
            }
        }
Exemplo n.º 2
0
        private void frmEditLink_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmPrimary frmPrimary = Application.OpenForms["frmPrimary"] as frmPrimary;

            if (frmPrimary != null)
            {
                delgRefresh delRefresh = new delgRefresh(frmPrimary.delgLoadData);
                delRefresh();
            }
        }
Exemplo n.º 3
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(txtPass.Text))
     {
         Users user = new Users();
         user.Type = false;
         UserManagement.CreateSession(user);
         frmPrimary frmprimary = new frmPrimary();
         frmprimary.Show();
         this.Hide();
     }
 }
Exemplo n.º 4
0
 private void txtPass_TextChanged(object sender, EventArgs e)
 {
     if (txtPass.Text == "798889")
     {
         Users user = new Users();
         user.Type = true;
         UserManagement.CreateSession(user);
         frmPrimary frmprimary = new frmPrimary();
         frmprimary.Show();
         this.Hide();
     }
 }
Exemplo n.º 5
0
        private void frmEditLink_Load(object sender, EventArgs e)
        {
            txtLink.Text     = Link.Link;
            txtLinkDown.Text = Link.LinkDown;
            txtDienvien.Text = Link.Dienvien;
            cbDaxem.Checked  = Link.Status;
            txtNote.Text     = Link.Note;
            frmPrimary frmPrimary = Application.OpenForms["frmPrimary"] as frmPrimary;

            if (frmPrimary != null)
            {
                db = frmPrimary.db;
            }
        }
Exemplo n.º 6
0
 private void txtPass_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode.ToString() == "Return")
     {
         if (!string.IsNullOrWhiteSpace(txtPass.Text))
         {
             Users user = new Users();
             user.Type = false;
             UserManagement.CreateSession(user);
             frmPrimary frmprimary = new frmPrimary();
             frmprimary.Show();
             this.Hide();
         }
     }
 }