• 大小: 1.27MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-09
  • 语言: C#
  • 标签:

资源简介

C#航班简单操作系统,不需要数据库,纯文件操作

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace PlaneTicketManager
{
    public partial class AddPlaneFrm : Form
    {
        public AddPlaneFrm(Dictionary planes)
        {
            InitializeComponent();
            this.planes = planes;
        }

        private Dictionary planes;

        private void btnAdd_Click(object sender EventArgs e)
        {
            //所有文本框的判断省略
            Plane plane = new Plane();

            plane.PlaneNo = this.txtPlaneNo.Text;
            plane.StartPlace = this.txtStartPlace.Text;
            plane.EndPlace = this.txtEndPlace.Text;
            plane.StartTime = this.txtStartTime.Text;
            plane.EndTime = this.txtEndTime.Text;
            plane.FirstClassPrice = Double.Parse(this.txtFirstSeatPrice.Text);
            plane.TouristClassPrice = Double.Parse(this.txtTouristSeatPrice.Text);

            int firstSeatCount = int.Parse(this.txtFirstSeatNum.Text);

            int touristSeatCount = int.Parse(this.txtTouristSeatNum.Text);

            plane.Seats = new Dictionary();

            for (int i = 1; i <= firstSeatCount; i++)
            {
                plane.Seats.Add(i new Seat(i SeatType.firstClass));
            }
            for (int i = firstSeatCount + 1; i <= firstSeatCount + touristSeatCount; i++)
            {
                plane.Seats.Add(i new Seat(i SeatType.touristClass));
            }

            this.planes.Add(plane.PlaneNo plane);

            MessageBox.Show(“添加成功!“);

            this.Close();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-12-22 19:55  PlaneTicketManager\
     目录           0  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\
     文件        1591  2010-07-23 14:15  PlaneTicketManager\PlaneTicketManager.sln
     文件       40448  2010-07-23 14:42  PlaneTicketManager\PlaneTicketManager.suo
     文件        1820  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\AddPlaneFrm.cs
     文件       13247  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\AddPlaneFrm.Designer.cs
     文件        5814  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\AddPlaneFrm.resx
     文件        7655  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\AirPlaneCompany.cs
     目录           0  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\bin\
     目录           0  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\bin\Debug\
     文件         161  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\bin\Debug\Planes.txt
     文件       28672  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\bin\Debug\PlaneTicketManager.exe
     文件       81408  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\bin\Debug\PlaneTicketManager.pdb
     文件       14328  2010-07-23 10:34  PlaneTicketManager\PlaneTicketManager\bin\Debug\PlaneTicketManager.vshost.exe
     文件         490  2007-07-21 02:33  PlaneTicketManager\PlaneTicketManager\bin\Debug\PlaneTicketManager.vshost.exe.manifest
     文件      706112  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\bin\Debug\TicketBgPic.tif
     文件         226  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\bin\Debug\Tickets.txt
     文件         197  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\IPrint.cs
     文件        7153  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\MainFrm.cs
     文件       16956  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\MainFrm.Designer.cs
     文件        6209  2009-11-02 09:03  PlaneTicketManager\PlaneTicketManager\MainFrm.resx
     目录           0  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\obj\
     目录           0  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\obj\Debug\
     文件         180  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.AddPlaneFrm.resources
     文件        3997  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.csproj.FileListAbsolute.txt
     文件         913  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.csproj.GenerateResource.Cache
     文件       28672  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.exe
     文件         180  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.MainFrm.resources
     文件       81408  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.pdb
     文件         180  2010-07-23 10:49  PlaneTicketManager\PlaneTicketManager\obj\Debug\PlaneTicketManager.Properties.Resources.resources
     目录           0  2010-12-22 19:55  PlaneTicketManager\PlaneTicketManager\obj\Debug\Refactor\
............此处省略24个文件信息

评论

共有 条评论

相关资源