-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrmMenu.cs
138 lines (117 loc) · 3.8 KB
/
FrmMenu.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
using AulaAEDB01.Windows.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AulaAEDB01.Windows
{
public partial class FrmMenu : Form
{
public FrmMenu()
{
InitializeComponent();
Permissoes();
}
private void Permissoes()
{
if (Usuario.UsuarioLogado != null && Usuario.UsuarioLogado.TipoL != "ADM")
{
MnuUsuario.Enabled = false;
}
}
private void FrmMenu_Load(object sender, EventArgs e)
{
}
private void MnuSair_Click(object sender, EventArgs e)
{
this.Close();
Application.Exit();
}
private void MnuGenero_Click(object sender, EventArgs e)
{
FrmGenero oFrmGenero = new FrmGenero(MnuGenero, MnSGenero);
oFrmGenero.MdiParent = this;
MnuGenero.Enabled = false;
MnSGenero.Enabled = false;
oFrmGenero.Show();
}
private void MnSGenero_Click(object sender, EventArgs e)
{
MnuGenero_Click(sender, e);
}
private void MnuAula01_Click(object sender, EventArgs e)
{
FrmAula01 oFrmAula01 = new FrmAula01();
oFrmAula01.MdiParent = this;
oFrmAula01.Show();
}
private void MnuAutor_Click(object sender, EventArgs e)
{
FrmAutor oFrmAutor = new FrmAutor(MnuAutor, MnSAutor);
oFrmAutor.MdiParent = this;
MnuAutor.Enabled = false;
MnSAutor.Enabled = false;
oFrmAutor.Show();
}
private void MnSAutor_Click(object sender, EventArgs e)
{
MnuAutor_Click(sender, e);
}
private void MnSEditora_Click(object sender, EventArgs e)
{
MnuEditora_Click(sender, e);
}
private void MnuEditora_Click(object sender, EventArgs e)
{
FrmEditora oFrmEditora = new FrmEditora(MnuEditora, MnSEditora);
oFrmEditora.MdiParent = this;
MnuEditora.Enabled = false;
MnSEditora.Enabled = false;
oFrmEditora.Show();
}
private void MnuIdioma_Click(object sender, EventArgs e)
{
FrmIdioma oFrmIdioma = new FrmIdioma(MnuIdioma, MnSIdioma);
oFrmIdioma.MdiParent = this;
MnuIdioma.Enabled = false;
MnSIdioma.Enabled = false;
oFrmIdioma.Show();
}
private void MnSIdioma_Click(object sender, EventArgs e)
{
MnuIdioma_Click(sender, e);
}
private void MnuUsuario_Click(object sender, EventArgs e)
{
FrmUsuario oFrmUsuario = new FrmUsuario(MnuUsuario, MnSUsuario);
oFrmUsuario.MdiParent = this;
MnuUsuario.Enabled = false;
MnSUsuario.Enabled = false;
oFrmUsuario.Show();
}
private void MnSLivro_Click(object sender, EventArgs e)
{
MnuLivro_Click(sender, e);
}
private void MnuLivro_Click(object sender, EventArgs e)
{
FrmLivro oFrmLivro = new FrmLivro(MnuLivro, MnSLivro);
oFrmLivro.MdiParent = this;
MnuLivro.Enabled = false;
MnSLivro.Enabled = false;
oFrmLivro.Show();
}
private void Checar()
{
}
private void FrmMenu_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
}
}