Exemplo n.º 1
0
        public static List <ApiGetProgramsBySiteReturnModel> GetProgramsBySite(int siteID)
        {
            List <ApiGetProgramsBySiteReturnModel> _result;

            using (var db = new Data.DBMEdition01Context())
            {
                ExceptionLogServices exceptionLog = new ExceptionLogServices();
                try
                {
                    _result = db.ApiGetProgramsBySite(siteID);
                }
                catch (Exception ex)
                {
                    string sqlParam   = "ApiGetUserSites(" + siteID + ")";
                    string methodName = "JCRAPI/Business/SiteServices/GetProgramsBySite";
                    exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, siteID, 0, sqlParam, string.Empty);

                    return(null);
                }
            }

            return(_result);
        }