如何在C#中制作产品目录?

时间:2010-03-09 09:01:57

标签: c# printing webbrowser-control embedded-database catalog

我需要开发一个产品目录(约4000个产品)应用程序,该应用程序将通过CD或DVD提供给客户。目录以PHP和MySQL的网页格式存在。

重要提示:该应用程序适用于拥有旧PC,旧系统的客户。对于最低要求,我会放置Windows XP和Internet Explorer 6(如果需要)。

I need the following features:
1 search option (after productID AND after keyword)
2 print option (by selecting multiple products)
3 shopping cart (making a list which will be sent to an email address if there is any Internet Connection on the computer)

当我被要求这样做时,我有2天的时间来实现一个非常基本的版本,所以我把整个网站导出并导出到HTML页面,并在C#中开发了一个包含嵌入式浏览器的应用程序。所以整个网站现在都是静态的,并放在CD上。到目前为止一切都很好。现在有以下问题:

1. the search option was realized by parsing the html files and reading the productID or looking for keywords inside of them. Put on a CD it was extremely slow (searching in 600MB of html files). FOR THIS I WOULD NEED A SOLUTION WITH A STATIC DATABASE (USING ACCESS OR SOMETHING) TO HAVE INDEXED ROWS, SO THE SEARCH COULD BE A VERY FAST ONE.
2. the printing option was a simply call of the embeded Internet Explorer print functions. Here are two problems: 
          a) user needs IE7 for printing the website scaled (FIT TO PAGE), otherwise the edges of the page are cut down.
          b) users of this app does not have even the basic PC usage skills, so they can't set the printing settings, so there will appear in header and footer the page numbers and titles. QUESTION: can I set these settings from CSS for printing?
3. couldn't make a a shopping cart as I don't use a database, so I have static websites and content is inside the HTML.

问题:对于上面描述的问题,哪个是最佳解决方案? 如果您的答案仅为一个问题,请回答。致谢

3 个答案:

答案 0 :(得分:2)

如果你有用PHP / MySQL编写的现有应用程序,也许最好使用XAMPP并将应用程序放在CD上而不是从头开始编写新应用程序。
在这种情况下,用户不需要在他的计算机上安装.NET Framework。

如果必须编写C#应用程序,请将MySQL数据库转换为xml文件,并在应用程序启动时将其加载到内存中,而不是解析html文件。

答案 1 :(得分:1)

如何使用javascript和cookies / url变量来传递购物车?您的嵌入式浏览器是否启用了javascript?

答案 2 :(得分:0)

我知道这与您的方向完全不同,但您可以使用Excel电子表格吗?

完整目录的一张表&搜索。

单张物品显示/打印的一张纸。