void Limpia_Datos_Tercero() { aa_EDireccion = new Clases.EDireccion(); aa_LEEmail = new List <Clases.EEmail>(); aa_EEmail = new Clases.EEmail(); aa_LETelefono = new List <Clases.ETelefono>(); aa_ETelefono = new Clases.ETelefono(); TNombreTercero.Text = ""; TIdentificacion.Text = ""; DT_Fecha_NAc.Value = DateTime.Today; CB_Sexo.SelectedIndex = 0; CB_TipoIdentificacion.SelectedIndex = 0; DG_Email.Rows.Clear(); DG_Telefono.Rows.Clear(); Tpais.Text = ""; Tprovincia.Text = ""; Tmunicipio.Text = ""; TDireccion.Text = ""; }
bool Inserta_Telefono() { if (DG_Telefono.RowCount - 1 <= 0) { return(true); } Error = ""; List <Clases.ETelefono> aa_LETelefono = new List <Clases.ETelefono>(); Clases.ETelefono aa_ETelefono = new Clases.ETelefono(); string Tercero = aa_ETercero.id_Tercero; for (int ii = 0; ii < DG_Telefono.RowCount - 1; ii++) { aa_ETelefono = new Clases.ETelefono(); aa_ETelefono.id_Tercero_Tel = Tercero; aa_ETelefono.Numero_Tel = DG_Telefono.Rows[ii].Cells[0].Value.ToString().Trim(); aa_ETelefono.TIPO_Tel = DG_Telefono.Rows[ii].Cells[1].Value.ToString().Trim();// SelectedText.Substring(0, SelectedText.IndexOf("-") - 1); aa_LETelefono.Add(aa_ETelefono); } if (funciones.Inserta_Telefono_Tercero(aa_LETelefono, ref Error)) { return(true); } else { if (!string.IsNullOrWhiteSpace(Error.Trim())) { MessageBox.Show(Error.ToString().Trim()); } } return(false); }