示例#1
0
        private void FixupPersonas(Personas previousValue)
        {
            if (previousValue != null && previousValue.PersonasObservaciones.Contains(this))
            {
                previousValue.PersonasObservaciones.Remove(this);
            }

            if (Personas != null)
            {
                if (!Personas.PersonasObservaciones.Contains(this))
                {
                    Personas.PersonasObservaciones.Add(this);
                }
                if (PersonaId != Personas.PersonaId)
                {
                    PersonaId = Personas.PersonaId;
                }
            }
        }
示例#2
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            AEPDataAccess.Personas oPersona = null;
            if (Request.QueryString["PersonaId"] != null)
            {
                Persona personaMetodo = new Persona();
                oPersona = personaMetodo.GetPersona(Convert.ToInt32(Request.QueryString["PersonaId"]));
            }
            else
                oPersona = new AEPDataAccess.Personas();

            oPersona.ApellidoNombre = this.txtNombre.Text.ToUpper();
            oPersona.Domicilio = this.txtDomicilio.Text.ToUpper();
            oPersona.Telefono = this.txtTelefono.Text;
            oPersona.Email = this.txtEmail.Text;
            if (!string.IsNullOrEmpty(this.txtFechaFalle.Text))
                oPersona.FechaFallecimiento = Convert.ToDateTime(this.txtFechaFalle.Text);
            else
                oPersona.FechaFallecimiento = null;

            if (!string.IsNullOrEmpty(this.txtFechaNac.Text))
                oPersona.FechaNacimiento = Convert.ToDateTime(this.txtFechaNac.Text);
            else
                oPersona.FechaNacimiento = null;

            if (!string.IsNullOrEmpty(this.ddlEstado.SelectedValue))
                oPersona.EstadoId = Convert.ToInt32(this.ddlEstado.SelectedValue);

            oPersona.NacionalidadId = Convert.ToInt32(this.ddlNacionalidad.SelectedValue);
            if (this.ddlSexo.SelectedValue == "1")
                oPersona.Sexo = true;
            else
                oPersona.Sexo = false;
            oPersona.NroDoc = Convert.ToInt32(this.txtNroDoc.Text);
            if (!string.IsNullOrEmpty(this.ddlLocalidadResi.SelectedValue))
                oPersona.LocaResidenciaId = Convert.ToInt32(this.ddlLocalidadResi.SelectedValue);

            Estados oEstado = new Estados();

            if (Request.QueryString["PersonaId"] != null)
                new Persona().UpdatePersona(oPersona, oEstado);
            else
            {
                int numero = new Persona().SavePersona(oPersona, oEstado);
                Response.Redirect("PersonasABM.aspx?PersonaId=" + numero);
            }
        }
示例#3
0
        private void FixupPersonas1(Personas previousValue)
        {
            if (previousValue != null && previousValue.Familiares1.Contains(this))
            {
                previousValue.Familiares1.Remove(this);
            }

            if (Personas1 != null)
            {
                if (!Personas1.Familiares1.Contains(this))
                {
                    Personas1.Familiares1.Add(this);
                }
                if (TitularPersonaId != Personas1.PersonaId)
                {
                    TitularPersonaId = Personas1.PersonaId;
                }
            }
        }
示例#4
0
        private void FixupPersonas(Personas previousValue)
        {
            if (previousValue != null && previousValue.Familiares.Contains(this))
            {
                previousValue.Familiares.Remove(this);
            }

            if (Personas != null)
            {
                if (!Personas.Familiares.Contains(this))
                {
                    Personas.Familiares.Add(this);
                }
                if (ParientePersonaId != Personas.PersonaId)
                {
                    ParientePersonaId = Personas.PersonaId;
                }
            }
        }
示例#5
0
文件: Favoritos.cs 项目: GeraElem/AEP
        private void FixupPersonas(Personas previousValue)
        {
            if (previousValue != null && previousValue.Favoritos.Contains(this))
            {
                previousValue.Favoritos.Remove(this);
            }

            if (Personas != null)
            {
                if (!Personas.Favoritos.Contains(this))
                {
                    Personas.Favoritos.Add(this);
                }
                if (PersonaId != Personas.PersonaId)
                {
                    PersonaId = Personas.PersonaId;
                }
            }
            else if (!_settingFK)
            {
                PersonaId = null;
            }
        }