/*-----------------------------------------------------*/ public virtual void DeleteThirdParty(String aWfTaskAssignmentID, String aRedirectFlag) { cWfTaskAssignment aWfTaskAssgObject; cXMLDoc aXMLDoc; XmlNode aDataObjNode, aFiltersNode; cDataObject aWfTaskPerson; aWfTaskAssgObject = (cWfTaskAssignment)WebSession.DataObjectFactory.GetDataObjectFromPrimaryKey("WfTaskAssignment", aWfTaskAssignmentID); aXMLDoc = WebSession.DataObjectFactory.CreateDataObjectNode("WfTaskAssignmentPersonRelationship", out aDataObjNode, out aFiltersNode); aFiltersNode.AppendChild(WebSession.DataObjectFactory.CreateArgumentNode(aXMLDoc, "Data", "WfTaskAssignmentID", aWfTaskAssignmentID)); aWfTaskPerson = WebSession.DataObjectFactory.GetDataObject(aDataObjNode); //aWfTaskAssgObject["WfTaskStatusID"] = 3; //inactive aWfTaskAssgObject["OpenDate"] = System.DateTime.Now; WebSession.DataObjectFactory.SaveDataObject(aWfTaskAssgObject); aWfTaskAssgObject.SetWfTaskOutcome(WebSession.BuildOutcomeConfig(aWfTaskAssgObject.GetWfProjectTask())); //Delete PDFs cWfTaskAssignment aApplWfTA; cDataObjectList aDOL; aDOL = WebSession.DataObjectFactory.GetDataObjectListWithFilter("WfTaskAssignment", "GranteeProjectID", aWfTaskAssgObject.GetPropertyString("GranteeProjectID", "0"), "WfTaskRoleID", "1"); foreach (cDataObject aDO in aDOL) { if (aDO.GetRelatedPropertyInt("WfTask.WfTaskTypeID", 0) == 1) { aApplWfTA = (cWfTaskAssignment)aDO; aApplWfTA.Notify_DataModified(WebSession.DataObjectFactory, null); break; } } WebSession.DataObjectFactory.DeleteData(aWfTaskPerson); WebSession.DataObjectFactory.DeleteData("WfTaskAssignment", aWfTaskAssignmentID); WebSession.DataObjectFactory.DeleteData("PersonRelationship", aWfTaskPerson.GetPropertyString("PersonRelationshipID")); if (aRedirectFlag == "True") { ModulePage.Redirect(); } }
/*-----------------------------------------------------*/ public virtual void NotifyThirdParty(String aWfTaskAssignmentID, String aRedirectFlag) { cWfTaskAssignment aWfTaskAssgObject; aWfTaskAssgObject = (cWfTaskAssignment)WebSession.DataObjectFactory.GetDataObjectFromPrimaryKey("WfTaskAssignment", aWfTaskAssignmentID); aWfTaskAssgObject["OpenDate"] = System.DBNull.Value; aWfTaskAssgObject.SaveData(); aWfTaskAssgObject.SetWfTaskOutcome(WebSession.BuildOutcomeConfig(aWfTaskAssgObject.GetWfProjectTask())); aWfTaskAssgObject["WfTaskStatusID"] = 1; //incomplete aWfTaskAssgObject["OpenDate"] = DateTime.Now; WebSession.DataObjectFactory.SaveDataObject(aWfTaskAssgObject); WfTaskAssignmentObject.Notify_DataModified(WebSession.DataObjectFactory, null); WfTaskAssignmentObject.Notify_DataModified(WebSession.DataObjectFactory, null); if (aRedirectFlag == "True") { ModulePage.Redirect(); } }
/*-----------------------------------------------------*/ private cXMLDoc BuildOutcomeConfig() { cDataObject aWfProjectTask = WfTaskAssignmentObject.GetWfProjectTask(); return(WebSession.BuildOutcomeConfig(aWfProjectTask)); }