public virtual void TakeCase()
        {
            CRCase c = ((CRCase)(FilteredItems.Cache.Current));

            c.OwnerID = EP.EmployeeMaint.GetCurrentEmployeeID(this);
            FilteredItems.Cache.Update(c);
            Save.Press();
        }
예제 #2
0
        protected virtual void Contact_BAccountID_FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e)
        {
            Contact contact = (Contact)e.Row;

            if (contact.BAccountID != (int?)e.NewValue && contact.ContactID > 0)
            {
                CRCase        crCase = Cases.SelectSingle();
                CROpportunity op     = Opportunities.SelectSingle();
                if (crCase != null || op != null)
                {
                    throw new PXSetPropertyException(Messages.CannotChangeBAccount);
                }
            }
        }
예제 #3
0
        protected void escalateL3()
        {
            CRCase row = Base.CaseCurrent.Current;

            if (row == null)
            {
                return;
            }

            IPEscalationItem graph = PXGraph.CreateInstance <IPEscalationItem>();

            //graph.Item.Current = graph.Item.Insert();
            graph.Case.Current = row;
            PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.Popup);
        }
예제 #4
0
        private bool CanDelete(CRCaseClass row)
        {
            if (row != null)
            {
                CRCase c = PXSelect <CRCase,
                                     Where <CRCase.caseClassID, Equal <Required <CRCase.caseClassID> > > > .
                           SelectWindowed(this, 0, 1, row.CaseClassID);

                if (c != null)
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #5
0
        protected virtual void CRCaseClass_PerItemBilling_FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e)
        {
            CRCaseClass row = e.Row as CRCaseClass;

            if (row == null)
            {
                return;
            }

            CRCase crCase = PXSelect <CRCase, Where <CRCase.caseClassID, Equal <Required <CRCaseClass.caseClassID> >,
                                                     And <CRCase.isBillable, Equal <True>,
                                                          And <CRCase.released, Equal <False> > > > > .SelectWindowed(this, 0, 1, row.CaseClassID);

            if (crCase != null)
            {
                throw new PXSetPropertyException(Messages.CurrentClassHasUnreleasedRelatedCases, PXErrorLevel.Error);
            }
        }