Esempio n. 1
0
        public IEnumerable AddCaseActivity(PXAdapter adapter, bool IsBillable)
        {
            if (!IsCurrentRedy)
            {
                return(adapter.Get());
            }
            PrepareGraph();

            CRCaseActivityMaint graph = CreateSpecGraph <CRCaseActivityMaint>();
            CRCaseActivity      var1  = CreateSpecActivity <CRCaseActivity>();

            var1.IsBillable         = IsBillable;
            graph.Activites.Current = graph.Activites.Insert(var1);
            throw new PXPopupRedirectException(true, graph, Messages.CRCaseActivityMaint);
        }
Esempio n. 2
0
        public IEnumerable AddCaseMailActivity(PXAdapter adapter, string emailAddress)
        {
            CRCaseActivityMaint graph    = CreateSpecGraph <CRCaseActivityMaint>();
            CRCaseActivity      activity = CreateSpecActivity <CRCaseActivity>();
            CRSetup             setup    = PXSelect <CRSetup> .Select(this.Graph);

            activity.Type           = setup.EMailActivityType;
            activity.Status         = ActivityStatus.NotStarted;
            graph.Activites.Current = graph.Activites.Insert(activity);
            PXAdapter mailCreate = new PXAdapter(graph.Activites);

            mailCreate.StartRow    = 0;
            mailCreate.MaximumRows = 1;
            foreach (object e in graph.CreateMail.Press(mailCreate))
            {
                ;
            }
            if (!string.IsNullOrEmpty(emailAddress))
            {
                graph.Message.Current.MailTo = emailAddress;
            }

            throw new PXPopupRedirectException(true, graph, Messages.CRCaseActivityMaint);
        }