private CustomerCallNotesViewModel GetCustomerCallNotesViewModel(CustomerCallNotes notes, string createdBy) { return(new CustomerCallNotesViewModel { CreatedBy = createdBy, DateCreated = notes.DataRecorderMetaData.DateCreated, Notes = notes.Notes, EventId = notes.EventId, NotesType = notes.NotesType, Reason = notes.ReasonId.HasValue ? ((LeftWithoutScreeningReason)notes.ReasonId.Value).GetDescription() : string.Empty }); }
public CustomerCallNotes SaveCustomerNotes(long customerId, long eventId, string notes, long createdByOrgRoleUserId, CustomerRegistrationNotesType notesType, long?reasonId = null) { var customerRegistrationNotes = new CustomerCallNotes { CustomerId = customerId, EventId = eventId > 0 ? eventId : (long?)null, Notes = notes, NotesType = notesType, ReasonId = reasonId, DataRecorderMetaData = new DataRecorderMetaData { DateCreated = DateTime.Now, DataRecorderCreator = new OrganizationRoleUser(createdByOrgRoleUserId) } }; customerRegistrationNotes = _customerNotesRepository.Save(customerRegistrationNotes); return(customerRegistrationNotes); }
private void SaveRegistrationNotes(long customerId, string notes, long organizationRoleUserId) { if (customerId <= 0) { return; } var customerRegistrationNotes = new CustomerCallNotes { CustomerId = customerId, EventId = null, Notes = notes, NotesType = CustomerRegistrationNotesType.AppointmentNote, DataRecorderMetaData = new DataRecorderMetaData { DateCreated = DateTime.Now, DataRecorderCreator = new OrganizationRoleUser(organizationRoleUserId) } }; _customerCallNotesRepository.Save(customerRegistrationNotes); }
protected void ImgBtnFinish_Click(object sender, ImageClickEventArgs e) { if (CustomerId > 0 && !(string.IsNullOrWhiteSpace(txtnotes.Text))) { var currentUser = IoC.Resolve <ISessionContext>().UserSession; var customerRegistrationNotes = new CustomerCallNotes { CustomerId = CustomerId, EventId = EventId > 0 ? (long?)EventId : null, Notes = txtnotes.Text, NotesType = CustomerRegistrationNotesType.AppointmentNote, DataRecorderMetaData = new DataRecorderMetaData { DateCreated = DateTime.Now, DataRecorderCreator = new OrganizationRoleUser(currentUser.CurrentOrganizationRole.OrganizationRoleUserId) } }; var customerRegistrationNotesRepository = IoC.Resolve <IUniqueItemRepository <CustomerCallNotes> >(); customerRegistrationNotesRepository.Save(customerRegistrationNotes); LogAudit(ModelType.Edit, customerRegistrationNotes, CustomerId); } var eventId = EventId; RegistrationFlow = null; if (eventId > 0) { Response.RedirectUser("/Scheduling/EventCustomerList/Index?id=" + eventId); } else { Response.RedirectUser("/Scheduling/Event/Index?showUpcoming=true"); } }