 |
|
 |
Ali joon, mamnoon az lotfet.
Be omide roozhaie behtar...
|
|
|
|
 |
|
|
 |
|
 |
Well, sorry for only giveen You a 3.
I have to tell first, that I only examined the "restaurant"-source, because I have not installed the Windows Mobile stuff on my system.
Your project shows what is possible with WPF, but IMO You have mixed up GUI-code and buisenes layer/db access. So you won't be able to change the view to access the same data.
I also stumbled upon a Dispose-Method in ReportPrintClass but ReportPrintClass doesn't implement IDisposable.
I hope, I was not too cruel and my criticism could help You.
Andy
|
|
|
|
 |
|
 |
Thanks for your rating.
I agree with you.
But I wanted to emphasize that again which this is a project that was done by a WPF newbie, hence you should consider that there might be better ways to do the things that were done in this application in terms of coding, designing and etc. In fact, If I'd wanted to create this application now, I would do that differently and in a more standard way.
BTW, all my current XAML projects are now based on MVVM.
Anyway, thanks again for your comment.
Ali Daneshmandi
|
|
|
|
 |
|
 |
Hi Ali,
You're welcome.
For first steps in WPF this is a great program.
And it's good to hear, that you're actualy using MVVM in your projects. I know that article writing is a lot of work. Maybe your article could be a good starting point to convert the restaurant and waiter app into a MVVM project and make a series of articles out of it.
Regards
Andy
|
|
|
|
 |
|
 |
That's a great idea!
Maybe, if I could find some time.
Ali Daneshmandi
|
|
|
|
 |
|
 |
System.IO.FileLoadException
Could not load file or assembly 'WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Please help how to resolve this error, I cannot open the files.
Also the mdf file does not attach to the SQl. It says unspecified error-
'Unable to open the physical file' Reason 15105 Error 5120.
Thanks n Regards
|
|
|
|
 |
|
 |
You can get the WPFToolkit from http://wpf.codeplex.com/[^]
What's your SQL Server Version ?
Which Databases files are you trying to attach ? 2005/2008 version ?
Ali Daneshmandi
|
|
|
|
 |
|
 |
my SQL version is 2008R2
I have downloaded the mdf file in this sample project, the one you have attached.
Are their any options for database to select.
|
|
|
|
 |
|
 |
I have downloaded the WPF toolkit, what has to be done after that. I still keep getting the error message.
System.IO.FileLoadException
Could not load file or assembly 'WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
at MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata)
at Microsoft.Windows.Design.Metadata.AttributeTableContainer.d__c.MoveNext()
at Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper)
at MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType)
at MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings()
at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly)
at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source)
at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)
at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext
|
|
|
|
 |
|
 |
You should reference to the downloaded "WPFToolkit" inside your VisualStudio
Ali Daneshmandi
|
|
|
|
 |
|
 |
Try to download and attach SQL2008_DatabaseFiles_WithSampleData.zip
Ali Daneshmandi
|
|
|
|
 |
|
 |
I have downloaded 2008 version of file at the first place.
I get that error even then.
|
|
|
|
 |
|
 |
Just added database Script file to the download section. => Download Database_SQL_Script.zip
Important Notice: Before running the script, please create a database first as "Restaurant" , then run the script.
Hope it helps!
Ali Daneshmandi
|
|
|
|
 |
|
 |
I just want to note that this is ideal scenario for using silverlight. Silverlight 5 is mature enough to do all the things comfortably and you will gain some advantages like easy deployment and updates, multiplatform enviroment, better accesibility (you dont have to have direct access to DB from client) etc.
The code would be almost the same, you just have to replace your data acces layer (orm?) with ria services.
Silverlight has developed since 2009 and it's more usable than ever.
btw.: nice work!
|
|
|
|
 |
|
 |
Silverlight is great!
Ali Daneshmandi
|
|
|
|
 |
|
 |
It's so cool Sir..
But I get an error when open Waiter-Source, I am using Ms. Visual C# 2010 Express.
Message : One or more projects in solution were not loaded correctly.
Output : The project type is not supported by this installation.
Thanks
|
|
|
|
 |
|
 |
You need Visual Studio 2008 and have installed Windows Mobile 5 SDK.
Ali Daneshmandi
|
|
|
|
 |
|
 |
Thank you Sir, but could we convert to Visual Studio 2010 and Windows Mobile 7.1 SDK ?
|
|
|
|
 |
|
 |
No you can't. Because Wnidows Mobile SDK only supports Visual Studio 2005/2008.
The version 7 is Windows Phone 7 which is completely a different story because it is a different OS.
Microsoft support Windows Mobile up to V 6.5 SDK only for Visual Studio 2008.
Ali Daneshmandi
|
|
|
|
 |
|
 |
Yupzz... Thank you very much Sir...
|
|
|
|
 |
|
 |
An amazing usage of WPF.
I've learned a lot from this project.
|
|
|
|
 |
|
|
 |
|
 |
The database can not be attached without the full-text catalog. Most likely you have full-text catalog enabled on your SQL server. Please update your database and repost.
Thank you.
Dan
Dan Slaby
Evergreen Information Systems, LLC
modified 9 Jan '12.
|
|
|
|
 |
|
 |
I haven't used full-text catalog. I think you are trying to attach database files in MS SQL 2008, am I right?
I forgot to mention in the article that the database files are for MS SQL 2005. Anyway, I've added MS SQL 2008 files, too. Please, download SQL2008_DatabaseFiles_WithSampleData.zip from the download section.
Ali Daneshmandi
|
|
|
|
 |