Exemplo n.º 1
0
        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 = "";
        }
Exemplo n.º 2
0
        bool Inserta_Email()
        {
            if (DG_Email.RowCount - 1 <= 0)
            {
                return(true);
            }
            Error = "";
            List <Clases.EEmail> aa_LEEmail = new List <Clases.EEmail>();

            Clases.EEmail aa_EEmail = new Clases.EEmail();
            string        Tercero   = aa_ETercero.id_Tercero;

            for (int ii = 0; ii < DG_Email.RowCount - 1; ii++)
            {
                aa_EEmail = new Clases.EEmail();

                aa_EEmail.id_Tercero_Email = Tercero;
                aa_EEmail.Email            = DG_Email.Rows[ii].Cells[0].Value.ToString().Trim();
                aa_EEmail.TIPO_Email       = DG_Email.Rows[ii].Cells[1].Value.ToString().Trim();
                aa_LEEmail.Add(aa_EEmail);
            }

            if (aa_EEmail.id_Tercero_Email.ToString().Trim() == "")
            {
                return(true);
            }

            if (funciones.Inserta_Email_Tercero(aa_LEEmail, ref Error))
            {
                return(true);
            }
            else
            {
                if (!string.IsNullOrWhiteSpace(Error.Trim()))
                {
                    MessageBox.Show(Error.ToString().Trim());
                }
            }
            return(false);
        }