コード例 #1
0
        private void InitilizeInstance_ExecuteCode(object sender, System.EventArgs e)
        {
            XmlDocument WfInfo = new XmlDocument();
            IgrssAdapters.ComplainAdapter.UpdateWorkflowDetails(this.WorkflowInstanceId, WfInfo.OuterXml, ComplainId);

            // Load the Complain ProcessFlow for the current Office
            OfficeProcess_LKPTableAdapter adapter = new OfficeProcess_LKPTableAdapter();
            XmlDocument process = new XmlDocument();
            DataRow dr = adapter.GetProcessDetails(ComplainOffice, "COM").Rows[0];
            process.LoadXml((string) dr["Data"]);

            // Read and Assign the list of users who will accept the complain
            string filter = "Process/VerificationList/Item";
            XmlNodeList AcceptenceNodes = process.SelectNodes(filter);
            AcceptanceList = new List<FeedbackData>();
            foreach (XmlElement item in AcceptenceNodes)
            {
                OfficesCommunication_LKPTableAdapter comAdapter = new OfficesCommunication_LKPTableAdapter();
                DataTable dt = comAdapter.GetCommunicationOfficeByKey(ComplainOffice, item.Attributes["ForwardingOffice"].Value);
                if (dt.Rows.Count > 0)
                {
                    AcceptanceList.Add(new FeedbackData(ComplainOffice, (Guid) dt.Rows[0]["CommunicatingOffice"], new Guid(item.Attributes["Role"].Value)));
                }
            }
        }
コード例 #2
0
        private void InitilizeFlow_ExecuteCode(object sender, System.EventArgs e)
        {
            // Update the Workflow details in RefundApplication Table
            XmlDocument WfInfo = new XmlDocument();
            IgrssAdapters.RefundApplicationAdapter.UpdateRefundWfDetails(this.WorkflowInstanceId, WfInfo.OuterXml,this.RefundId);

            VerificationList = new List<FeedbackData>();
            ApprovalList = new List<FeedbackData>();

            // Get the Process Flow for the current office
            OfficeProcess_LKPTableAdapter adapter = new OfficeProcess_LKPTableAdapter();
            XmlDocument process = new XmlDocument();
            DataRow dr = adapter.GetProcessDetails(InitiatingOffice, "REF").Rows[0];
            process.LoadXml((string) dr["Data"]);

            // Read and Assign the verification process data to lists
            XmlNodeList VerificationItems = process.SelectNodes("Process/VerificationList/Item");
            foreach (XmlElement item in VerificationItems)
            {
                OfficesCommunication_LKPTableAdapter comAdapter = new OfficesCommunication_LKPTableAdapter();
                DataTable dt = comAdapter.GetCommunicationOfficeByKey(InitiatingOffice, item.Attributes["ForwardingOffice"].Value);
                if (dt.Rows.Count > 0)
                {
                    VerificationList.Add(new FeedbackData(InitiatingOffice, (Guid) dt.Rows[0]["CommunicatingOffice"], new Guid(item.Attributes["Role"].Value)));
                }
            }

            // Read and Assign the approval process data to lists
            XmlNodeList ApprovalItems = process.SelectNodes("Process/ApprovalList/Item");
            foreach (XmlElement item in ApprovalItems)
            {
                OfficesCommunication_LKPTableAdapter comAdapter = new OfficesCommunication_LKPTableAdapter();
                DataTable dt = comAdapter.GetCommunicationOfficeByKey(InitiatingOffice, item.Attributes["ForwardingOffice"].Value);
                if (dt.Rows.Count > 0)
                {
                    ApprovalList.Add(new FeedbackData(InitiatingOffice, (Guid) dt.Rows[0]["CommunicatingOffice"], new Guid(item.Attributes["Role"].Value)));
                }
            }
        }