This file contains 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
$(document).ready(function () { | |
// code to run on document ready | |
}); |
This file contains 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
$.ajax({ | |
url: window.webRoot + 'Validations/SaveValidation', | |
data: JSON.stringify({data}), | |
type: "post", | |
contentType: "application/json", | |
success: function (resultData) { | |
// code to execute on success | |
} | |
}); |
This file contains 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
$("#divID").dialog({ | |
title: 'Modal Window Title', | |
height: 250, | |
width: 650, | |
modal: true, | |
buttons: { | |
'OK': function () { | |
$(this).dialog('close'); | |
} //Ok | |
}//buttons |
This file contains 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
@{ | |
var grid = new WebGrid(Model, canSort: true, canPage: false, defaultSort: "Column1Value"); | |
} | |
@grid.GetHtml( | |
columns: grid.Columns( | |
grid.Column("Column1Value", "Column 1 Heading", canSort: true), | |
grid.Column("Column2Value", "Column 2 Heading", canSort: true), | |
grid.Column("Actions", | |
format: @<text> | |
@Html.ActionLink("Action Link 1 Text", "ActionLink1Command") | |
This file contains 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
notes: default paging rows is 10, allow paging and allow sort is default = true. all attributes listed below are optional. a standard generic (auto gen col=true) can be called with a simple @grid.GetHtml() | |
@grid.GetHtml( | |
fillEmptyRows: true, | |
alternatingRowStyle: "alternate-row", | |
headerStyle: "grid-header", | |
footerStyle: "grid-footer", | |
mode: WebGridPagerModes.All, | |
firstText: "<< First", | |
previousText: "< Prev", |
This file contains 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
SET NOCOUNT ON; | |
-- User Preferences | |
DECLARE @prefix varchar(5); | |
SET @prefix = 'usp_'; | |
-- End User Preferences | |
-- Create CRUD procedures | |
DECLARE DBtables CURSOR FOR SELECT name FROM sysobjects WHERE xtype = 'u' AND name != 'sysdiagrams' |
This file contains 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
' sample reporting server url http://MyServer/ReportServer/ReportService.asmx | |
Private Sub LoadSampleReports() | |
Dim rs As New ReportingService | |
rs.Credentials = System.Net.CredentialCache.DefaultCredentials | |
Dim item As CatalogItem | |
For Each item In rs.ListChildren("/SampleReports", False) | |
If item.Type = ItemTypeEnum.Report Then | |
DropDownList1.Items.Add(New ListItem(item.Name, item.Path)) |
This file contains 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
declare @RowCount int, @tablename varchar(100) | |
declare @Tables table ( | |
PK int IDENTITY(1,1), | |
tablename varchar(100), | |
processed bit | |
) | |
INSERT into @Tables (tablename) | |
SELECT TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_TYPE = 'BASE TABLE' and TABLE_NAME not like 'dt%' order by TABLE_NAME asc | |
declare @Space table ( | |
name varchar(100), rows nvarchar(100), reserved varchar(100), data varchar(100), index_size varchar(100), unused varchar(100) |