Esempio n. 1
0
        public List <ApiTracersBySiteProgramStatusReturnModel> GetTracersBySiteProgramStatus(int?programID, int?siteID, int?statusID, int?userID)
        {
            List <ApiTracersBySiteProgramStatusReturnModel> _result;

            try {
                using (var db = new Data.DBMEdition01Context()) {
                    _result = db.ApiTracersBySiteProgramStatus(siteID, programID, statusID, userID);
                }
                return(_result);
            }
            catch (Exception ex) {
                StringBuilder sb = new StringBuilder();
                // Fix for Bug 55857. Previous code had programID and siteID variables in reverse order.
                sb.AppendFormat("EXEC dbo.apiTracersBySiteProgramStatus @ProgramID='{0}', @SiteID={1}, @StatusID={2}, @UserID={3}", programID, siteID, statusID, userID);
                string sqlParam   = sb.ToString();
                string methodName = "JCRAPI/Business/TracerService/GetTracersBySiteProgramStatus";
                exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, null, siteID, sqlParam, string.Empty);
                return(null);
            }
        }