Example #1
0
    private string GetPageDuringInfo(int during, int InstanceID, Guid InstanceCode)
    {
        string    result        = "";
        DataTable lastAuditUser = FlowAuditAction.GetLastAuditUser(InstanceID);

        if (lastAuditUser.Rows.Count > 0)
        {
            DateTime value    = Convert.ToDateTime(lastAuditUser.Rows[0]["AuditDate"]);
            TimeSpan timeSpan = DateTime.Now.Subtract(value);
            int      num      = timeSpan.Days * 24 + timeSpan.Hours - 4;
            if (num > 0)
            {
                result = "超时";
            }
            else
            {
                result = "";
            }
        }
        else
        {
            string startDateTime = FlowAuditAction.GetStartDateTime(InstanceCode);
            if (startDateTime != "")
            {
                DateTime value     = Convert.ToDateTime(startDateTime);
                TimeSpan timeSpan2 = DateTime.Now.Subtract(value);
                int      num2      = timeSpan2.Days * 24 + timeSpan2.Hours - 4;
                if (num2 > 0)
                {
                    result = "超时";
                }
                else
                {
                    result = "";
                }
            }
        }
        return(result);
    }