public virtual void TakeCase() { CRCase c = ((CRCase)(FilteredItems.Cache.Current)); c.OwnerID = EP.EmployeeMaint.GetCurrentEmployeeID(this); FilteredItems.Cache.Update(c); Save.Press(); }
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); } } }
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); }
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); }
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); } }