示例#1
0
        public void CloseCall(string cspCookie)
        {
            try
            {
                CSPRandom ran = new CSPRandom(CloseCallList.Count);

                string postdata;
                foreach (CloseCallInfo c in CloseCallList)
                {
                    int ranIndex = ran.Next();

                    postdata = "&sle_requestno=" + c.RequestNO
                               + "&sle_requestdate=" + c.RequestDate
                               + "&sle_scheduledate=" + c.RequestDate
                               + "&sle_scheduletime=" + CallInfoTimeList[ranIndex].ScheduleTime
                               + "&sle_servedate=" + c.RequestDate
                               + "&sle_servetime1=" + CallInfoTimeList[ranIndex].ServeTime1
                               + "&sle_servetime2=" + CallInfoTimeList[ranIndex].ServeTime2
                               + "&sle_description=" + c.ServiceDescription
                               + "&sle_staff=" + CSPLoginSet.Assignto;
                    postdata = _bodyClose + postdata;
                    Close1(cspCookie, postdata);
                    PostLogOutput(c, ranIndex);
                    Thread.Sleep(500);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
        public void Run()
        {
            CSPCallInfoFromExcel csp      = new CSPCallInfoFromExcel();
            CallInfoList         listInfo = csp.GetCallList(CSPLoginSet.ExcelFile);
            CSPRandom            r        = new CSPRandom(listInfo.Count());

            for (int i = 0; i < listInfo.Count(); i++)
            {
                int j = r.Next();
                Console.WriteLine(listInfo.ContactPerson.ElementAt(j));
            }
        }