private int IsHasRedException() { CRSMEmailMaint graph = (CRSMEmailMaint)this.ds.DataGraph; if (graph.Email.Current == null) { return(2); } else if (String.IsNullOrEmpty(graph.Email.Current.Exception)) { return(1); } return(0); }
static void DeleteMessage(IEnumerable <SMEmail> messages) { foreach (SMEmail message in messages) { if (message.RefNoteID != message.NoteID) { CREmailActivityMaint graphCR = CreateInstance <CREmailActivityMaint>(); graphCR.Message.Current = graphCR.Message.Search <CRSMEmail.noteID>(message.RefNoteID); graphCR.Delete.Press(); } else { CRSMEmailMaint graphSM = CreateInstance <CRSMEmailMaint>(); graphSM.Email.Current = graphSM.Email.Search <SMEmail.noteID>(message.NoteID); graphSM.Delete.Press(); } } }
protected IEnumerable viewDetails(PXAdapter adapter) { SMEmail item = FilteredItems.Current; if (item != null) { if (item.RefNoteID != null) { CREmailActivityMaint graph = CreateInstance <CREmailActivityMaint>(); graph.Message.Current = graph.Message.Search <CRSMEmail.noteID>(item.RefNoteID); PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.NewWindow); } else { CRSMEmailMaint graph = CreateInstance <CRSMEmailMaint>(); graph.Email.Current = graph.Email.Search <SMEmail.noteID>(item.NoteID); PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.NewWindow); } } return(adapter.Get()); }
public virtual void editRecord() { SMEmail item = Emails.Current; if (item == null) { return; } if (item.RefNoteID != item.NoteID) { CREmailActivityMaint graph = CreateInstance <CREmailActivityMaint>(); graph.Message.Current = graph.Message.Search <CRSMEmail.noteID>(item.RefNoteID); PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.InlineWindow); } else { CRSMEmailMaint graph = CreateInstance <CRSMEmailMaint>(); graph.Email.Current = graph.Email.Search <SMEmail.noteID>(item.NoteID); PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.InlineWindow); } }