示例#1
0
    public static int TaskSendingNow()
    {
        Model_SendingJobItem ci = new Model_SendingJobItem();
        Model_SendingJob     c  = new Model_SendingJob();
        Model_Setting        s  = new Model_Setting();

        s = s.GetSetting();


        IList <Model_SendingJob> cl = c.GetSendingJob();

        Lock.AcquireWriterLock(Timeout.Infinite);

        SendingEngineController.Onprocess = true;
        //SendingEngineController.SendResponse = job;
        Lock.ReleaseWriterLock();


        //if (cpool.IsBusy)
        //    cpool.Shutdown();

        foreach (Model_SendingJob i in cl)
        {
            IList <Model_SendingJobItem> cil = ci.GetSendingJob(i.SDID);
            object[] parameters = new object[] { cil, s, i, HttpContext.Current };
            SendingEngineController.cpool.QueueWork(parameters, Sendnow);
            // Sendnow(parameters);
        }



        //Sendnow(parameters);
        return(1);
    }
示例#2
0
    public static IList <Model_SendingJob> GetProcessSendingAndUpdateStatus()
    {
        Model_SendingJob mj = new Model_SendingJob();

        mj.UpdateStatusMailProcess();

        return(mj.GetSendingJob());
    }