| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 339 人关注过本帖
标题:高手看看,写入流没有错吧!
只看楼主 加入收藏
ganmaoaq
Rank: 2
等 级:论坛游民
帖 子:11
专家分:43
注 册:2009-8-17
结帖率:0
收藏
 问题点数:0 回复次数:1 
高手看看,写入流没有错吧!
using System;
using System.Collections.Generic;
using System.Text;
using

namespace Accp
{
    //赠票
    [Serializable]
   public class FreeTicket:Ticket,IPrintable
    {
      // public FreeTicket() { }
       public FreeTicket(string customername,Seat seat,ScheduleItem scheduleItem)
           :base(seat,scheduleItem)
       {
           this._customerName = customername;
       }
       //获得票者的名字
        private string _customerName;
        public string CustomerName
        {
            get { return _customerName; }
            set { _customerName = value; }
        }
       public override void CalcPrice()
       {
           this.Price = 0;   
       }
        public override void Print()
       {
        
           string fileName = this.Scheduleitem.Time + "" + Seat.SeatNum + ".txt";
           FileStream fs = new FileStream(fileName,http://www.);
           StreamWriter sw = new StreamWriter(fs);
           sw.WriteLine("**********************************");
           sw.WriteLine("青鸟影院(赠票)");
           sw.WriteLine("----------------------------------");
           sw.WriteLine("电影名:\t{0}", this.Scheduleitem.Movie.MovieName);
           sw.WriteLine("时间:\t{0}", this.Scheduleitem.Time);
           sw.WriteLine("座位号:\t{0}", this.Seat.SeatNum);
           sw.WriteLine("价格:\t{0}", this.Price.ToString());
           sw.WriteLine("**********************************");
           sw.Close();
                  }

    }
}

[ 本帖最后由 ganmaoaq 于 2009-8-17 07:37 编辑 ]
搜索更多相关主题的帖子: 入流 
2009-08-17 07:33
ganmaoaq
Rank: 2
等 级:论坛游民
帖 子:11
专家分:43
注 册:2009-8-17
收藏
得分:0 
不错啊~~~~~~~~~~~

[url=http://www.]7k7k小游戏[/url]
2009-08-17 07:35
快速回复:高手看看,写入流没有错吧!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011694 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved