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
| public class SessionWrapper | |
| { | |
| private static HttpSessionState Session | |
| { | |
| get | |
| { | |
| if (HttpContext.Current == null) | |
| { | |
| throw new ApplicationException("No Http Context, No Session to Get!"); | |
| } |
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
| <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10"> | |
| <Fields> | |
| <asp:NumericPagerField ButtonType="Link" /> | |
| </Fields> | |
| </asp:DataPager> |
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
| public static List<Employee> GetEmployessFromDepartment(int departmentID) | |
| { | |
| var searchResults = new List<Employee>(); | |
| using (var entities = new EFEntities()) | |
| { | |
| try | |
| { | |
| searchResults = (from a in entities.SelectEmployeeByDepartment(departmentID) | |
| select (new Employee() |
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
| ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(Button1); |
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
| try | |
| { | |
| using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.RequiresNew, transOptions)) | |
| { | |
| // EF calls here | |
| transaction.Complete(); | |
| } | |
| } | |
| catch | |
| { |
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
| <rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="100%" SizeToReportContent="True" /> |
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
| alert(Object.keys(arrayName).length); |
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
| <div id="menu" ng-mouseover="openMenu()" ng-mouseleave="checkCloseMenu()"> | |
| </div> |
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
| var clientContext = new SP.ClientContext("/"); | |
| var web = clientContext.get_web(); | |
| var list = web.get_lists().getByTitle("List Name"); | |
| var camlQuery = new SP.CamlQuery(); | |
| camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'FieldName\'/><Value Type=\'Text\'>X</Value></Eq></Where></Query></View>'); | |
| var items = list.getItems(camlQuery); | |
| clientContext.load(items); | |
| clientContext.executeQueryAsync(functionSuccess(), functionFailure); |
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
| Add-PSSnapin Microsoft.SharePoint.PowerShell | |
| [Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges( | |
| { | |
| $site = SPSite("http://siteurl/") | |
| $web = $site.RootWeb | |
| $spList = $web.Lists["List Name"] | |
| $spFieldType = [Microsoft.SharePoint.SPFieldType]::Boolean | |
| $spList.Fields.Add("Field Name",$spFieldType,$false) | |
| $spList.Update() |
OlderNewer