ahi va todo fixeado por ahora faltan forms
This commit is contained in:
23
Vista/FrmCliente.Designer.cs
generated
23
Vista/FrmCliente.Designer.cs
generated
@@ -34,13 +34,14 @@ namespace Vista
|
||||
label3 = new Label();
|
||||
label4 = new Label();
|
||||
label5 = new Label();
|
||||
txtCuit = new TextBox();
|
||||
txtNombre = new TextBox();
|
||||
txtApellido = new TextBox();
|
||||
txtDireccion = new TextBox();
|
||||
txtCorreo = new TextBox();
|
||||
BtnAceptar = new Button();
|
||||
BtnCancelar = new Button();
|
||||
numCuit = new NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)numCuit).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
@@ -88,13 +89,6 @@ namespace Vista
|
||||
label5.TabIndex = 4;
|
||||
label5.Text = "Correo";
|
||||
//
|
||||
// txtCuit
|
||||
//
|
||||
txtCuit.Location = new Point(92, 21);
|
||||
txtCuit.Name = "txtCuit";
|
||||
txtCuit.Size = new Size(173, 23);
|
||||
txtCuit.TabIndex = 5;
|
||||
//
|
||||
// txtNombre
|
||||
//
|
||||
txtNombre.Location = new Point(92, 51);
|
||||
@@ -143,6 +137,14 @@ namespace Vista
|
||||
BtnCancelar.UseVisualStyleBackColor = true;
|
||||
BtnCancelar.Click += BtnCancelar_Click;
|
||||
//
|
||||
// numCuit
|
||||
//
|
||||
numCuit.Location = new Point(92, 22);
|
||||
numCuit.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||
numCuit.Name = "numCuit";
|
||||
numCuit.Size = new Size(173, 23);
|
||||
numCuit.TabIndex = 12;
|
||||
//
|
||||
// FrmCliente
|
||||
//
|
||||
AcceptButton = BtnAceptar;
|
||||
@@ -151,13 +153,13 @@ namespace Vista
|
||||
CancelButton = BtnCancelar;
|
||||
ClientSize = new Size(420, 245);
|
||||
ControlBox = false;
|
||||
Controls.Add(numCuit);
|
||||
Controls.Add(BtnCancelar);
|
||||
Controls.Add(BtnAceptar);
|
||||
Controls.Add(txtCorreo);
|
||||
Controls.Add(txtDireccion);
|
||||
Controls.Add(txtApellido);
|
||||
Controls.Add(txtNombre);
|
||||
Controls.Add(txtCuit);
|
||||
Controls.Add(label5);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(label3);
|
||||
@@ -165,6 +167,7 @@ namespace Vista
|
||||
Controls.Add(label1);
|
||||
Name = "FrmCliente";
|
||||
Text = "Form1";
|
||||
((System.ComponentModel.ISupportInitialize)numCuit).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@@ -177,13 +180,13 @@ namespace Vista
|
||||
private Label label3;
|
||||
private Label label4;
|
||||
private Label label5;
|
||||
private TextBox txtCuit;
|
||||
private TextBox txtNombre;
|
||||
private TextBox txtApellido;
|
||||
private TextBox txtDireccion;
|
||||
private TextBox txtCorreo;
|
||||
private Button BtnAceptar;
|
||||
private Button BtnCancelar;
|
||||
private NumericUpDown numCuit;
|
||||
|
||||
public EventHandler button1_Click_1 { get; private set; }
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ namespace Vista
|
||||
txtApellido.Text = cliente.Apellido;
|
||||
txtDireccion.Text = cliente.Direccion;
|
||||
txtCorreo.Text = cliente.Correo;
|
||||
txtCuit.ReadOnly = true;
|
||||
numCuit.Value = cliente.Cuit;
|
||||
numCuit.ReadOnly = true;
|
||||
|
||||
|
||||
}
|
||||
@@ -75,7 +76,7 @@ namespace Vista
|
||||
cliente = new Cliente
|
||||
{
|
||||
Nombre = txtNombre.Text,
|
||||
Cuit = txtCuit.Text,
|
||||
Cuit = long.Parse(numCuit.Value.ToString()),
|
||||
Direccion = txtDireccion.Text,
|
||||
Apellido = txtApellido.Text,
|
||||
Correo = txtCorreo.Text,
|
||||
@@ -90,7 +91,7 @@ namespace Vista
|
||||
cliente.Nombre = txtNombre.Text;
|
||||
cliente.Direccion = txtDireccion.Text;
|
||||
cliente.Correo = txtCorreo.Text;
|
||||
cliente.Cuit = txtCuit.Text;
|
||||
cliente.Cuit = long.Parse(numCuit.Text.ToString());
|
||||
msg = ControladoraClientes.Instance.Modificar(cliente);
|
||||
}
|
||||
MessageBox.Show(msg, "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
||||
22
Vista/FrmClientes.Designer.cs
generated
22
Vista/FrmClientes.Designer.cs
generated
@@ -31,7 +31,7 @@
|
||||
BtnModificar = new Button();
|
||||
BtnEliminar = new Button();
|
||||
groupBox1 = new GroupBox();
|
||||
button1 = new Button();
|
||||
BtnAceptar = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
@@ -59,7 +59,7 @@
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(button1);
|
||||
groupBox1.Controls.Add(BtnAceptar);
|
||||
groupBox1.Controls.Add(dataGridView1);
|
||||
groupBox1.Controls.Add(BtnEliminar);
|
||||
groupBox1.Controls.Add(BtnModificar);
|
||||
@@ -69,15 +69,15 @@
|
||||
groupBox1.TabIndex = 3;
|
||||
groupBox1.TabStop = false;
|
||||
//
|
||||
// button1
|
||||
// BtnAceptar
|
||||
//
|
||||
button1.Location = new Point(6, 302);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(75, 23);
|
||||
button1.TabIndex = 4;
|
||||
button1.Text = "Añadir";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
button1.Click += button1_Click;
|
||||
BtnAceptar.Location = new Point(6, 302);
|
||||
BtnAceptar.Name = "BtnAceptar";
|
||||
BtnAceptar.Size = new Size(75, 23);
|
||||
BtnAceptar.TabIndex = 4;
|
||||
BtnAceptar.Text = "Añadir";
|
||||
BtnAceptar.UseVisualStyleBackColor = true;
|
||||
BtnAceptar.Click += BtnAceptar_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
@@ -112,6 +112,6 @@
|
||||
private Button BtnEliminar;
|
||||
private GroupBox groupBox1;
|
||||
private DataGridView dataGridView1;
|
||||
private Button button1;
|
||||
private Button BtnAceptar;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace Vista
|
||||
dataGridView1.DataSource = ControladoraClientes.Instance.Listar();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
private void BtnAceptar_Click(object sender, EventArgs e)
|
||||
{
|
||||
var form = new FrmCliente();
|
||||
form.ShowDialog();
|
||||
@@ -36,7 +36,7 @@ namespace Vista
|
||||
Cliente cliente = new Cliente()
|
||||
{
|
||||
Nombre = dataGridView1.SelectedRows[0].Cells["Nombre"].Value.ToString(),
|
||||
Cuit = dataGridView1.SelectedRows[0].Cells["Cuit"].Value.ToString(),
|
||||
Cuit = (Int64)dataGridView1.SelectedRows[0].Cells["Cuit"].Value,
|
||||
Apellido = dataGridView1.SelectedRows[0].Cells["Apellido"].Value.ToString(),
|
||||
Direccion = dataGridView1.SelectedRows[0].Cells["Direccion"].Value.ToString(),
|
||||
Correo = dataGridView1.SelectedRows[0].Cells["Correo"].Value.ToString(),
|
||||
@@ -57,9 +57,9 @@ namespace Vista
|
||||
|
||||
foreach (DataGridViewRow Fila in dataGridView1.SelectedRows)
|
||||
{ // itera por un loop y elimina las lineas seleccionadas 1 a la vez.
|
||||
string devolucion = ControladoraClientes.Instance.Eliminar(long.Parse(Fila.Cells["Cuit"].Value.ToString()));
|
||||
MessageBox.Show(devolucion);
|
||||
ActualizarGrilla();
|
||||
string devolucion = ControladoraClientes.Instance.Eliminar(long.Parse(Fila.Cells["Cuit"].Value.ToString()));
|
||||
MessageBox.Show(devolucion);
|
||||
ActualizarGrilla();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user