
//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(); }