You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.9 KiB
93 lines
2.9 KiB
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Point_Of_Sale_Managment
|
|
{
|
|
public partial class UserSettingsAdminView : Form
|
|
{
|
|
Form Active;
|
|
bool adminUs = true;
|
|
public UserSettingsAdminView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Label3_Click(object sender, EventArgs e)
|
|
{
|
|
branchActive.Visible = true;
|
|
pref1Active.Visible = false;
|
|
rolesActive.Visible = false;
|
|
AdminUser adminUser = new AdminUser();
|
|
adminUser.TopLevel = false;
|
|
if (Active != null)
|
|
{
|
|
content.Controls.Remove(Active);
|
|
}
|
|
adminUs = true;
|
|
content.Controls.Add(adminUser);
|
|
Active = adminUser;
|
|
adminUser.Left = (ClientSize.Width - adminUser.Width) / 2;
|
|
adminUser.BringToFront();
|
|
adminUser.Show();
|
|
}
|
|
private void Label2_Click(object sender, EventArgs e)
|
|
{
|
|
branchActive.Visible = false;
|
|
rolesActive.Visible = false;
|
|
pref1Active.Visible = true;
|
|
users user = new users();
|
|
user.TopLevel = false;
|
|
if (Active != null)
|
|
{
|
|
content.Controls.Remove(Active);
|
|
}
|
|
content.Controls.Add(user);
|
|
adminUs = false;
|
|
Active = user;
|
|
user.BringToFront();
|
|
user.Show();
|
|
}
|
|
private void UserSettingsAdminView_Load(object sender, EventArgs e)
|
|
{
|
|
branchActive.Visible = true;
|
|
pref1Active.Visible = false;
|
|
rolesActive.Visible = false;
|
|
AdminUser adminUser = new AdminUser();
|
|
adminUser.TopLevel = false;
|
|
if (Active != null)
|
|
{
|
|
content.Controls.Remove(Active);
|
|
}
|
|
content.Controls.Add(adminUser);
|
|
Active = adminUser;
|
|
adminUser.Left = (ClientSize.Width - adminUser.Width) / 2;
|
|
adminUser.BringToFront();
|
|
adminUser.Show();
|
|
}
|
|
private void Label4_Click(object sender, EventArgs e)
|
|
{
|
|
branchActive.Visible = false;
|
|
rolesActive.Visible = true;
|
|
pref1Active.Visible = false;
|
|
UserRoles userRoles = new UserRoles();
|
|
userRoles.TopLevel = false;
|
|
if (Active != null)
|
|
{
|
|
content.Controls.Remove(Active);
|
|
}
|
|
content.Controls.Add(userRoles);
|
|
adminUs = false;
|
|
Active = userRoles;
|
|
userRoles.BringToFront();
|
|
userRoles.Show();
|
|
}
|
|
private void UserSettingsAdminView_Resize(object sender, EventArgs e)
|
|
{
|
|
if (Active != null && !adminUs)
|
|
{
|
|
Active.WindowState = FormWindowState.Normal;
|
|
Active.WindowState = FormWindowState.Maximized;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|