Se agrega el form de crud

This commit is contained in:
Michael Robles
2024-06-18 17:06:47 -07:00
parent cee20a613f
commit 5f6b020f61
13 changed files with 394 additions and 11 deletions
+10 -9
View File
@@ -32,6 +32,7 @@
this.panel1 = new System.Windows.Forms.Panel();
this.lblfecha = new System.Windows.Forms.Label();
this.lblhora = new System.Windows.Forms.Label();
this.horafecha = new System.Windows.Forms.Timer(this.components);
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.panel2 = new System.Windows.Forms.Panel();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
@@ -45,7 +46,6 @@
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.horafecha = new System.Windows.Forms.Timer(this.components);
this.panel1.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.panel2.SuspendLayout();
@@ -74,7 +74,7 @@
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1677, 772);
this.panel1.Size = new System.Drawing.Size(1924, 1059);
this.panel1.TabIndex = 4;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
@@ -103,6 +103,11 @@
this.lblhora.Text = "label1";
this.lblhora.Click += new System.EventHandler(this.lblhora_Click);
//
// horafecha
//
this.horafecha.Enabled = true;
this.horafecha.Tick += new System.EventHandler(this.horafecha_Tick);
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.BackgroundImage = global::compabetov2.Properties.Resources.rec;
@@ -193,6 +198,7 @@
this.button3.TabIndex = 10;
this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button5
//
@@ -285,20 +291,15 @@
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// horafecha
//
this.horafecha.Enabled = true;
this.horafecha.Tick += new System.EventHandler(this.horafecha_Tick);
//
// MenuPrincipal
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1677, 772);
this.ClientSize = new System.Drawing.Size(1924, 1059);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.IsMdiContainer = true;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "MenuPrincipal";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.MenuPrincipal_Load);
+17 -1
View File
@@ -1,4 +1,5 @@
using compabetov2.database;
using compabetov2.admin;
using compabetov2.database;
using compabetov2.database.modelos;
using System;
using System.Collections.Generic;
@@ -22,6 +23,7 @@ namespace compabetov2
{
private int childFormNumber = 0;
private LoginModel loginPrincipal;
public MenuPrincipal(LoginModel loginPrincipal)
{
InitializeComponent();
@@ -195,5 +197,19 @@ namespace compabetov2
}
private void button3_Click(object sender, EventArgs e)
{
if (loginPrincipal.tipo.Equals("empleado"))
{
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
}
else
{
crud crud = new crud();
crud.Owner = this;
crud.Show();
}
}
}
}