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