Showing posts with label Training. Show all posts
Showing posts with label Training. Show all posts

Friday, December 11, 2015

C# Interface

This sample code is my favorite way to demonstrate how interface work, I can see students in "20483 Programming in C#" are all understand why we have to implement interface and what is the meaning of contract to the implemented classes. 
 
 
using System;

namespace ConsoleApplication1
{
   interface IDataAccess
   {     
      void SelectTop10();
   }
   class OracleDataAccess : IDataAccess
   {
      public void SelectTop10(){
        Console.WriteLine("SELECT * FROM TABLE1 WHERE ROWNUM <= 10;");
      }

   }
   class SQLDataAccess : IDataAccess
   {
      public void SelectTop10(){
        Console.WriteLine("SELECT TOP 10 * FROM TABLE1;");
      }
   }
   class Program
   {
      static void Main(string[] args)
      {
         OracleDataAccess oracle = new OracleDataAccess();
         oracle.SelectTop10();
         IDataAccess sql = new SQLDataAccess();
         sql.SelectTop10();
      }
   }
}
 
Here is the output:-
 

C# Delegate with return value

I have written another simple Delegate code to share with students in "20483 Programming in C#", this code showing the delegate with parameters and return value and how we supply the parameters and receive the return value.
 
 
using System;

namespace EventDelegatePOC
{
   delegate int MyDelegate(string s);

   class Program
   {
      static int SayHello(string HelloMessage)
      {
          Console.WriteLine("Hello {0}", HelloMessage);
          return 100;
      }
      static int SayGoodBye(string GoodbyeMessage)
      {
          Console.WriteLine("Good Bye {0}", GoodbyeMessage);
          return -999;
      }
      static void Main(string[] args)
      {
          MyDelegate x = new MyDelegate(SayHello);
          MyDelegate y = new MyDelegate(SayGoodBye);

          int a = x("President");
          int b = y("Sayonara");

          Console.WriteLine("a = {0}", a);
          Console.WriteLine("b = {0}", b);
      }
   }
}
Here is the ouput:-

C# Event Delegate Tutorial

 
Here is the simple tutorial for understanding C# Event and Delegate, I believe the code explain by itself:
 
using System;

namespace EventDelegate2
{
   delegate void MyDelegate();

   class Program
   {
      static event MyDelegate myEvent;

      static void Main(string[] args)
      {
          myEvent += new MyDelegate(Sing);
          myEvent += new MyDelegate(Dance);

          myEvent.Invoke();

      }
       
      static void Sing()
      {
          Console.WriteLine("Sing");
      }


      static void Dance()
      {
          Console.WriteLine("Dance");
      }

    }
}
 
Here is the output:
 


Thursday, July 07, 2011

10175 Lab Correction (SharePoint 2010 Application Development)

General
  1. Trainer MOC page number may different with student page number.

Lab 2


  1. There are spacing issues in Exercise 3 Task 4 PowerShell Commands, All *SP Solution commands should be corrected as *SPSolution, e.g. Add-SP Solution should be corrected as Add-SPSolution.
  2. The -GAC Deployment should be corrected as -GACDeployment

Lab 4
  1. We should remove the where clause in unfilteredJobs LINQ query from Exercise 3 Task 5 Step 12 then only step 21 All Jobs will be displayed correctly.
Lab 5
  1. The web.config never changed although the lab works as expected, this issue is caused by access denied, we have to fix it in Powershell:
    $svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
    $svc.RemoteAdministratorAccessDenied = $False
    $svc.Update()
  2. We should reference to System.Configuration to use the ConfigurationManager in Exercise 3 Task 2 Step 2.
Lab 6
  1. When you are instructed to input any object or variable name with spacing, please remove the space, example:- HR Training Management has to be input as HRTrainingManagement.

Lab 8
  1. There is a list "Mashup" is hidden, we can display it from SharePoint Designer All Files section.

Lab 10
  1. Please create a site page named Training for Exercise 2 Task 9 Step 3
  2. You may need to click the Share Documents few times to let the video thumbnails to display accordingly.
Lab 13
  1. The Microsoft Office is not activated in Hyper-V image and not able to perform Exercise 2 Task 1, workaround is to copy the Metro theme from C:\Program Files (x86)\Microsoft Office\Document Themes 14\Metro.thmx to Desktop

Thursday, October 29, 2009

Developing Business Process and Integration Solutions Using Microsoft BizTalk Server

BizTalk Server (BTS) is a great product from Microsoft and it solves a lot of integration challenges, I have shared this technology with patterns and best practices to many experience BizTalk engineers and developers at Kuala Lumpur.
Course 2933A:
Developing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006
Module 1: Introduction to BizTalk Server 2006
Module 2: Creating Schemas
Module 3: Creating Maps
Module 4: Deploying a BizTalk Project
Module 5: Routing BizTalk Messages
Module 6: Creating Pipelines
Module 7: Integrating with Adapters
Module 8: Creating a BizTalk Orchestration
Module 9: Automating Business Processes
Module 10: Creating Transactional Business Processes
Module 11: Deploying and Managing BizTalk Applications
Module 12:Integrating with Web Services
Module 13: Integrating Business Rules
Module 14: Enabling Business Activity Monitoring
Module 15: Integrating Trading Partners
http://www.metricsthatmatter.com/iversona54
https://www.metricsthatmatter.com/infotrek12