本文介绍了WinForm开发一个MVP模式的桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我是


我正在开发WinForms应用程序并有一些问题。



该应用程序应用于数据采集。它应记录车辆信息,将其存储在数据库中并在应用程序中显示。此外,数据将通过按钮导出到Excel表格。我是编程新手,这个
是我第一次用C#,Visual Studio和WinForms开发。我已经开始创建一个具有不同UserControls的GUI(其他"windows")。该应用程序没有很多功能。 DataGridView用于将数据存储在
数据库中,并将其显示在另一个DataGridView中的另一个UserControl上。其余的是在窗口/菜单项之间切换的按钮和用于计算输入的车辆的按钮。 DataGridView看起来像这样=列:品牌,型号,构造年份,
KM状态,颜色和最后2列填充按钮。一个用于添加设备,另一个用于删除创建的车辆。我考虑过这个,因为否则DataGridView表会填充太多信息(设备:
皮革,导航等)。设备按钮应打开一个新窗口,以输入每辆车的设备。在Table(DataGridView)下的表单末尾有很多可用空间。我想用它来提取从DB输入的
的设备数据并将其显示在那里,这样你仍然可以通过在应用程序的DataGridView中点击车辆来了解车辆所具有的设备。为此,我将分配一个唯一的ID,并使用SQL查询仅显示表
中具有相应ID(车辆)的设备。我对我的项目有一些疑问,但我从基础开始,因为它太多了。
$


如何在MVP模式中开发它。 />
如上所述显示设备的想法是否可行?


非常感谢提前!



解决方案

Hello, everybody,

I am working on the development of a WinForms application and have some questions.

The application should be used for data acquisition. It should record vehicle information, store it in a database and display it in the application. In addition, the data is to be exported to an Excel table via a button. I am quite new to programming and this is the first time that I have developed in C#, Visual Studio and WinForms. I have already started and created a GUI with different UserControls (other "windows"). The application doesn't have many features. A DataGridView is used to store data in the database and display it on another UserControl in another DataGridView. The rest are buttons to switch between the windows/menu items and a button to count the entered vehicles. DataGridView looks like this= columns: Brand, model, year of construction, KM status, color and the last 2 columns are filled with buttons. One for adding the equipment and the other for deleting the created vehicle. I have considered this, because otherwise the DataGridView table would be filled with too much information (equipment: leather, navigation, etc.). The equipment button should open a new window to enter the equipment for each vehicle. At the end of the form under Table (DataGridView) there is a lot of free space. I want to use this to extract the equipment data that have been entered from the DB and display it there, so that you still know which equipment the vehicle has by clicking on the vehicle in the DataGridView in the app. For this I would assign a unique ID, and with a SQL query to display only the equipment from the table with the respective ID(vehicle). I have some questions concerning my project, but I start with the basics, because it is getting too much.

How can I develop this in the MVP pattern.
Is the idea of displaying the equipment as explained above feasible?

Many thanks in advance!

解决方案


这篇关于WinForm开发一个MVP模式的桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 08:54