//BS架構下的非同步執行文件 public delegate void NotifyExamDelegate(int SingleCount); AsyncSendEmailToUser(0); void AsyncSendEmailToUser(int SingleCount) { NotifyE ...
//BS架構下的非同步執行文件 public delegate void NotifyExamDelegate(int SingleCount); AsyncSendEmailToUser(0); void AsyncSendEmailToUser(int SingleCount) { NotifyExamDelegate del = new NotifyExamDelegate(SendEmailToUser); IAsyncResult ar = del.BeginInvoke(SingleCount, new AsyncCallback(CallbackMethod), del); } void CallbackMethod(IAsyncResult ar) { NotifyExamDelegate del = (NotifyExamDelegate)ar.AsyncState; del.EndInvoke(ar); } public void SendEmailToUser(int num) { bool flag = bll.Insert_HR_Exam_User(); }非同步執行