public void EditRecordOfMeeting(RecordOfMeeting recordOfMeeting) { using (IDataProvider provider = base.CreateDataProvider()) using (IRecordOfMeetingRepository repository = provider.CreateRecordOfMeetingRepository()) repository.Update(recordOfMeeting); }
public void EditRecordOfMeeting(RecordOfMeeting recordOfMeeting) { using (IBusinessProvider provider = base.CreateBusinessProvider()) using (IRecordOfMeetingBusinessProvider prov = provider.CreateRecordOfMeetingBusinessProvider()) prov.EditRecordOfMeeting(recordOfMeeting); }
public static void SendRecordToEmail(RecordOfMeeting recordOfMeeting, List<string> emails) { EmailBuilder.Build(emails, Localization.Meetings.RecordOfMeeting.EmailSubject, "Ata referente ao dia " + recordOfMeeting.Date.ToShortDateString() + ".", recordOfMeeting.PDFFile, recordOfMeeting.Date.ToShortDateString() + ".pdf"); }
protected virtual string ToHtml(string viewToRender, ViewDataDictionary viewData, RecordOfMeeting recordOfMeeting) { viewData.Model = recordOfMeeting; var result = ViewEngines.Engines.FindPartialView(ControllerContext, viewToRender); StringWriter output; using (output = new StringWriter()) { var viewContext = new ViewContext(ControllerContext, result.View, viewData, ControllerContext.Controller.TempData, output); result.View.Render(viewContext, output); result.ViewEngine.ReleaseView(ControllerContext, result.View); } return output.ToString(); }
public ActionResult EditRecordOfMeeting(RecordOfMeeting recordOfMeeting) { recordOfMeeting.Date = _RecordOfMeetingService.GetRecordOfMeeting(new RecordOfMeetingFilter() { Id = recordOfMeeting.Id }).Date; _RecordOfMeetingService.EditRecordOfMeeting(recordOfMeeting); return RedirectToAction("Index"); }
public ActionResult DisplayRecordOfMeeting(RecordOfMeeting recordOfMeeting) { if(recordOfMeeting.Id == 0) { List<RecordOfMeeting> recordsOfMeeting = _RecordOfMeetingService.GetRecordsOfMeetings(); if(recordsOfMeeting != null) { recordOfMeeting = recordsOfMeeting.LastOrDefault(); } } else { recordOfMeeting = _RecordOfMeetingService.GetRecordOfMeeting(new RecordOfMeetingFilter() { Id = recordOfMeeting.Id }); } ViewBag.LogedId = _Logado.Id; if(recordOfMeeting != null && recordOfMeeting.AgendaPoints != null) foreach (AgendaPoint var in recordOfMeeting.AgendaPoints) { var.PETiano = _PETianoService.GetPETiano(new Data.Fundamentals.Filters.PETianoFilter() { Id = var.PETianoId }); } if(recordOfMeeting != null && recordOfMeeting.AbsentsOrLates != null) foreach (AbsentOrLate var in recordOfMeeting.AbsentsOrLates) { var.PETiano = _PETianoService.GetPETiano(new Data.Fundamentals.Filters.PETianoFilter() { Id = var.PETianoId }); } if(recordOfMeeting != null && recordOfMeeting.CommentsOfMeeting != null) foreach (CommentOfMeeting var in recordOfMeeting.CommentsOfMeeting) { var.PETiano = _PETianoService.GetPETiano(new Data.Fundamentals.Filters.PETianoFilter() { Id = var.PETianoId }); } ViewBag.PETianos = _PETianoService.GetPETianos().Select(petiano => new SelectListItem { Text = petiano.Name + "(" + petiano.Login + ")", Value = petiano.Id.ToString() }); return PartialView(recordOfMeeting); }
public ActionResult DetailRecordOfmeeting(RecordOfMeeting recordOfMeeting) { recordOfMeeting = _RecordOfMeetingService.GetRecordOfMeeting(new RecordOfMeetingFilter() { Id = recordOfMeeting.Id }); return View(recordOfMeeting); }