Example #1
0
 partial void UpdateAsociadosActaVisitaEE(AsociadosActaVisitaEE instance);
Example #2
0
 partial void DeleteAsociadosActaVisitaEE(AsociadosActaVisitaEE instance);
Example #3
0
 partial void InsertAsociadosActaVisitaEE(AsociadosActaVisitaEE instance);
Example #4
0
		private void detach_AsociadosActaVisitaEEs(AsociadosActaVisitaEE entity)
		{
			this.SendPropertyChanging();
			entity.Actore = null;
		}
Example #5
0
		private void detach_AsociadosActaVisitaEEs(AsociadosActaVisitaEE entity)
		{
			this.SendPropertyChanging();
			entity.NivelesEducativo = null;
		}
Example #6
0
		private void attach_AsociadosActaVisitaEEs(AsociadosActaVisitaEE entity)
		{
			this.SendPropertyChanging();
			entity.ActaVisitaEE = this;
		}
Example #7
0
        protected void AlmacenarActorActa()
        {
            int idacta = Convert.ToInt32(Session["idactaEE"]);

            ESM.Model.ESMBDDataContext db = new Model.ESMBDDataContext();
            ESM.Model.AsociadosActaVisitaEE objAsociadosActaVisitaEE = null;

            if (cboActores.SelectedItem.Value == "1")
            {
                objAsociadosActaVisitaEE = new Model.AsociadosActaVisitaEE
                {
                    IdActor = Convert.ToInt32(cboActores.SelectedItem.Value),
                    IdActaVisita = idacta,
                    Grado = txtGrado.Text,
                    Telefono = txtTelefono.Text,
                    Nombre = txtNombre.Text,
                    CorreoElectronico = txtCorreo.Text,
                    Identificacion = txtidentificacionasociado.Text.Trim().Length == 0 ? "" : txtidentificacionasociado.Text
                };
            }
            else if (cboActores.SelectedItem.Value == "3")
            {
                objAsociadosActaVisitaEE = new Model.AsociadosActaVisitaEE
                {
                    IdActor = Convert.ToInt32(cboActores.SelectedItem.Value),
                    IdActaVisita = idacta,
                    AreasEnseñansa = txtGensenanza.Text,
                    GradosEnseñansa = txtGradosEnsenanza.Text,
                    Telefono = txtTelefono.Text,
                    Nombre = txtNombre.Text,
                    CorreoElectronico = txtCorreo.Text,
                    Identificacion = txtidentificacionasociado.Text.Trim().Length == 0 ? "" : txtidentificacionasociado.Text
                };
            }
            else if (cboActores.SelectedItem.Value == "4")
            {
                objAsociadosActaVisitaEE = new Model.AsociadosActaVisitaEE
                {
                    IdActor = Convert.ToInt32(cboActores.SelectedItem.Value),
                    IdActaVisita = idacta,
                    GradoHijos = txtGradoHijos.Text,
                    Telefono = txtTelefono.Text,
                    Nombre = txtNombre.Text,
                    CorreoElectronico = txtCorreo.Text,
                    IdNivelEducativo = Convert.ToInt32(cboNivelesEducativos.SelectedValue),
                    Identificacion = txtidentificacionasociado.Text.Trim().Length == 0 ? "" : txtidentificacionasociado.Text
                };
            }
            else if (cboActores.SelectedItem.Value == "6")
            {
                objAsociadosActaVisitaEE = new Model.AsociadosActaVisitaEE
                {
                    IdActor = Convert.ToInt32(cboActores.SelectedItem.Value),
                    IdActaVisita = idacta,
                    Cargo = txtCargo.Text,
                    Telefono = txtTelefono.Text,
                    Nombre = txtNombre.Text,
                    CorreoElectronico = txtCorreo.Text,
                    Identificacion = txtidentificacionasociado.Text.Trim().Length == 0 ? "" : txtidentificacionasociado.Text
                };
            }

            db.AsociadosActaVisitaEEs.InsertOnSubmit(objAsociadosActaVisitaEE);
            try
            {
                db.SubmitChanges();
            }
            catch (Exception)
            {
                Response.Write("<script>alert('Error en BD.');</script>");
            }

            CargarActores(idacta);
        }