Exemplo n.º 1
0
        /*-----------------------------------------------------*/

        public virtual void Submit_UpdateData(cXMLDoc aOutcomeConfigDoc)
        {
            cWfTaskAssignment aWfTaskAssignment = (cWfTaskAssignment)WebSession.DataObjectFactory.GetDataObjectFromPrimaryKey("WfTaskAssignment", WfTaskAssignmentID);

            aWfTaskAssignment.RaiseProcessEvents = true;     //flag to raise pre and post submission processing events
            cDataObject aSubmissionHistory = null;

            if (WebAppl.CreateSubmissionHistory)
            {
                aSubmissionHistory = WebSession.DataObjectFactory.CreateNewDataObjectFromKey("SubmissionHistory");
                aSubmissionHistory["WfTaskAssignmentID"] = WfTaskAssignmentID;
                aSubmissionHistory["WfTaskID"]           = aWfTaskAssignment.GetPropertyInt("WfTaskID");
                aSubmissionHistory["PersonID"]           = aWfTaskAssignment.GetPropertyInt("PersonID");
                //aSubmissionHistory["StartDate"] = (System.DateTime)aWfTaskAssignment.GetPropertyValue("StartDate");
                aSubmissionHistory["OpenDate"]  = aWfTaskAssignment.GetPropertyValue("OpenDate");
                aSubmissionHistory["DueDate"]   = aWfTaskAssignment.GetPropertyValue("DueDate");
                aSubmissionHistory["CloseDate"] = aWfTaskAssignment.GetPropertyValue("CloseDate");
                //aSubmissionHistory["EndDate"] = (System.DateTime)aWfTaskAssignment.GetPropertyValue("EndDate");
                aSubmissionHistory["PreWfTaskStatusID"] = aWfTaskAssignment.GetPropertyValue("WfTaskStatusID");
                aSubmissionHistory.SaveData();
            }
            aWfTaskAssignment["WfTaskStatusID"] = 2;
            aWfTaskAssignment["SubmittedDate"]  = System.DateTime.Now;
            aWfTaskAssignment["SubmittedBy"]    = WebSession.DataObjectFactory.User.UserID;
            aWfTaskAssignment["ModifyUser"]     = WebSession.DataObjectFactory.User.UserID;
            aWfTaskAssignment["ModifyDate"]     = System.DateTime.Now;
            WebSession.DataObjectFactory.SaveDataObject(aWfTaskAssignment);
            aWfTaskAssignment.RaiseProcessEvents = false;
            //Continue processing the post submission workflow tasks only if the ContinueProcessing is still true
            if (aWfTaskAssignment.ContinueProcessing)
            {
                aWfTaskAssignment.SetWfTaskOutcome(aOutcomeConfigDoc);
            }
            if (WebAppl.CreateSubmissionHistory)
            {
                aSubmissionHistory["SubmittedDate"]      = aWfTaskAssignment.GetPropertyValue("SubmittedDate");
                aSubmissionHistory["WfTaskOutcomeID"]    = aWfTaskAssignment.GetPropertyValue("WfTaskOutcomeID");
                aSubmissionHistory["PostWfTaskStatusID"] = aWfTaskAssignment.GetPropertyValue("WfTaskStatusID");
                aSubmissionHistory.SaveData();
            }
            WebSession.DataObjectFactory.CopyDataObject(aWfTaskAssignment, ((cEGUser)ModuleUser).WfTaskAssignmentObject);
        }
Exemplo n.º 2
0
        /*-----------------------------------------------------*/

        public bool Get_SubmissionModulePage_Submitted()
        {
            cWfTaskAssignment aWfTaskAssignment = (cWfTaskAssignment)WebSession.DataObjectFactory.GetDataObjectFromPrimaryKey("WfTaskAssignment", WfTaskAssignmentID);

            if (aWfTaskAssignment.GetPropertyInt("WfTaskStatusID") == 2)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }