Esempio n. 1
0
        public void SaveEvents(ReferalEventDetail model, int siteId, int studyId)
        {
            var repo = new AllRepository <ReferalEventDetail>();

            if (model.Id == 0)
            {
                repo.InsertModel(model);
            }
            else
            {
                repo.UpdateModel(model);
            }
            repo.Save();
            var value = dbContext.StudySiteReferalMappings.AsNoTracking().Where(row => row.RefrelId == model.ReferalId && row.SiteId == siteId && row.StudyId == studyId).FirstOrDefault();

            if (value != null)
            {
                value.ReferalStatusId        = model.ReferalStatusId;
                dbContext.Entry(value).State = System.Data.Entity.EntityState.Modified;
                dbContext.SaveChanges();
            }
        }
Esempio n. 2
0
 public void Save()
 {
     _context.SaveChanges();
 }