public bool ingresaDatosReunion(int idLinea, int idOrientador, int idProceso, int idPeriodo, int idTipoAsistentes, string tema, DateTime fecha, TimeSpan hora, string obs) { try { using (MERSembrarDataContext db = new MERSembrarDataContext()) { REUNION reunion = new REUNION(); reunion.IDLINEADEACCION = idLinea; reunion.IDORIENTADOR = idOrientador; reunion.IDPROCESO = idProceso; reunion.IDPERIODO = idPeriodo; reunion.IDTIPOASISTENTES = idTipoAsistentes; reunion.TEMAREUNION = tema; reunion.FECHAREUNION = fecha; reunion.HORAREUNION = hora; reunion.OBSERVACIONREUNION = obs; reunion.ESTADOREUNION = true; db.REUNION.InsertOnSubmit(reunion); db.SubmitChanges(); } return(true); } catch { return(false); } }
public bool D_modificaEstadoReunion(int id) { using (MERSembrarDataContext bd = new MERSembrarDataContext()) { try { REUNION reu = bd.REUNION.First(r => r.IDREUNION == id); reu.ESTADOREUNION = false; bd.SubmitChanges(); return(true); } catch { return(false); } } }
static clsReunion transformar(REUNION newReunion) { clsReunion reunion = new clsReunion(); reunion.Id = newReunion.IDREUNION; reunion.IdLinea = newReunion.IDLINEADEACCION; reunion.Idorientador = newReunion.IDORIENTADOR; reunion.Proceso = newReunion.IDPROCESO; reunion.idPeriodoPrograma = newReunion.IDPERIODO; reunion.TipoAsistentes = newReunion.IDTIPOASISTENTES; reunion.Tema = newReunion.TEMAREUNION; reunion.Fecha = newReunion.FECHAREUNION.ToString(); reunion.Hora = newReunion.HORAREUNION.ToString(); reunion.Estado = newReunion.ESTADOREUNION; reunion.Descripcion = newReunion.OBSERVACIONREUNION; return(reunion); }
public bool actualizarReunion(int id, string tema, DateTime fecha, TimeSpan hora) { using (MERSembrarDataContext bd = new MERSembrarDataContext()) { try { REUNION reu = bd.REUNION.First(r => r.IDREUNION == id); reu.FECHAREUNION = fecha; reu.HORAREUNION = hora; reu.TEMAREUNION = tema; bd.SubmitChanges(); return(true); } catch { return(false); } } }