public void AddTask(T_WF_DOTASK dask) { try { EngineServicesDAL dal = new EngineServicesDAL(); if (string.IsNullOrWhiteSpace(dask.DOTASKID)) { dask.DOTASKID = Guid.NewGuid().ToString(); } if (string.IsNullOrWhiteSpace(dask.ORDERID)) { throw new Exception("单据ID不能为空"); } if (string.IsNullOrWhiteSpace(dask.RECEIVEUSERID)) { throw new Exception("接收人ID不能为空"); } TaskCache.TaskCacheReflesh(dask.RECEIVEUSERID); dal.AddTask(dask); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }