Ejemplo n.º 1
0
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            StudentInfo info = null;

            try
            {
                info = StudentDAL.GetStudentInfo(this.StudentID);
            }
            catch (ArgumentOutOfRangeException ex)
            {
                MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            ProfileWindow wnd = null;

            if (info.DateOfJoin.HasValue)
            {
                wnd = new ProfileWindow(info, "Grade", info.GradeName, "Date of join", info.DateOfJoin.Value.ToString());
            }
            else
            {
                wnd = new ProfileWindow(info, "Grade", info.GradeName);
            }

            wnd.FormClosed += ((o, s) =>
            {
                this.Show();
            });
            wnd.Owner = this;
            wnd.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
 private void btnMyProfile_Click(object sender, EventArgs e)
 {
     ProfileWindow wnd = new ProfileWindow(info, "Has delete rights", info.HasDeleteRights.ToString());
     wnd.FormClosed += ((o, s) =>
     {
         this.Show();
     });
     wnd.Owner = this;
     wnd.Show();
     this.Hide();
 }
Ejemplo n.º 3
0
 private void btnMyProfile_Click(object sender, EventArgs e)
 {
     TeacherInfo info = TeacherDAL.GetTeacher(TeacherID);
     ProfileWindow wnd = new ProfileWindow(info, "Category", info.Category, "Specialization", info.Specialization);
     wnd.FormClosed += ((o, s) =>
     {
         this.Show();
     });
     wnd.Owner = this;
     wnd.Show();
     this.Hide();
 }
Ejemplo n.º 4
0
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            ProfileWindow wnd = new ProfileWindow(info, "Has delete rights", info.HasDeleteRights.ToString());

            wnd.FormClosed += ((o, s) =>
            {
                this.Show();
            });
            wnd.Owner = this;
            wnd.Show();
            this.Hide();
        }
Ejemplo n.º 5
0
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            TeacherInfo   info = TeacherDAL.GetTeacher(TeacherID);
            ProfileWindow wnd  = new ProfileWindow(info, "Category", info.Category, "Specialization", info.Specialization);

            wnd.FormClosed += ((o, s) =>
            {
                this.Show();
            });
            wnd.Owner = this;
            wnd.Show();
            this.Hide();
        }
Ejemplo n.º 6
0
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            ParentInfo info = null;
            try
            {
                info = ParentDAL.GetParentInfo(this.ParentID);
            }
            catch (ArgumentOutOfRangeException ex)
            {
                MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            ProfileWindow wnd = new ProfileWindow(info, "Job", info.Job);
            wnd.FormClosed += ((o, s) =>
            {
                this.Show();
            });
            wnd.Owner = this;
            wnd.Show();
            this.Hide();
        }
Ejemplo n.º 7
0
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            ParentInfo info = null;

            try
            {
                info = ParentDAL.GetParentInfo(this.ParentID);
            }
            catch (ArgumentOutOfRangeException ex)
            {
                MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            ProfileWindow wnd = new ProfileWindow(info, "Job", info.Job);

            wnd.FormClosed += ((o, s) =>
            {
                this.Show();
            });
            wnd.Owner = this;
            wnd.Show();
            this.Hide();
        }
Ejemplo n.º 8
0
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            StudentInfo info = null;
            try
            {
                info = StudentDAL.GetStudentInfo(this.StudentID);
            }
            catch (ArgumentOutOfRangeException ex)
            {
                MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            ProfileWindow wnd = null;
            if(info.DateOfJoin.HasValue)
                wnd = new ProfileWindow(info, "Grade", info.GradeName, "Date of join", info.DateOfJoin.Value.ToString());
            else wnd = new ProfileWindow(info, "Grade", info.GradeName);

            wnd.FormClosed += ((o, s) =>
            {
                this.Show();
            });
            wnd.Owner = this;
            wnd.Show();
            this.Hide();
        }