Пример #1
0
        //Botón Guardar
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtIdentification.Text.Trim() != "")
            {
                newProvider.Identification = txtIdentification.Text.Trim();
                newProvider.Name           = txtName.Text.Trim();
                newProvider.Adress         = txtAddress.Text.Trim();
                newProvider.Phone          = txtPhone.Text.Trim();

                daoProvider.insertProvider(newProvider);
                CargarProveedoresGrid();

                MessageBox.Show("Proveedor creado correctamente.", "Información del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("El campo Identificacion no debe estar vacío.", "Validación del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }