public IHttpActionResult GuardarModificacionProgramacion(Poblacion_Especial oPEspecial) { try { EspecialBl oInstructorBl = new EspecialBl(); oInstructorBl.ActualizarRegistroProgramacion(oPEspecial); return(Ok(new { success = true })); } catch (Exception exc) { return(Ok(new { success = false, exc = exc.Message })); } }
public IHttpActionResult GuardarProgramacion(Poblacion_Especial oPEspecial) { try { EspecialBl oProgramacionBl = new EspecialBl(); var mensaje = oProgramacionBl.GuardarProgramacion(oPEspecial); if (mensaje) { return(Ok(new { success = true })); } else { return(Ok(new { success = false })); } } catch (Exception exc) { return(Ok(new { success = false, exc = exc.Message })); } }
public void ActualizarRegistroProgramacion(Poblacion_Especial oInstructor) { Model1 entity = new Model1(); var Item = (from i in entity.Poblacion_Especial where i.Id == oInstructor.Id select i).First(); Item.Id = oInstructor.Id; Item.Fecha_Inicio = oInstructor.Fecha_Inicio; Item.Fecha_Final = oInstructor.Fecha_Final; Item.Hora_Inicio = oInstructor.Hora_Inicio; Item.Hora_Final = oInstructor.Hora_Final; Item.Num_Ficha = oInstructor.Num_Ficha; Item.Instructor = oInstructor.Instructor; Item.Empresa = oInstructor.Empresa; Item.Dias = oInstructor.Dias; Item.Programa = oInstructor.Programa; Item.Tipo_Curso = oInstructor.Tipo_Curso; Item.Estado = true; entity.SaveChanges(); }
public bool GuardarProgramacion(Poblacion_Especial oPEspecial) { entity.Poblacion_Especial.Add(oPEspecial); entity.SaveChanges(); return(true); }