public void Delete(long studentPracticeFileId) { var model = _context.ScholarshipProgramTracingStudentPracticeFile.Find(studentPracticeFileId); model.StatusId = StatusValues.Eliminado; _context.ScholarshipProgramTracingStudentPracticeFile.Update(model); _context.SaveChanges(); }
public void Remover(int id) { var ScholarshipProgramTracingCourse = GetById(id); ScholarshipProgramTracingCourse.StatusId = 2; _context.ScholarshipProgramTracingCourse.Update(ScholarshipProgramTracingCourse); _context.SaveChanges(); }
//.Include(x => x.CreationUser) //.Include(x => x.UpgradeUser); public void CambiarEstado(long agremmentId, string estado) { var now = DateTime.Now; var estatusId = estado == "Completado" ? StatusValues.Completado : estado == "Pendiente" ? StatusValues.Pendiente : StatusValues.Anulado; var agreement = _context.ScholarshipProgramUniversityAgreement.Find(agremmentId); agreement.StatusId = estatusId; _context.ScholarshipProgramUniversityAgreement.Update(agreement); _context.SaveChanges(); }
public void Save(Comment model) { var now = DateTime.Today; if (model.CommentId != 0) { _context.Comment.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Pendiente; _context.Add(model); } _context.SaveChanges(); }
public void Save(ScholarshipProgramTracingAgreementFile model) { var now = DateTime.Now; if (model.ScholarshipProgramTracingAgreementFileId != 0) { model.UpgradeDate = now; _context.ScholarshipProgramTracingAgreementFile.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(TeacherFile model) { var now = DateTime.Now; if (model.TeacherFileId != 0) { model.UpgradeDate = now; _context.TeacherFile.Update(model); } else { model.StatusId = StatusValues.Activo; model.CreationDate = now; _context.Add(model); } _context.SaveChanges(); }
public void Save(Report model) { var now = DateTime.Now; var estadoActivo = 1; if (model.ReportId != 0) { model.UpgradeDate = now; _context.Report.Update(model); } else { model.StatusId = estadoActivo; model.CreationDate = now; _context.Add(model); } _context.SaveChanges(); }
public void Save(SubjectMatter model) { if (model.SubjectMatterId != 0) { _context.SubjectMatter.Update(model); } else { _context.Add(model); } _context.SaveChanges(); }
public void Save(ScholarshipProgramUniversity model) { if (model.ScholarshipProgramUniversityId != 0) { _context.ScholarshipProgramUniversity.Update(model); } else { _context.Add(model); } _context.SaveChanges(); }
public void Save(User model) { if (model.UserId != 0) { _cotext.User.Update(model); } else { _cotext.Add(model); } _cotext.SaveChanges(); }
public void Save(Teacher model) { if (model.TeacherId != 0) { _context.Teacher.Update(model); } else { _context.Add(model); } _context.SaveChanges(); }
public void Save(AgentType model) { if (model.AgentTypeId != 0) { _context.AgentType.Update(model); } else { _context.Add(model); } _context.SaveChanges(); }
public void Save(University data) { if (data.UniversityId != 0) { _context.University.Update(data); } else { _context.Add(data); } _context.SaveChanges(); }
public void GuardarScholarshipProgram(ScholarshipProgram model) { if (model.ScholarshipProgramId != 0) { _context.ScholarshipProgram.Update(model); } else { _context.Add(model); } //_context.Add(model); _context.SaveChanges(); }
public void Save(ScholarshipProgramUniversitySubjectMatter model) { var now = DateTime.Now; if (model.ScholarshipProgramUniversitySubjectMatterId != 0) { _context.ScholarshipProgramUniversitySubjectMatter.Update(model); } else { model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(ComponentFileType model) { var now = DateTime.Now; if (model.ComponentFileTypeId != 0) { model.UpgradeDate = now; _context.ComponentFileTypes.Update(model); } else { model.CreationDate = now; _context.Add(model); } _context.SaveChanges(); }
public void Save(TracingStudyPlanDevelopment model) { var now = DateTime.Now; if (model.Id != 0) { model.UpgradeDate = now; _context.TracingStudyPlanDevelopment.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(User model) { var now = DateTime.Now; if (model.UserId != 0) { model.UpgradeDate = now; _cotext.User.Update(model); } else { model.CreationDate = now; _cotext.Add(model); } _cotext.SaveChanges(); }
public void Save(ScholarshipProgramUniversity model) { var now = DateTime.Now; if (model.ScholarshipProgramUniversityId != 0) { model.UpgradeDate = now; _context.ScholarshipProgramUniversity.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(Contact model) { var now = DateTime.Now; if (model.ContactId != 0) { model.UpgradeDate = now; _context.Contact.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(University data) { var now = DateTime.Now; if (data.UniversityId != 0) { data.UpgradeDate = now; _context.University.Update(data); } else { data.CreationDate = now; data.StatusId = StatusValues.Activo; _context.Add(data); } _context.SaveChanges(); }
public void GuardarScholarshipProgram(ScholarshipProgram model) { var now = DateTime.Now; if (model.ScholarshipProgramId != 0) { model.UpgradeDate = now; _context.ScholarshipProgram.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } //_context.Add(model); _context.SaveChanges(); }
public void Save(ScholarshipProgramTracingStudentPractice model) { var now = DateTime.Now; if (model.Id != 0) { var currentData = _context.ScholarshipProgramTracingStudentPractice.Find(model.Id); model.UpgradeDate = now; //_context.ScholarshipProgramTracingStudentPractice.Update(model); _context.Entry(currentData).CurrentValues.SetValues(model); _context.Entry(currentData).State = EntityState.Modified; } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(AgreementWithInstitutionsRelatedToCurricularActivities model) { var now = DateTime.Now; if (model.AgreementWithInstitutionsRelatedToCurricularActivitiesId != 0) { model.UpgradeDate = now; _context.AgreementWithInstitutionsRelatedToCurricularActivities.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(File model) { var now = DateTime.Now; if (model.FileId != 0) { var currentData = _context.File.Find(model.FileId); model.UpgradeDate = now; model.UpgradeDate = now; _context.Entry(currentData).CurrentValues.SetValues(model); _context.Entry(currentData).State = EntityState.Modified; } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(ResultsFromThePreviousPeriod model) { var now = DateTime.Now; if (model.PreviousPeriodId != 0) { var currentData = _context.ResultsFromThePreviousPeriod.Find(model.PreviousPeriodId); model.UpgradeDate = now; _context.Entry(currentData).CurrentValues.SetValues(model); _context.Entry(currentData).State = EntityState.Modified; } else { model.StatusId = StatusValues.Activo; model.CreationDate = now; _context.Add(model); } _context.SaveChanges(); }
public void Save(ScholarshipProgramTracingPracticePlanning model) { var now = DateTime.Now; var stactusActivate = 1; if (model.Id != 0) { var currentData = _context.ScholarshipProgramTracingPracticePlanning.Find(model.Id); model.UpgradeDate = now; _context.Entry(currentData).CurrentValues.SetValues(model); _context.Entry(currentData).State = EntityState.Modified; } else { model.CreationDate = now; model.StatusId = stactusActivate; _context.Add(model); } _context.SaveChanges(); }
public void Save(SubjectMatter model) { var now = DateTime.Now; if (model.SubjectMatterId != 0) { model.UpgradeDate = now; if (model.TracingStudyPlanDevelopment.TeacherId == 0) { model.TracingStudyPlanDevelopment.TeacherId = null; } _context.SubjectMatter.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }
public void Save(ScholarshipProgramTracing model) { var now = DateTime.Today; var date = model.EndDate - now; if (model.ScholarshipProgramTracingId != 0) { if (date.Value.TotalDays > 0) { model.StatusId = StatusValues.Activo; } model.UpgradeDate = now; _context.ScholarshipProgramTracing.Update(model); } else { model.CreationDate = now; model.StatusId = StatusValues.Activo; _context.Add(model); } _context.SaveChanges(); }