private void btnRegistrar_Click(object sender, EventArgs e) { var register = new ClientRegister(); var client = new Client(); client.CellPhone = mskTxtCel.Text; client.City = txtCidade.Text; client.Name = txtName.Text; if (!String.IsNullOrEmpty(txtMatricula.Text)) { client.Registration = Convert.ToInt32(txtMatricula.Text); } client.State = cbEstado.Text; client.Name = txtName.Text; if (!ValidateUtil.ValidClient(client)) { lblMessage.Text = Messages.RequiredFields; } else { lblMessage.Text = register.Insert(client); dtvClient.DataSource = RefreshGrid(); CleanFields(); } }