简单票务系统 [英] Simple Ticketing System

查看:85
本文介绍了简单票务系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用ASP.NET MVC(C#)创建一个简单的票务系统.

我在这里遵循了Microsoft的教程:http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/intro-to-aspnet-mvc-3.并用它来创建可以添加客户的页面

现在,我已经有了一个简单的系统来添加和编辑客户,我需要能够为客户创建票证".我想我会做同样的事情,只是针对票证,但这只是让我获得一个用于创建客户的页面和一个用于创建票证的页面,但是无法将票证链接"到客户/客户ID

我希望能够从客户详细信息页面创建票证".

我敢肯定这是非常简单的操作,我还很陌生,并且已经搜寻了好几天没有找到我需要的东西.我只需要指出正确的方向,这样我就可以接受并继续使用

在此先感谢您!

I need to create a simple ticketing system with ASP.NET MVC (C#).

I followed Microsoft''s the tutorial here: http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/intro-to-aspnet-mvc-3. And used it to create a page where customers can be added

Now that I have a simple system to add and edit customers, I need to be able to ''create a ticket'' for a customer. I figured I''d do the same thing, just for tickets, but that just gets me a page to create customers and a page to create tickets, but no way to ''link'' a ticket to a customer/customer ID

I want to be able to ''create a ticket'' from the customer details page.

I''m sure this is very very simple to do, I''m just new to it and I''ve been googling for days without finding what i need. I just need pointed in the right direction so i can take that and run with it

Thanks in advance!

推荐答案

您可以观看 [< ^ ].

阅读 [
You could watch this[^].

Read this[^].

You need to have a primary key in the customers table and a reference to that as a foreign key in the tickets table. So you would create join between CustomerID in the Customer table and CustomerID in the tickets table.

If I could draw a picture it would be easier to show you: search Google images fr one-to-many-relationship examples.

Once that is done you can easily associate customers and ther tickets.


像样板一样下载此示例:http://ticketopensource.com/
Download this example like a model: http://ticketopensource.com/


这篇关于简单票务系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆