Wednesday, April 08, 2009

Overloading methods in WCF

Service oriented development is different than the Object oriented programming. Overloading methods is possible in WCF, but not recommended.

To make it work in WCF, you'll need to add Name property

[ServiceContract]
public interface ICalendarService
{
[OperationContract(Name = "GetScheduledEventsByDate")]
ScheduledEvent[] GetScheduledEvents(DateTime date);

[OperationContract(Name = "GetScheduledEventsByDateRange")]
ScheduledEvent[] GetScheduledEvents(DateTime start, DateTime end);
}

For more info: here

SQL: Return limit Rows

In the asp.net application, i found the good way to return limit rows from data table is to use the ROWCOUNT

CREATE PROCEDURE GetContacts
(
 @ModuleID int,
 @maxrows int = 0
)
AS
 SET ROWCOUNT @maxrows

 SELECT
   ItemID,
   CreatedDate,
   CreatedByUser,
   Name,
   Role,
   Email,
   Contact1,
   Contact2
 FROM
   Contacts
 WHERE
   ModuleID = @ModuleID
For more info: http://authors.aspalliance.com/stevesmith/articles/sprowcount.asp

Wednesday, April 01, 2009

Change the author initial when review comments

  1. On the Review tab, in the Tracking group, click the arrow next to Track Changes, and then click Change User Name.
  2. Click Popular.
  3. Under Personalize your copy of Office, change the name or initials that you want to use in your own comments.