Posts

Showing posts with the label C#

Understand tiered architecture in SharePoint - C#

In this post we will learn to implement tiered architecture in a CSharp application. tiered architecture is a very famous and well known buzzword in the world of software development.  Basic Layers Presentation Layer Data Access Layer  Entity Layer  Code for Entity Layer   public class ITDRITCoordinatorsEntity     {         public int ID { get; set; }         public string Title { get; set; }         public SPFieldUserValueCollection Users { get; set; }         public ITDRITCoordinatorsEntity() { }         public ITDRITCoordinatorsEntity(int ID, string Title, SPFieldUserValueCollection Users)          {             this.ID = ID;             this.Title = Title;             thi...

Write an EventLog C# - SharePoint

# Create a new class called  Logger using System.Diagnostics;     public class Logger     {         string sSource;         string sLog;         public void EventLogWriter(string message)         {             SPSecurity.RunWithElevatedPrivileges(delegate()             {                 sSource = "SBS | Credit Approval";                 sLog = "Application";             if (!EventLog.SourceExists(sSource))               ...