This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE #codes ( code VARCHAR(10)) | |
| INSERT INTO #codes( code ) | |
| SELECT distinct c.someCode FROM dbo.tbl_Sample c WITH(NOLOCK) WHERE c.isDeleted=0 AND NOT ISNULL(c.parts,'')='C' | |
| AND c.someDate1 >= @anotherDate AND c.someDate1 <= @endDate | |
| AND c.providerID IN (SELECT userId from #tmpTable) | |
| ORDER by c.someCode | |
| -- Temp table for output | |
| CREATE TABLE #tbl_Sample2 (userid INT, employee VARCHAR(200), type VARCHAR(150), results INT null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Calculate paging | |
| DECLARE @topRecord VARCHAR(20) = CAST(((@pageSize+@offset)+1) AS VARCHAR) | |
| DECLARE @cte_query NVARCHAR(MAX) | |
| SET @cte_query = WITH cte_res | |
| AS ( SELECT ROW_NUMBER() OVER(ORDER BY ['+@sortBy+'] '+@sortDir+') AS rowid, count(*) over() as TotalRecords,* from (SELECT * FROM #someTable WITH(NOLOCK)) as table1) | |
| select rowID, TotalRecords, id, someField from cte_res with(nolock) where rowid>'+ CAST(@offset AS VARCHAR) +' and rowid< ' + @topRecord | |
| EXECUTE sp_executesql @cte_query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(app) { | |
| app.controller('Ctrl', Ctrl); | |
| app.controller('CtrlModal', CtrlModal); | |
| //Ctrl.$inject = ['$scope', '$modal', 'dataservice']; | |
| function Ctrl($scope, $modal, dataservice) { | |
| var vm = this; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module("exampleApp", []).service('exampleService', ["$http", "$q" ,function ($http, $q) { | |
| var service = { | |
| returnedData: [], | |
| dataLoaded:{}, | |
| getData = function(forceRefresh) | |
| { | |
| var deferred = $q.defer(); | |
| if(!service.dataLoaded.genericData || forceRefresh) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script data-require="angular.js@*" data-semver="1.3.5" src="https://code.angularjs.org/1.3.5/angular.js"></script> | |
| <script src="https://code.angularjs.org/1.3.5/angular-route.js" data-semver="1.3.5" data-require="angular-route@*"></script> | |
| <script data-require="[email protected]" data-semver="1.3.5" src="https://code.angularjs.org/1.3.5/angular-resource.js"></script> | |
| <link href="style.css" rel="stylesheet" /> | |
| <script src="script.js"></script> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scoreInput.$inject = []; | |
| function scoreInput() { | |
| return <ng.IDirective>{ | |
| restrict: 'E', | |
| replace: true, | |
| scope: { | |
| model: '=ngModel', | |
| isRequired: '=', | |
| isReadonly: '=', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sortableGrid.$inject = []; | |
| function sortableGrid() { | |
| return <ng.IDirective>{ | |
| restrict: 'A', | |
| scope: { | |
| order: '=', | |
| by: '=', | |
| reverse: '=' | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function datepickerPopup() { | |
| return <ng.IDirective>{ | |
| restrict: 'EAC', | |
| require: 'ngModel', | |
| link: function ($scope, $element, $attrs, controller) { | |
| controller.$formatters.shift(); | |
| } | |
| } | |
| } | |
| angular.module('app').directive('datepickerPopup', datepickerPopup); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| numericOnly.$inject = ['$log']; | |
| function numericOnly( | |
| $log: ng.ILogService): ng.IDirective { | |
| return <ng.IDirective>{ | |
| restrict: 'A', | |
| scope: true, | |
| link: link | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| slider.$inject = []; | |
| function slider() { | |
| return <ng.IDirective>{ | |
| restrict: 'E', | |
| replace: true, | |
| scope: { | |
| model: '=ngModel', | |
| isRequired: '=', | |
| min: '=', |