Esempio n. 1
0
 private void StudentEdit_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (_changedOccured)
     {
         if (MessageBox.Show("Do you want to save changes?", "Save changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             SaveChanges();
         }
         else
         {
             StudentSearch frm1 = (StudentSearch)Application.OpenForms["StudentSearch"];
             frm1.LoadStudentList();
             frm1.SetDataSource();
         }
     }
 }
 private void tsStudent_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["StudentSearch"] as StudentSearch == null)
     {
         StudentSearch frm = new StudentSearch(this);
         frm.MdiParent       = this;
         frm.Dock            = DockStyle.Fill;
         frm.FormBorderStyle = FormBorderStyle.None;
         frm.Show();
     }
     else
     {
         StudentSearch frm1 = (StudentSearch)Application.OpenForms["StudentSearch"];
         frm1.Focus();
     }
 }
Esempio n. 3
0
        public override void PaintButtonBackColor()
        {
            Color  btnColor = System.Drawing.SystemColors.Control;
            Cursor cursor   = System.Windows.Forms.Cursors.Hand;

            StudentSearch dm = (StudentSearch)_form;

            foreach (Control ctrl in dm.panel2.Controls)
            {
                if (ctrl is Button)
                {
                    Button btn = (Button)ctrl;
                    base.AddButtonMouseMovement(btn);
                }
            }
            base.AddButtonMouseMovement(dm.btnClose);
        }
Esempio n. 4
0
 private void tsStudent_Click(object sender, EventArgs e)
 {
     if (!Jarvis.CurrentUser.UserHasPermissionForAction("Student", "View"))
     {
         return;
     }
     if (Application.OpenForms["StudentSearch"] as StudentSearch == null)
     {
         StudentSearch frm = new StudentSearch(this);
         frm.MdiParent       = this;
         frm.Dock            = DockStyle.Fill;
         frm.FormBorderStyle = FormBorderStyle.None;
         frm.Show();
     }
     else
     {
         StudentSearch frm1 = (StudentSearch)Application.OpenForms["StudentSearch"];
         frm1.Focus();
     }
 }