Exemplo n.º 1
0
 public void CloseInvestigation(Guid InstanceId, InvestigationDoneEventArgs args)
 {
     if (null != InvestigationDone)
     {
         InvestigationDone(null, args);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// <param name="ComplainId"></param>
        /// <param name="InvDetails"></param>
        /// <param name="InvDate"></param>
        /// <returns>InvestigationTable</returns>
        /// </summary>
        public void CompleteInvestigaton(Guid ComplainId, DateTime InvDate, string InvDetails)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;

            try
            {
                // Get the Workflow InstanceId
                Guid InstanceId = (Guid)IgrssAdapters.ComplainAdapter.GetWfIdByComplainId(ComplainId);

                // Initilize argument parameters
                InvestigationDoneEventArgs args = new InvestigationDoneEventArgs(InstanceId);
                args.InvestigationDate    = InvDate;
                args.InvestigationDetails = InvDetails;

                // Raise the event with the arguments
                WorkflowMediator.ComplainServices.CloseInvestigation(InstanceId, args);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
        }
Exemplo n.º 3
0
        private void OnInvestigationDone_Invoked(object sender, ExternalDataEventArgs e)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            InvestigationDoneEventArgs args = (InvestigationDoneEventArgs)e;

            IgrssAdapters.InvestigationAdapter.AddInvestigationDetail(Guid.NewGuid(), ComplainId, args.InvestigationDate, args.InvestigationDetails, curUser, DateTime.Now);

            // Investigation is Completed so alert the Officer who assigned the Investigation
            FeedbackData CurFeedback             = AcceptanceList[0];
            Guid         OfficeId                = CurFeedback.ForwardingOffice;
            Guid         RoleId                  = CurFeedback.Role; // new Guid("9c83ade7-74ce-448e-b57c-3f6c5a4a5569");
            string       link                    = WorkflowLinks.Default.ComplainInvestigationResult;
            Dictionary <string, object> InfoList = new Dictionary <string, object>();

            InfoList.Add("FileId", ComplainId);
            Guid GroupId = Guid.NewGuid();

            foreach (string AlertUser in WorkflowSupport.GetUserAtOfficeRole(OfficeId, RoleId))
            {
                CurFeedback.Alerts.Add(WorkflowSupport.SendAlert(curUser, AlertUser, link, "Complain Investigation Complete...", InfoList, GroupId));
            }
        }