private void tslAgregar_Click(object sender, EventArgs e)
        {
            frmLotesAE frm = new frmLotesAE(this);

            frm.Text = "Nuevo Lote";
            DialogResult dr = frm.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                try
                {
                    Lote lote = frm.GetLote();
                    if (!_servicio.Existe(lote))
                    {
                        _servicio.Guardar(lote);
                        DataGridViewRow r = ConstruirFila();
                        SetearFila(r, lote);
                        AñadirFila(r);
                        MessageBox.Show("Registro Agregado");
                    }
                    else
                    {
                        MessageBox.Show("Lote repetido");
                    }
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message);
                }
            }
        }
        private bool ValidarObjeto()
        {
            var valido = true;

            errorProvider1.Clear();
            if (_servicio.Existe(lote))
            {
                valido = false;
                errorProvider1.SetError(txtIdentificacion, "Lote repetido");
            }

            return(valido);
        }