图书管理系统的C#代码(完整版)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

C#代码清单

共1个项目,包含5个类。

项目:librarysystem

类: Program.cs Readers.cs Manage.cs Menu.cs Publications.cs

主类代码:

namespace librarysystem

{ ///

///类名:Program

///功能:项目主类

///时间:2015-11-19

///

class Program

{

static void Main(string[] args)

{

Menu meu = new Menu();

meu.ShowMainMenu();

Console.ReadLine();

}

}

}

出版物类代码:

namespace librarysystem

{ ///

///类名:Publications

///功能:馆藏出版物信息

///时间:2015-11-19

///

class Publications

{

/*出版物编号*/

private string PublicationISBN;

public string PublicationIsbn

{

get

{

return PublicationISBN;

}

{

PublicationISBN = value;

}

}

/*出版物名称*/

public string PublicationName;

/*出版物作者或出版机构*/

public string PublicationAuthor;

/*出版物在架状态*/

public bool PublicationStatus;

/*出版物类型*/

public string PublicationType;

public Publications()

{

}

public Publications(string PublicationISBN,string PublicationName,string PublicationAuthor,string PublicationType,bool PublicationStatus)

{

this. PublicationISBN = PublicationISBN;

this.PublicationName = PublicationName;

this.PublicationAuthor = PublicationAuthor;

this.PublicationType = PublicationType;

this.PublicationStatus = PublicationStatus;

}

}

}

读者类代码:

namespace librarysystem

{ ///

///类名:Readers

///功能:已获取权限读者的信息

///时间:2015-11-19

///

class Readers

{

private string ReaderID;

public string ReaderId

{

get

{

return ReaderID;

}

set

ReaderID = value;

}

}

public string ReaderName;

public string ReaderSex;

public string ReaderDepartment;

public string ReaderMajor;

public string[] BowPublication = new string[10]{"","","","","","","","","",""};

public Readers()

{

}

public Readers(string ReaderID, string ReaderName, string ReaderSex, string ReaderDepartment, string ReaderMajor)

{

this.ReaderID = ReaderID;

this.ReaderName = ReaderName;

this.ReaderSex = ReaderSex;

this.ReaderDepartment = ReaderDepartment;

this.ReaderMajor = ReaderMajor;

}

}

}

管理类代码:

namespace librarysystem

{ ///

///类名:Manage

///功能:管理员执行图书管理操作

///时间:2015-11-19

///

class Manage

{

public bool BorrowFlag = false;/*借阅操作成功标志*/

public bool ReturnFlag = false;/*归还操作成功标志*/

public Publications pub_search;/*保存查询到的出版物*/

public Readers Red_valid;/*保存查询到的合法用户*/

/*声明馆藏出版物数组*/

public Publications[] pubs=new Publications[200];

/*声明注册读者数组*/

public Readers[] reds=new Readers[30];

/*实例化馆藏出版物对象*/

public Publications pub0 = new Publications("000000","C#从入门到精通","明日科技","书籍",true);

相关文档
最新文档