Clarity 13 Offline Time sheet
Offline time sheet will not available any more in clarity 13 release.
Sharing knowledge in Project, Program, Portfolio Innovation Management (PPIM) and various Technology.
| Paging results in SQL Server has been discussed for years. The Order By option in the SQL SELECT statement has been enhanced in SQL Server 2012. Using a combination of OFFSET and FETCH along with ORDER BY gives you control of paging through a result set. Using this technique can really help performance by bring back only the results you want to show to your users when they are needed. The following TSQL code runs against the Person table in the AdventureWorks sample database (available from Microsoft). In the sample query below, SQL Server would return 10 records beginning with record 11. The OFFSET command provides a starting point for the SELECT statement in terms of paging, and the FETCH command provides how many records to return at a time. | SELECT BusinessEntityID, FirstName, LastName FROM Person.Person ORDER BY BusinessEntityID OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY; |
SQL Server 2012 introduces a plethora of the new enhancements in T-SQL. With newly introduced syntax the code of the 100s lines can be reduced to merely few lines. By converting the old T-SQL syntax to new T-SQL syntax one can immediately get enormous performance improvement. This session will cover T-SQL tips and tricks which will make writing the code more fun!
Before going in to navigation one thing keep in mind there is no direct way for navigating the xaml files in Silverlight 2.0.
Ok fine let's start our navigation journey. I have two ways to navigate between the xaml files.
let me explain one by one.
# Method 1: Using App.XAML
Step 1:
There is a Application_startup event in App.XAML which will decide the initial load page.
Before that comment all the line in this method. (Example://this.RootVisual = new Page();)
Here in this have to do some little trick.
Step 2:
Declare one public Grid outside the event.
like this: public static Grid root;
and then write this code in the application Startup event.
private void Application_Startup(object sender, StartupEventArgs e)
{
root = new Grid();
root.Children.Add(new Login());
this.RootVisual = root;
}
here only we are adding Grid as a parent control. under that we have xaml page.
Step 3:
Create one more method for navigation.
public static void Navigate(UserControl newPage)
{
UserControl oldpage = root.Children[0] as UserControl;
root.Children.Add(newPage);
root.Children.Remove(oldpage);
}
This is the method will navigate one xaml to another xaml. Basically it's just removing the old page and adding new page.
The above all three steps only in the App.XAML file.
Step 4:
Now come to Login.Xaml, this is the inital page which will load from App.XAML.
After successing the login user has to navigate to productlist page.
The below code will navigate to product list page.
private void Login_Success_Click(object sender, RoutedEventArgs e){App.Navigate(new Product()); }
#Method 2:
This is better approach compare to above.
In the silverlight application should have two files.
1) App.XAML2) Master.XAML
here in Master is the common file which will navigate the files through this.
let me go through step by step:
Step 1:
In the application_startup event load the Master.XAMl (Remove Automated code)
private void Application_Startup(object sender, StartupEventArgs e) {this.RootVisual = new Master();}
Step 2:
In the master page clear all the content except usercontrol tag.
<UserControl x:Class="SilverlightThird.Master" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="300"> </UserControl>
Step 3:
In the code behind of Master page write the below code.
public partial class Master : UserControl { public Master() {
InitializeComponent(); if (this.Content == null) { this.Content = new Login(); } } public void Navigate(UserControl Nextpage){ this.Content = Nextpage; } }
Step 4:
Now come to Login.xaml file.
In the success method of login.xaml.cs file write this below it will navigate.
hope this will help.