Пример #1
0
        private void OperationTest(object s, LoadEndEventArgs e, string currentUrl)
        {
            lock (lockobject) {
                LogManager.WriteLog("state={0},currentUrl={1}".With(state, currentUrl));
                foreach (var operation in opsList)
                {
                    if (operation.PerviousStatus == state && currentUrl.Contains(operation.CurrentUrl))
                    {
                        LogManager.WriteLog("{2} {0} 跳转到下一个状态 {1} {3} ".With(state, operation.NextStatus, operation.index, operation.note));

                        state = operation.NextStatus;
                        ovtimeTick.Next(operation, e);//计时器重新计时
                        //记录当前注册账号的状态
                        //LogManager.LogAccontStatus("|{0}".With(state.ToString()));
                        taskRunner.LogAccontStatus("|{0}".With(state.ToString()));// MouseKeyBordHelper.CurrentIP

                        if (operation.OperationHandler != null)
                        {
                            int timeCount = RandomManager.random.Next(2, 5) * 1000;
                            LogManager.WriteLog("随机休息{0}毫秒".With(timeCount));

                            //BeginInvoke(new Action(() => {
                            new Thread(() => {
                                Thread.Sleep(timeCount);
                                try {
                                    operation.OperationHandler.Invoke(operation, e);
                                } catch (Exception e2) {
                                    LogManager.WriteLog(e2.StackTrace + e2.ToString());
                                }
                            }).Start();
                            //}));
                        }
                        break;
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 转换成字符串
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0}{1}", BusinessID.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CustomerID.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CustomerName, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", IdentityNo, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ProductType.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LoanCapital.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LoanPeriod.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LoanTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", BusinessStatus.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrBusinessStatus, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CLoanStatus.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrCLoanStatus, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LawsuitStatus.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrLawsuitStatus, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ContractNo, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", SavingCard, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", SavingUser, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LendingSideKey, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LendingSideID, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ServiceSideKey, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ServiceSideID, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", GuaranteeSideKey, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", GuaranteeSideID, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", OverAmount.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CurrentOverAmount.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", OtherAmount.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LoanKind, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LoanKindName, WebServiceConst.Separater_1);
            if (ToGuaranteeTime.HasValue)
            {
                sb.AppendFormat("{0}{1}", ToGuaranteeTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            }
            else
            {
                sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1);
            }

            if (ToLitigationTime.HasValue)
            {
                sb.AppendFormat("{0}{1}", ToLitigationTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            }
            else
            {
                sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1);
            }

            if (ClearLoanTime.HasValue)
            {
                sb.AppendFormat("{0}{1}", ClearLoanTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            }
            else
            {
                sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1);
            }
            sb.AppendFormat("{0}{1}", IsRepayment.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", FrozenNo, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ProductKind, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", LatestTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CapitalRate, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", DepositRate, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ProceduresRate, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ManagementRate, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", InterestRate, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ServiceRate, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", BranchKey, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", BranchKeyName, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", Region, WebServiceConst.Separater_1);
            sb.Append(RegionName);

            return(sb.ToString());
        }