예제 #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();
        }
예제 #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();
 }
예제 #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();
 }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }