public IHttpActionResult GuardarModificacionProgramacion(Competencias_Basicas oPEspecial) { try { BasicasBl oInstructorBl = new BasicasBl(); oInstructorBl.ActualizarRegistroProgramacion(oPEspecial); return(Ok(new { success = true })); } catch (Exception exc) { return(Ok(new { success = false, exc = exc.Message })); } }
public void ActualizarRegistroProgramacion(Competencias_Basicas oInstructor) { Model1 entity = new Model1(); var Item = (from i in entity.Competencias_Basicas where i.Id == oInstructor.Id select i).First(); 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.Lugar = oInstructor.Lugar; Item.Desc_Lugar = oInstructor.Desc_Lugar; Item.Dias = oInstructor.Dias; Item.Estado = true; entity.SaveChanges(); }
public IHttpActionResult GuardarProgramacion(Competencias_Basicas oCBasicas) { try { BasicasBl oProgramacionBl = new BasicasBl(); var mensaje = oProgramacionBl.GuardarProgramacion(oCBasicas); 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 bool GuardarProgramacion(Competencias_Basicas oCBasicas) { entity.Competencias_Basicas.Add(oCBasicas); entity.SaveChanges(); return(true); }