public Empolyee(string Email, string eid, string ename, string UserType) { InitializeComponent(); Em = new EmController(); type = UserType; mail = Email; id = eid; name = ename; branchID = Em.GetBranchIDfromEmpTable(Convert.ToInt32(id)).ToString(); label1.Text = "#" + id; label2.Text = UserType; if (UserType == "Employee") { btnEmployees.Visible = false; btnViewRequests.Visible = false; btnBranches.Visible = false; btnReports.Visible = false; } else if (UserType == "Manager") { btnReports.Visible = false; btnViewRequests.Visible = false; btnBranches.Visible = false; label2.Left = 59; } else { label2.Left = 66; } BooksToBuy = new List <int>(); Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 25, 25)); PnlNav.Height = btnMainMenu.Height; PnlNav.Top = btnMainMenu.Top; PnlNav.Left = btnMainMenu.Left; //btnMainMenu.BackColor = Color.FromArgb(46, 51, 73); IbITitle.Text = "Main Menu"; this.PnlFormLoader.Controls.Clear(); MainMenuForm MainForm = new MainMenuForm(id, mail, name) { Dock = DockStyle.Fill, TopLevel = false, TopMost = true }; MainForm.FormBorderStyle = FormBorderStyle.None; this.PnlFormLoader.Controls.Add(MainForm); MainForm.Show(); }
private void btnMainMenu_Click(object sender, EventArgs e) { PnlNav.Height = btnMainMenu.Height; PnlNav.Top = btnMainMenu.Top; PnlNav.Left = btnMainMenu.Left; btnMainMenu.BackColor = Color.FromArgb(46, 51, 73); IbITitle.Text = "Main Menu"; this.PnlFormLoader.Controls.Clear(); MainMenuForm MainForm = new MainMenuForm(id, mail, name) { Dock = DockStyle.Fill, TopLevel = false, TopMost = true }; MainForm.FormBorderStyle = FormBorderStyle.None; this.PnlFormLoader.Controls.Add(MainForm); MainForm.Show(); }
private void btnMainMenu_Click(object sender, EventArgs e) { Utils.AlignNavPanel(NavigationPanel, btnMainMenu); //MainMenuForm MainForm = new MainMenuForm(); //Utils.ShowFormInPanel(this.ShowPanel, MainForm, "Main Menu", HeaderLabel); HeaderLabel.Text = "Main Menu"; this.ShowPanel.Controls.Clear(); MainMenuForm MainForm = new MainMenuForm(CustomerID.ToString(), mail, name) { Dock = DockStyle.Fill, TopLevel = false, TopMost = true }; MainForm.FormBorderStyle = FormBorderStyle.None; this.ShowPanel.Controls.Add(MainForm); MainForm.Show(); }