資源簡介
c#影院售票系統(含數據庫) 運行正確 調試通過

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Drawing;
using?System.IO;
using?System.Runtime.Serialization.Formatters.Binary;
namespace?MyCinema
{
????public?class?Cinema
????{
????????public?Cinema()
????????{
????????????seats?=?new?Dictionary();
????????????soldTickets?=?new?List();
????????????schedule?=?new?Schedule();
????????}
????????//座位集合
????????private?Dictionary?seats?=?new?Dictionary();
????????public?Dictionary?Seats
????????{
????????????get?{?return?seats;?}
????????????set?{?seats?=?value;?}
????????}
????????//播放列表
????????private?Schedule?schedule;
????????public?Schedule?Schedule
????????{
????????????get?{?return?schedule;?}
????????????set?{?schedule?=?value;?}
????????}
????????//已售票集合
????????private?List?soldTickets;
????????public?List?SoldTickets
????????{
????????????get?{?return?soldTickets;?}
????????????set?{?soldTickets?=?value;?}
????????}
????????public?void?ShowSeat(string?scheduleTime)
????????{
????????????foreach?(Seat?var?in?seats.Values)
????????????{
????????????????var.Color?=?Color.Yellow;
????????????}
????????????foreach?(Ticket?var?in?soldTickets)
????????????{
????????????????
????????????????foreach?(Seat?var1?in?seats.Values)
????????????????{
????????????????????if?(var.ScheduleItem.Time?==?scheduleTime?&&?var.Seat.SeatNum?==?var1.SeatNum)
????????????????????{
????????????????????????var1.Color?=?var.Seat.Color;
????????????????????}
????????????????}
????????????}
????????}
????????public?void?Save()
????????{
????????????FileStream?fs?=?new?FileStream(“soldTickets.bin“?FileMode.Open);
????????????BinaryFormatter?bf?=?new?BinaryFormatter();
????????????this.soldTickets?=?(List)bf.Deserialize(fs);
????????????fs.Close();
????????}
????????public?void?Load()
????????{
????????????try
????????????{
????????????????FileStream?fs?=?new?FileStream(“soldTickets.bin“?FileMode.Open);
????????????????BinaryFormatter?bf?=?new?BinaryFormatter();
????????????????this.SoldTickets?=?(List)bf.Deserialize(fs);
????????????????fs.Close();
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????ex.ToString();
????????????????soldTickets?=?new?List();
????????????}
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????61440??2009-07-13?14:31??影院售票系統7\MyCinema\bin\Debug\AxInterop.WMPLib.dll
?????文件?????571883??2007-11-14?09:17??影院售票系統7\MyCinema\bin\Debug\bone.jpg
?????文件??????11983??2007-11-14?09:17??影院售票系統7\MyCinema\bin\Debug\gongfu.jpg
?????文件?????331776??2009-07-17?17:27??影院售票系統7\MyCinema\bin\Debug\Interop.WMPLib.dll
?????文件???????7680??2009-07-13?14:29??影院售票系統7\MyCinema\bin\Debug\Interop.WMPNSSCDS.dll
?????文件?????516096??2009-07-15?15:33??影院售票系統7\MyCinema\bin\Debug\IrisSkin2.dll
?????文件??????15899??2009-07-15?15:33??影院售票系統7\MyCinema\bin\Debug\MP10.ssk
?????文件??????45056??2009-07-18?10:52??影院售票系統7\MyCinema\bin\Debug\MyCinema.exe
?????文件??????79360??2009-07-18?10:52??影院售票系統7\MyCinema\bin\Debug\MyCinema.pdb
?????文件???????5632??2005-11-11?22:25??影院售票系統7\MyCinema\bin\Debug\MyCinema.vshost.exe
?????文件????????893??2007-11-14?15:35??影院售票系統7\MyCinema\bin\Debug\ShowList.xm
?????文件??????????0??2009-07-18?00:35??影院售票系統7\MyCinema\bin\Debug\soldTickets
?????文件???????1138??2009-07-17?13:30??影院售票系統7\MyCinema\bin\Debug\soldTickets.bin
?????文件??????11405??2007-11-14?09:17??影院售票系統7\MyCinema\bin\Debug\spiderman3.jpg
?????文件??????31993??2006-07-11?00:45??影院售票系統7\MyCinema\bin\Debug\vista1_green.ssk
?????文件??????14679??2006-07-20?18:40??影院售票系統7\MyCinema\bin\Debug\Vista2_color2.ssk
?????文件???????2418??2009-07-18?00:51??影院售票系統7\MyCinema\Cinema.cs
?????文件???????1508??2009-07-13?14:31??影院售票系統7\MyCinema\FreeTicket.cs
?????文件??????11513??2009-07-18?10:52??影院售票系統7\MyCinema\MainForm.cs
?????文件??????36516??2009-07-18?10:52??影院售票系統7\MyCinema\MainForm.Designer.cs
?????文件???????6587??2009-07-18?10:52??影院售票系統7\MyCinema\MainForm.resx
?????文件???????1751??2009-07-16?11:07??影院售票系統7\MyCinema\Movie.cs
?????文件???????4999??2009-07-18?10:38??影院售票系統7\MyCinema\MyCinema.csproj
?????文件??????61440??2009-07-13?14:31??影院售票系統7\MyCinema\obj\Debug\AxInterop.WMPLib.dll
?????文件?????331776??2009-07-17?17:27??影院售票系統7\MyCinema\obj\Debug\Interop.WMPLib.dll
?????文件???????7680??2009-07-13?14:29??影院售票系統7\MyCinema\obj\Debug\Interop.WMPNSSCDS.dll
?????文件????????845??2009-07-18?10:52??影院售票系統7\MyCinema\obj\Debug\MyCinema.csproj.GenerateResource.Cache
?????文件????????601??2009-07-17?17:27??影院售票系統7\MyCinema\obj\Debug\MyCinema.csproj.ResolveComReference.cache
?????文件??????45056??2009-07-18?10:52??影院售票系統7\MyCinema\obj\Debug\MyCinema.exe
?????文件????????180??2009-07-18?10:52??影院售票系統7\MyCinema\obj\Debug\MyCinema.MainForm.resources
............此處省略32個文件信息
評論
共有 條評論