partial void UpdateAsociadosActaVisitaEE(AsociadosActaVisitaEE instance);
partial void DeleteAsociadosActaVisitaEE(AsociadosActaVisitaEE instance);
partial void InsertAsociadosActaVisitaEE(AsociadosActaVisitaEE instance);
private void detach_AsociadosActaVisitaEEs(AsociadosActaVisitaEE entity) { this.SendPropertyChanging(); entity.Actore = null; }
private void detach_AsociadosActaVisitaEEs(AsociadosActaVisitaEE entity) { this.SendPropertyChanging(); entity.NivelesEducativo = null; }
private void attach_AsociadosActaVisitaEEs(AsociadosActaVisitaEE entity) { this.SendPropertyChanging(); entity.ActaVisitaEE = this; }
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); }