public ICallReportVO ProcessCallReport(ICallReportVO callReport, string action)
        {
            IUserVO loginUser = UserDAO.RetrieveUserByLoginId(callReport.LastUpdateBy);

            if (callReport.Id == 0)
            {
                callReport.Owner = loginUser;
            }
            CallReportDAO.SaveCallReport(callReport);

            ITaskVO task = TaskDAO.RetrieveTaskByRefIdAndFlowType(callReport.Id, WORKFLOW_TYPE);

            if (task == null)
            {
                task = new TaskVO()
                {
                    ReferenceId = callReport.Id, WorkflowType = WORKFLOW_TYPE
                };
                task.LastUpdateBy = callReport.LastUpdateBy;
                task.Initiator    = loginUser;
            }

            task.PreviousOwner = loginUser;
            task.TaskAction    = action;

            task = WorkflowManager.ExecuteWorkflow(task, callReport.Reviewer);
            TaskDAO.SaveTask(task);

            callReport.Status            = task.TaskStatus;
            callReport.WorkflowProcessId = task.WorkflowProcessId;
            callReport.TaskStatus        = task.TaskStatus;
            callReport.CurrentRecipient  = UserDAO.RetrieveUserById(task.CurrentOwner.Id);

            return(callReport);
        }
 public ICallReportVO RetrieveCallReport(int callReportId)
 {
     return(CallReportDAO.RetrieveCallReport(callReportId));
 }