Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are we going backwards?
Message
De
01/12/2009 15:34:21
 
 
À
01/12/2009 14:58:33
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01436966
Message ID:
01437155
Vues:
71
Thank you John - I look forward to trying this.

>>OK cool. How about this evening we have a YUUGUU web conference and you tell me the clicks I need to do to build the app in 7 minutes? I have Visual Studio 2008, SQL2008 developer, and Silverlight 3 installed (the current development tools). I'll be happy to invite Pertti and some of the other people who are having a hard time with it. How about 9pm your time?
>
>
>
>Don't need to ...
>
>1. Install Adventure works..
>
>2. Install Ria Framework
>
>3 Create silverlight Application (Business apllication) hosted in asp.net website.
>
>4 Add ADo .net entity data model to web project. Select adventure works and the employee table.
>
>5 Add domain service class to web project
>
>6. Add references to your client project:
> System.Windows.Ria.Controls"
> System.Windows.Controls.Navigation"
> System.Windows.Controls.Data.DataForm.Toolkit"
>
>
>
>Add employee page link : modify main page xaml nav links:
>
>    <Rectangle x:Name="Divider2" Style="{StaticResource DividerStyle}"/>
>
>        <HyperlinkButton x:Name="Link3" Style="{StaticResource LinkStyle}" 
>                                     NavigateUri="/Employee" TargetName="ContentFrame" Content="employee"/>
>
>
>add the following to the employee page xaml:
>
>
><navigation:Page xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"  x:Class="YOUR CLIENT PROJECT NAME HERE"
>                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
>                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
>                     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
>                     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
>                     xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Ria.Controls"
>                     xmlns:riaData="clr-namespace:System.Windows.Data;assembly=System.Windows.Ria.Controls"
>                     xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
>                     xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit" 
>                     xmlns:ds="clr-namespace:YOUR WEB PROJECT NAME HERE
>                     xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  
>                 Title="Employee">
>
>
>    <Grid>
>        <Grid.RowDefinitions>
>            <RowDefinition Height="Auto" />
>            <RowDefinition Height="50" />
>            <RowDefinition Height="30" />
>            <RowDefinition Height="Auto" />
>            <RowDefinition Height="30*" />
>        </Grid.RowDefinitions>
>
>        <Grid.ColumnDefinitions>
>            <ColumnDefinition Width="80" />
>            <ColumnDefinition Width="500" />
>            <ColumnDefinition Width="250*" />
>        </Grid.ColumnDefinitions>
>
>
>
>        <riaControls:DomainDataSource x:Name="ddsEmployee" 
>                                  LoadSize="20" 
>                                  QueryName="GetEmployees" 
>                                  AutoLoad="True" 
>                                  LoadDelay="0:0:0.75">
>            <riaControls:DomainDataSource.DomainContext>
>                <ds:EmployeeDomainContext />
>            </riaControls:DomainDataSource.DomainContext>
>
>            <!--Filtering
>                    •Contains 
>                    •EndsWith 
>                    •IsContainedIn 
>                    •IsEqualTo 
>                    •IsGreaterThan 
>                    •IsGreaterThanOrEqualTo 
>                    •IsLessThan 
>                    •IsLessThanOrEqualTo 
>                    •IsNotEqualTo 
>                    •StartsWith-->
>
>
>            <!--Filtering-->
>            <riaControls:DomainDataSource.FilterDescriptors>
>                <riaData:FilterDescriptorCollection>
>                    <riaData:FilterDescriptor PropertyPath="LastName" Operator="StartsWith">
>                        <riaData:ControlParameter ControlName="Filter" PropertyName="Text" RefreshEventName="TextChanged"/>
>                    </riaData:FilterDescriptor>
>                </riaData:FilterDescriptorCollection>
>            </riaControls:DomainDataSource.FilterDescriptors>
>
>            <!--sorting-->
>            <riaControls:DomainDataSource.SortDescriptors>
>                <riaData:SortDescriptor Direction="ascending" PropertyPath="LastName" />
>                <riaData:SortDescriptor Direction="ascending" PropertyPath="FirstName" />
>            </riaControls:DomainDataSource.SortDescriptors>
>        </riaControls:DomainDataSource>
>
> 
>        <TextBlock x:Name="HeaderText" 
>                           Text="Employees"
>                           Grid.Row="0"
>                           Grid.ColumnSpan="2"
>                           Style="{StaticResource HeaderTextStyle}"  />
>
>        <Grid Grid.Row="2" Grid.ColumnSpan="2">
>            <StackPanel Orientation="Horizontal"
>                                Margin="0,0,0,10">
>                <TextBlock x:Name="lblFilter" 
>                                   Text="Filter:  " />
>
>                <TextBox x:Name="Filter" 
>                                 Width="250"/>
>            </StackPanel>
>
>        </Grid>
>
>        <StackPanel Grid.Row="3" Grid.ColumnSpan="2">
>            
>            <data:DataGrid x:Name="grdEmployee"
>                       AutoGenerateColumns="False" 
>                       IsReadOnly="False"
>                      ItemsSource="{Binding Data, ElementName=ddsEmployee}">
>
>                    <data:DataGrid.Columns>
>                        <data:DataGridTextColumn Header="Last Name"  Binding="{Binding LastName}"  Width="100" />
>                        <data:DataGridTextColumn Header="First Name"  Binding="{Binding FirstName}"  Width="100" />
>                        <data:DataGridTextColumn Header="Hire Date"  Binding="{Binding HireDate}"  Width="100" />
>                        <data:DataGridTextColumn Header="Title"  Binding="{Binding Title}"  Width="200" />
>                        <data:DataGridTextColumn Header="Extension"  Binding="{Binding Extension}"  Width="100" />
>                    </data:DataGrid.Columns>
>                </data:DataGrid>
>
>            <data:DataPager Source="{Binding Data, ElementName=ddsEmployee}"
>                                    PageSize="10"/>
>
>        </StackPanel>
>        <dataControls:DataForm x:Name="dfEmployee"
>                           Grid.Row="3"
>                           Grid.Column="2"
>                           Header="Employee Details"  
>                           CurrentItem="{Binding SelectedItem, ElementName=grdEmployee}"   
>                           HorizontalAlignment="Left" 
>                           Margin="10,0,0,0">
>
>            <dataControls:DataForm.EditTemplate>
>                <DataTemplate>
>                    <StackPanel>
>                        <dataControls:DataField>
>                            <TextBox Text="{Binding EmployeeID, Mode=TwoWay}" />
>                        </dataControls:DataField>
>                        <dataControls:DataField>
>                            <TextBox Text="{Binding LastName, Mode=TwoWay}" />
>                        </dataControls:DataField>
>                        <dataControls:DataField>
>                            <TextBox Text="{Binding FirstName, Mode=TwoWay}" />
>                        </dataControls:DataField>
>                        <dataControls:DataField>
>                            <controls:DatePicker Text="{Binding HireDate, Mode=OneWay}"/>
>                        </dataControls:DataField>
>                        <dataControls:DataField>
>                            <TextBox Text="{Binding Title, Mode=TwoWay}" />
>                        </dataControls:DataField>
>                        <dataControls:DataField>
>                            <TextBox Text="{Binding Extension, Mode=TwoWay}" />
>                        </dataControls:DataField>
>                    </StackPanel>
>                </DataTemplate>
>            </dataControls:DataForm.EditTemplate>
>        </dataControls:DataForm>
>
>    </Grid>
></navigation:Page>
>
>
>
>
>And you're done. Good Luck...
>
>Since I've done this a number of times, I can do it faster now than you.... so I'll give you a whole 15 mintues to finish the above.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform