Exemple #1
0
    public void InitRptAudit()
    {
        WFInstanceMainService  wFInstanceMainService = new WFInstanceMainService();
        WFInstanceService      source         = new WFInstanceService();
        IList <WFInstanceMain> byInstanceCode = wFInstanceMainService.GetByInstanceCode(this.ViewState["PaymentId"]);
        List <WFInstance>      list           = new List <WFInstance>();

        foreach (WFInstanceMain im in byInstanceCode)
        {
            List <WFInstance> list2 = (
                from i in source
                where i.ID == (int?)im.ID && i.AuditResult == (int?)1
                orderby i.AuditDate descending
                select i).ToList <WFInstance>();
            foreach (WFInstance current in list2)
            {
                if ((im.ID == byInstanceCode.Last <WFInstanceMain>().ID || current.Sing.Value != -1) && !string.IsNullOrEmpty(this.GetNamePath(current.Operator)))
                {
                    list.Add(current);
                }
            }
        }
        if (list.Count > 0)
        {
            this.rptAudit.DataSource = list;
            this.rptAudit.DataBind();
        }
    }
Exemple #2
0
 private void InitialRptAudit()
 {
     try
     {
         WFInstanceMainService  wFInstanceMainService = new WFInstanceMainService();
         WFInstanceService      source         = new WFInstanceService();
         IList <WFInstanceMain> byInstanceCode = wFInstanceMainService.GetByInstanceCode(this.pcId);
         List <WFInstance>      list           = new List <WFInstance>();
         foreach (WFInstanceMain im in byInstanceCode)
         {
             List <WFInstance> list2 = (
                 from i in source
                 where i.ID == (int?)im.ID
                 orderby i.AuditDate descending
                 select i).ToList <WFInstance>();
             foreach (WFInstance current in list2)
             {
                 if (im.ID == byInstanceCode.Last <WFInstanceMain>().ID || current.Sing.Value != -1)
                 {
                     list.Add(current);
                 }
             }
         }
         if (list.Count > 0)
         {
             this.rptAudit.DataSource = list;
             this.rptAudit.DataBind();
         }
     }
     catch
     {
     }
 }
Exemple #3
0
    private void DealAgent()
    {
        WFInstanceService wFInstanceService = new WFInstanceService();
        WFInstance        byId = wFInstanceService.GetById(this.InstanceID);

        if (byId == null || !byId.NodeID.HasValue)
        {
            return;
        }
        System.Collections.Generic.IList <WFInstance> byNodeId = wFInstanceService.GetByNodeId(byId.ID.Value, byId.NodeID.Value);
        WFTemplateNodeService wFTemplateNodeService            = new WFTemplateNodeService();
        WFTemplateNode        byNodeId2 = wFTemplateNodeService.GetByNodeId(byId.NodeID.Value);

        if (byNodeId2 != null && byNodeId2.AuditorType == "1" && byNodeId.Count == 2 && this.IsAgentShip(byNodeId[0].Operator, byNodeId[1].Operator, byId.NodeID.Value))
        {
            if (byId.Operator == byNodeId[0].Operator)
            {
                wFInstanceService.Delete(byNodeId[1]);
                return;
            }
            wFInstanceService.Delete(byNodeId[0]);
        }
    }