public ThreadTO(gov.va.medora.mdo.domain.sm.Thread thread) { if (thread == null) { return; } id = thread.Id; oplock = thread.Oplock; mailGroup = new TriageGroupTO(thread.MailGroup); subject = thread.Subject; messageCategory = (Int32)thread.MessageCategoryType; if (thread.Annotations != null) { annotations = new AnnotationTO[thread.Annotations.Count]; for (int i = 0; i < thread.Annotations.Count; i++) { annotations[i] = new AnnotationTO(thread.Annotations[i]); } } if (thread.Messages != null) { messages = new MessageTO[thread.Messages.Count]; for (int i = 0; i < thread.Messages.Count; i++) { messages[i] = new MessageTO(thread.Messages[i]); } } }
public TriageGroupTO(gov.va.medora.mdo.domain.sm.TriageGroup triageGroup) { if (triageGroup == null) { return; } id = triageGroup.Id; oplock = triageGroup.Oplock; name = triageGroup.Name; description = triageGroup.Description; vistaDiv = triageGroup.VistaDiv; if (triageGroup.Clinicians != null && triageGroup.Clinicians.Count > 0) { clinicians = new SmClinicianTO[triageGroup.Clinicians.Count]; for (int i = 0; i < triageGroup.Clinicians.Count; i++) { clinicians[i] = new SmClinicianTO(triageGroup.Clinicians[i]); } } if (triageGroup.Patients != null && triageGroup.Patients.Count > 0) { patients = new SmPatientTO[triageGroup.Patients.Count]; for (int i = 0; i < triageGroup.Patients.Count; i++) { patients[i] = new SmPatientTO(triageGroup.Patients[i]); } } }
public MailboxTO(gov.va.medora.mdo.domain.sm.Mailbox mailbox) { if (mailbox == null) { return; } IList<FolderTO> allFolders = new List<FolderTO>(); if (mailbox.UserFolders != null && mailbox.UserFolders.Count > 0) { for (int i = 0; i < mailbox.UserFolders.Count; i++) { allFolders.Add(new FolderTO(mailbox.UserFolders[i])); } } if (mailbox.SystemFolders != null && mailbox.SystemFolders.Count > 0) { for (int i = 0; i < mailbox.SystemFolders.Count; i++) { allFolders.Add(new FolderTO(mailbox.SystemFolders[i])); } } if (allFolders.Count > 0) { folders = new FolderTO[allFolders.Count]; allFolders.CopyTo(folders, 0); } }
public AnnotationTO(gov.va.medora.mdo.domain.sm.Annotation annotation) { if (annotation == null) { return; } id = annotation.Id; threadAnnotation = annotation.ThreadAnnotation; author = new SmUserTO(annotation.Author); }
public AttachmentTO(gov.va.medora.mdo.domain.sm.MessageAttachment messageAttachment) { if (messageAttachment == null) { return; } attachmentName = messageAttachment.AttachmentName; mimeType = messageAttachment.MimeType; attachment = messageAttachment.SmFile; this.id = messageAttachment.Id; this.oplock = messageAttachment.Oplock; }
public ActionResult Create(gov g, FormCollection f) { string Hubvalue = f["Hubs"].ToString(); if (ModelState.IsValid) { g.hub_id = int.Parse(Hubvalue); db.govs.Add(g); db.SaveChanges(); return(RedirectToAction("Index")); } return(View()); }
public ActionResult Edit(gov gov, FormCollection f) { string Hubvalue = f["Hubs"].ToString(); if (ModelState.IsValid) { gov.hub_id = int.Parse(Hubvalue); var entry = db.Entry(gov); entry.State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gov)); }