ventana de datos cuenta en vender
This commit is contained in:
@@ -25,6 +25,20 @@ namespace compabetov2.Empleados
|
||||
this.ventanaPadre = ventanaPadre;
|
||||
imagePath = Path.Combine(Application.StartupPath, "Resources", "usuarios", empleado.img);
|
||||
llenarCampos();
|
||||
|
||||
txtCp.KeyPress += new KeyPressEventHandler(PermitirSoloNumeros);
|
||||
|
||||
// Suscribir al evento KeyPress para el TextBox txtNoExt
|
||||
txtNoExt.KeyPress += new KeyPressEventHandler(PermitirSoloNumeros);
|
||||
|
||||
// Suscribir al evento KeyPress para el TextBox txtNoInt
|
||||
txtNoInt.KeyPress += new KeyPressEventHandler(PermitirSoloNumeros);
|
||||
|
||||
// Suscribir al evento KeyPress para el TextBox txtNombre
|
||||
txtNombre.KeyPress += new KeyPressEventHandler(PermitirSoloLetras);
|
||||
|
||||
// Suscribir al evento KeyPress para el TextBox txtApellido
|
||||
txtApellido.KeyPress += new KeyPressEventHandler(PermitirSoloLetras);
|
||||
}
|
||||
|
||||
private void llenarCampos()
|
||||
@@ -102,5 +116,28 @@ namespace compabetov2.Empleados
|
||||
this.Close();
|
||||
|
||||
}
|
||||
private void PermitirSoloNumeros(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
// Verificar si la tecla presionada no es un número o la tecla de retroceso
|
||||
if (!char.IsDigit(e.KeyChar) && e.KeyChar != 8)
|
||||
{
|
||||
e.Handled = true; // Ignorar la tecla presionada
|
||||
|
||||
// Mostrar un mensaje indicando que solo se permiten números
|
||||
MessageBox.Show("Por favor, ingrese solo números.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void PermitirSoloLetras(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
// Verificar si la tecla presionada no es una letra o la tecla de retroceso
|
||||
if (!char.IsLetter(e.KeyChar) && e.KeyChar != 8 && e.KeyChar != 32)
|
||||
{
|
||||
e.Handled = true; // Ignorar la tecla presionada
|
||||
|
||||
// Mostrar un mensaje indicando que solo se permiten letras
|
||||
MessageBox.Show("Por favor, ingrese solo letras.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1
@@ -241,6 +241,7 @@
|
||||
this.txtTelefono.Name = "txtTelefono";
|
||||
this.txtTelefono.Size = new System.Drawing.Size(365, 55);
|
||||
this.txtTelefono.TabIndex = 56;
|
||||
this.txtTelefono.TextChanged += new System.EventHandler(this.txtTelefono_TextChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace compabetov2
|
||||
InitializeComponent();
|
||||
llenarPanel();
|
||||
this.loginPrincipal = loginPrincipal;
|
||||
|
||||
txtTelefono.KeyPress += new KeyPressEventHandler(txtTelefono_KeyPress);
|
||||
}
|
||||
|
||||
private void InitializePanelEnvio()
|
||||
@@ -417,5 +419,21 @@ namespace compabetov2
|
||||
Estadiscticas verstats = new Estadiscticas();
|
||||
verstats.Show();
|
||||
}
|
||||
|
||||
private void txtTelefono_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private void txtTelefono_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
// Verificar si la tecla presionada no es un número o la tecla de retroceso
|
||||
if (!char.IsDigit(e.KeyChar) && e.KeyChar != 8)
|
||||
{
|
||||
e.Handled = true; // Ignorar la tecla presionada
|
||||
|
||||
// Mostrar un mensaje indicando que solo se permiten números
|
||||
MessageBox.Show("Por favor, ingrese solo números en el teléfono.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+4
-4
@@ -199,7 +199,7 @@
|
||||
this.lbProductDia.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lbProductDia.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbProductDia.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.lbProductDia.Location = new System.Drawing.Point(862, 245);
|
||||
this.lbProductDia.Location = new System.Drawing.Point(781, 243);
|
||||
this.lbProductDia.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lbProductDia.Name = "lbProductDia";
|
||||
this.lbProductDia.Size = new System.Drawing.Size(210, 30);
|
||||
@@ -213,7 +213,7 @@
|
||||
this.lbVendedorDia.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lbVendedorDia.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbVendedorDia.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.lbVendedorDia.Location = new System.Drawing.Point(862, 318);
|
||||
this.lbVendedorDia.Location = new System.Drawing.Point(781, 316);
|
||||
this.lbVendedorDia.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lbVendedorDia.Name = "lbVendedorDia";
|
||||
this.lbVendedorDia.Size = new System.Drawing.Size(154, 30);
|
||||
@@ -253,7 +253,7 @@
|
||||
this.lbVendedorMes.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lbVendedorMes.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbVendedorMes.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.lbVendedorMes.Location = new System.Drawing.Point(865, 561);
|
||||
this.lbVendedorMes.Location = new System.Drawing.Point(784, 559);
|
||||
this.lbVendedorMes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lbVendedorMes.Name = "lbVendedorMes";
|
||||
this.lbVendedorMes.Size = new System.Drawing.Size(151, 30);
|
||||
@@ -267,7 +267,7 @@
|
||||
this.lbProductoMes.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lbProductoMes.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbProductoMes.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.lbProductoMes.Location = new System.Drawing.Point(865, 489);
|
||||
this.lbProductoMes.Location = new System.Drawing.Point(784, 487);
|
||||
this.lbProductoMes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lbProductoMes.Name = "lbProductoMes";
|
||||
this.lbProductoMes.Size = new System.Drawing.Size(210, 30);
|
||||
|
||||
@@ -129,6 +129,30 @@
|
||||
<metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Producto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Precio.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Cantidad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
Generated
+1
@@ -93,6 +93,7 @@
|
||||
this.txtTelefono.Name = "txtTelefono";
|
||||
this.txtTelefono.Size = new System.Drawing.Size(449, 30);
|
||||
this.txtTelefono.TabIndex = 5;
|
||||
this.txtTelefono.TextChanged += new System.EventHandler(this.txtTelefono_TextChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace compabetov2.Ventas
|
||||
this.envio = envio;
|
||||
this.detallesEnvio = detallesEnvio;
|
||||
this.ventanaPadre = ventanaPadre;
|
||||
txtTelefono.KeyPress += new KeyPressEventHandler(txtTelefono_KeyPress);
|
||||
}
|
||||
|
||||
|
||||
@@ -207,5 +208,25 @@ namespace compabetov2.Ventas
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void txtTelefono_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void txtTelefono_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
// Verificar si la tecla presionada no es un número o la tecla de retroceso
|
||||
if (!char.IsDigit(e.KeyChar) && e.KeyChar != 8)
|
||||
{
|
||||
e.Handled = true; // Ignorar la tecla presionada
|
||||
|
||||
// Mostrar un mensaje indicando que solo se permiten números
|
||||
MessageBox.Show("Por favor, ingrese solo números en el teléfono.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -715,6 +715,7 @@ namespace compabetov2
|
||||
{
|
||||
List<DetalleCuentaModel> detallesCuenta = listaProductosCuenta();
|
||||
|
||||
|
||||
if (detallesCuenta.Count > 0)
|
||||
{
|
||||
Cuenta ventaModel = new Cuenta(total);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1,5 @@
|
||||
<<<<<<< HEAD
|
||||
3f62af869539c2801b7da3577ef2feb00e7c32f1cefc777b57202fa5ad70cc96
|
||||
=======
|
||||
02f8dd8032cdd900c4c7a30e0d2445335e555a7c7084d974934c829cadebfeb5
|
||||
>>>>>>> 080e4640be9b07fc95a949fb1d8b60393000f770
|
||||
|
||||
Reference in New Issue
Block a user