Tuesday, June 16, 2009
Scheduling Custom Timer Jobs
SPDailySchedule dailySchedule = new SPDailySchedule();
dailySchedule.BeginHour = 0;
dailySchedule.BeginMinute = 0;
dailySchedule.BeginSecond = 0;
dailySchedule.EndHour = 23;
dailySchedule.EndMinute = 59;
dailySchedule.EndSecond = 59;
job.Schedule = dailySchedule;
That tells SharePoint to run the job any time between 00:00:00 (12:00
AM) and 23:59:59 (11:59 PM) each day. You can make this window shorter
if you need to schedule it during off-peak hours.
You can also run the job hourly using this code:
SPHourlySchedule hourlySchedule = new SPHourlySchedule();
hourlySchedule.BeginMinute = 0;
hourlySchedule.EndMinute = 59;
job.Schedule = hourlySchedule;
Or every X number of minutes using this code:
SPMinuteSchedule minuteSchedule = new SPMinuteSchedule();
minuteSchedule.BeginSecond = 0;
minuteSchedule.EndSecond = 59;
minuteSchedule.Interval = X;
job.Schedule = minuteSchedule;
The Interval is only available on the SPMinuteSchedule class. Setting
it to 15 will run the job every 15 minutes for example.
Friday, June 5, 2009
Clinic 5045: Inside Look at Developing with WSS 3.0
At the end of the course, students will be able to:
- Describe Site and Workspace management and Document storage.
- Describe Integration with ASP.NET and Microsoft Office SharePoint Server 2007.
- Describe Sites, Lists, Content Types and Collaborative features.
- Describe Programming with WSS and using the WSS Event model.
- Describe the Property Bag and Change Log.
- Describe SharePoint Pages, Master Pages and Content Pages.
- Describe Custom Views and Templates.
- SharePoint Designer
- Describe Web parts and Workflow support.
- Describe the Administrative object model.
- Describe how to create deployable Windows SharePoint Services-based solutions.
- Describe the Feature framework.
- Describe the Solution deloyment model.
Monday, May 25, 2009
myrampup.com
from lurking within one of the blogs i have recently started to follow, i discovered this online university offering some free courses, sometimes also known as "clinics", about the many development tools, programming languages, databases, operating systems, collaboration tools and presentation frameworks Microsoft has made available to the IT world. all you need is a Windows Live ID in order to sign-up.
most courses come with a price tag ranging from $30 to around $200, but some fortunately, are being offered for FREE. i signed up to a few which i thought would be beneficial to what i am trying to do: gain more knowledge about the MOSS 2007 platform which means understanding also the frameworks from which it was built upon (ASP.NET 2.0 and WSS 3.0) and the database system it uses for storing user content and application pages, the same system it relies upon in displaying more intelligent reports to the audience (MS SQL Server).
im currently taking "Clinic 5045: Inside Look at Developing with Microsoft® Windows® SharePoint® Services 3.0" and so far, im happy. i love that the content loads fast and are 80% narrated and that tool demos are available. the self-test makes the learning process exciting as well. i love that they are broken down into short-term, 2 to 6 hour courses making the completion of the course not too impossible. i love that the text can be copied from the transcripts. i love that the course teaches me the fundamentals and have an easy to follow format. i love that you can receive graduation awards upon course completion in the form of discounts on other e-learning courses and training kits. i love that its free!
Thursday, May 21, 2009
U2U for me
CAML seems easy to learn at first, but when you work with real data and are presented with different data types having various inherent properties, the work becomes difficult. fortunately, CAML builders are available. the one i use mostly for my work is U2U CAML Query Builder.
U2U has helped me come up with nested filters having a slightly complex "where" clause (an AND and an OR). it has also helped me come up with a query that tells sharepoint to retrieve data where in "Assigned User = [Me]". lastly, it has helped me determine how the "approval status" column (used when content moderation is enabled) can be filtered. here's a sample query U2U has come up with in one of my programs:
referring to the above screenshot of U2U's UI, you can use U2U to build complex where clause by following these steps:
Select the field for which you want to add a second where condition. Click the Where checkbox. Immediately a combobox appears where you can select “And” or “Or”. Fill out or select a value and click the > button. Notice that a Where node is added to the CAML query.
Let me know if this helps!
Hashtables in a Flash
There's nothing special about this article, just a quick reference for me.
Create a Hashtable
C#:
Hashtable objHash = new Hashtable();
VB:
Dim objHash As New Hashtable()
Add some data in it
C#:
objHash.Add("FirstName", "Asif");
objHash.Add("LastName", "Malik");
objHash.Add("Number", 1);
VB:
Dim objHash As New Hashtable()
objHash.Add("FirstName", "Asif")
objHash.Add("LastName", "Malik")
objHash.Add("Number", 1)
Search for a specific key:
C#
if (objHash.ContainsKey("FirstName"))
{
Console.WriteLine("Key is present");
}
Loop through the items:
C#:
foreach (DictionaryEntry entry in estformsHashTable)
{
if (entry.Value.ToString()=="")
{
//do something here
}
}
VB:
Dim objEntry As DictionaryEntry
For Each objEntry In objHash
'Do something here
Next