I'm looking for an application developed in C# with following qualities, which is available as source code.
Based on OO Architecture
Must connect to DB.
Must handle atleast a "one to many master child" relationship (eg: Order and items ordered)
Should display the data using Datagrid or other similar controls.
Reports (either with report viewer or otherwise)
I want to understand the layering of objects better. Could you please help by providing some links.
This is very basic. Try code project or some good books:
http://www.codeproject.com/
Related
I looking simplest way to implement master detail winforms app (using mainly data grid view)
It should interact with database, handling database exceptions (eg unique index violation) and work in multi user environment (concurrent updates etc)
I know how to do that with data set and relation between tables, not sure what is best approach if this has to work with database
Few years ago I did similar app base on business objects and stored procedures but I believe this can be done easier this days.
Appreciate if someone can share general ideas or share some links to webpages discribing that in detail
A DataSet combined with a BindingSource could be, what you are looking for.
For a simple master/detail view it provides everything you need.
Connection management.
Certain degree of error handling.
Binding every kind of control to your data
In simple cases, like yours, almost everything can be done in Visual Studio GUI
Data-navigation controls
BindingSource
BindingNavigator
I have been having super difficulties on creating a view that will display my data grouped in levels (Screenshot attached).
I don't know on how to go about this, my data is stored in ONE single table in database which is mapped to a business object in application. Therefore what I want is to group elements based on PROPERTIES (attributes of table) , for instance, group level one based on first property etc.
Probably some of you may have worked previously on devexpress and have some suggestions.
It would be extremely helpful if you could help on this.
Thank you !!!
If you are using DevExpress XAF, these grouping features are already built-in and are provided for both WinForms and ASP.NET WebForms platforms by the corresponding DevExpress grids (GridControl and ASPxGridView respectively). All that you need is to configure them in your application either at runtime or at design time (using the Model Editor tool invoked for XAFML files or by writing code). I demonstrated these approaches in the videos below:
Just for demo purposes, I used the WinForms app, but the same is also available for Web (e.g., check it yourself within the online demo at https://demos.devexpress.com/XAF/MainDemo/. Moreover, you can configure it once for both platforms at the YourSolutionName.Module project level.
You can learn more about these features from the corresponding online DevExpress documentation:
UI Customization > Apply Grouping to List View Data
Concepts > Application Model > Model Editor > Ways to Invoke the Model Editor
I am not going to write any code but I hope this hint could help you:
You can have a look at the Extended WPF Toolkit™. The Community Edition is licensed under the Microsoft Public License and simple to get as nuget. One feature is a powerful and easy to implement DataGrid which also allows to group and order the items by properties:
There are a lot of examples in the web and also a good introduction and overview at Codeplex.
I'm building a C# desktop application for the management of HR decisions (e.g., the termination of a contract, the approval of a requested leave,...).
These decisions are to yield several Office documents (e.g., contracts, lists...).
The end user must be able to:
define new types of decisions,
define the content of the corresponding documents (by which i mean, define the boilerplate text, and the positions where data from a field needs to be inserted),
change the content of the documents for a given DecisionType.
The design i have in mind:
The class Decision has a field decisionType.
The class DecisionType has a property FieldsList, which lists the names of all fields the DecisionType has, and their datatypes.
When the end user clicks a button to enter a new decision, the application generates a user form (i suppose WPF is more suitable for this then WinForms is, although i've never used it) that allows creation of a new decision of the chosen DecisionType. This form contains only those controls needed for the fields a decision of that type uses. The application adds all required databinding.
The end user manages the content of the documents for each DecisionType:
the boiler plate text,
the positions where persisted data need to be inserted.
This is saved as a string, in which the position where data from a field needs to be inserted, is indicated by a code (e.g., "/[bd]" for the field BeginDate).
The database uses a single table for all decisions (although most DecisionTypes won't use all fields).
But... maybe you people know a better way?
Well, it seems like only one table won't help. I mean, you got to create a Person class besides the Decision one. Each Person may have one or many Decision and a Decision should be editable by another people.
Let's get an example:
John made a decision and save it as Decision A
Paul agrees with Decision A but would like to have some other input at it.
I guess you can see where this is going.
Regarding technologies, I would definitely use WPF - although its learning curve is steeper, once you got it you can do anything, practically. WPF also suggest a MVVM approach, which will greatly improve your time with Data Binding.
As for Database, I recommend Entityframework. Its Code First scheme is very easy to understand and you'll find a lot of info around.
Some useful links:
www.wpftutorial.net - Very basic, introductory WPF info, great for starters
CodeProject - MVVM Example for Beginners
Julie Lerman's Entity Framework website - She's one of the best at it!
Don't give up and good luck.
next month I will begin to develop a project and I'm studying about that (I'm a novice).
In this project I will create many report storing data from a Database so I'm concentrating about how print the report using WPF. I need to use many features as follows: page header, page Footer, multi page, page number and so on.
I ask you if you can give me any useful advice, links, suggestion, tools etc. to help me how print in WPF with good results, sincerely I have not good knowledge about that.
Thanks for your time.
It seems you are concerned with two things: printing, and reporting.
If it is a simple matter of printing, then there are other questions out there that may help.
If you are concerned primarily with reporting, or managing and printing reports, then you want a reporting framework.
If you have licensed SQL Server 2005 or later, you may want to check out SQL Reporting Services. You can use SSRS regardless of whether the data is stored in SQL Server.
The suggestion in the comments to your question - to view this prior SO question - still seems like a good one to me. It is nearly an identical question.
I'm writing a website that will sell items from one of my classes. It will be linked to a SQL Server db where I will pull pricing, item name, quantity and description. If I wanted to display the items from the database in a thinkgeek fashion, what would be the best control to use so I can custimize the display to actually look ok?
You'll get the best flexibility with an asp:Repeater. This means you'll have to program more, but it will give you more flexibility.
Not sure if you have any technology requirements, but the ASP.Net has a new type of ASP.NET project called the Dynamic Data project. Using that project you can point to your SQL Server and generate pages to display and edit the data. Pretty easy to get up and running quickly using that.
I'm a fan of the ASP.NET GridView & DataGrid, throw in some template fields for your images and links and what not.
#rslite and #Bryant both have good suggestions. My initial go of the problem would probably involve creating a "Thinkgeek-esque" user control, and plopping that into a repeater for display. However, the DDP would be a good call as well. Really depends on deeper level requirements than you mention.