登陆界面using System;using;using ;using ;using ;using Labrary{public partial class FormLogin : Form{public FormLogin(){InitializeComponent();}}SetMenJin("PicIn");();户ì管¨1理¤¨ = true;this.系|ì统a3初始o化¥= true;this.应|用模ê式o = true;this.图a书o¨|管¨1理¤¨ = true; this.退a办¨卡§ = true;this.借¨¨阅= true;this.门禁= true; SetPurview();= false;= false;= false;|用模ê式o = false;}else{this.用户管理¨ = false;this.系统初始化¥= false;this.读书管理¨ = false;this.退办卡§ = false;this.借阅= false;this.门禁= false;for (int i = 0; i < i++){string purview = if (purview == "1"){this.图书管理¨ = true;}else if (purview == "2"){this.办退卡§ = true;}else if (purview == "3"){this.借阅= true;}else if (purview == "4"){this.门禁= true;}}}}private void用户管理¨aToolStripMenuItem_Click(object sender, EventArgs e) {ful = new ;();}private void修改密码ToolStripMenuItem_Click(object sender, EventArgs e) {fup = new , ;();}private void tsbtnBookType_Click(object sender, EventArgs e){FormBookTypeList fbtl = new FormBookTypeList();();}private void tsbtnBookAdd_Click(object sender, EventArgs e){FormBookAdd fba = new FormBookAdd();();}private void tsbtnBookManage_Click(object sender, EventArgs e){FormBookInfoList fbil = new FormBookInfoList();();}private void tsbtnBookStatistics_Click(object sender, EventArgs e){FormBookStatistics fbs = new FormBookStatistics();();}private void退a出XToolStripMenuItem_Click(object sender, EventArgs e) {();}private void tsbtnCardAdd_Click(object sender, EventArgs e){FormCardInfo fci = new FormCardInfo(1, new ObjCardInfo());();}private void tsbtnCardManage_Click(object sender, EventArgs e){FormCardList fcl = new FormCardList();();}private void tsbtnAddTime_Click(object sender, EventArgs e){string rfid = ();if (rfid == ""){("请把借阅卡放到桌面读写器上!");}else{if (rfid)){ObjCardInfo oci = new ObjCardInfo(rfid);FormCardInfo fci = new FormCardInfo(5, oci);();}else{("没有此借阅卡信息");}}}private void tsbtnCardDelete_Click(object sender, EventArgs e) {string rfid = ();if (rfid == ""){("请把借阅卡到读写器上");}else{if (rfid)){ObjCardInfo oci = new ObjCardInfo(rfid);int count = ();if (count == 0){if ("是否决定退卡!ê", "", =={();("退卡成功|!ê");}}else{+ "还有一本" + () + " 本书未归还不能退卡");}}else{("没有此借阅信息");}}}private void tsbtnJie_Click(object sender, EventArgs e){FormBookJie fbj = new FormBookJie(1);();}private void tsbtnHuan_Click(object sender, EventArgs e){FormBookHuan fbh = new FormBookHuan();();}private void图a书o¨|管¨1理¤¨aToolStripMenuItem_Click(object sender, EventArgs e) {= true;= false;= false;= + "\\pic\\");}private void退a办¨卡§ToolStripMenuItem_Click(object sender, EventArgs e) {= false;= true;= false;= + "\\pic\\");}private void借¨¨阅ToolStripMenuItem_Click(object sender, EventArgs e){= false;= false;= true;= + "\\pic\\");}private void门禁ToolStripMenuItem_Click(object sender, EventArgs e){plit(',')[0];int headerWidth = (headerText[i].Split(',')[1]);= headerName;= headerWidth;}DataTable dtb = for (int i = 0; i < i++){ObjBookInfo bookInfo = new ObjBookInfo[i]["RFID"].ToString());ListViewItem item = new ListViewItem(new string[] { , , , , });}ListViewItem itemCount = new ListViewItem(new string[] { "统a3计", "", "", "", "", + "本à" });}private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e){if== "全部书架¨1"){= 0;BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo"));}if== "第一书架¨1"){= 1;BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='1'"));}if== "第二书架¨1"){= 2;BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='2'"));}if== "第三书架¨1"){= 3;BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='3'"));}if== "第四书架¨1"){= 4;BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='4'"));}}private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e){if== 0){if== 0){BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo"));}if== 1){BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where LendStatus='1'"));}if== 2){BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where LendStatus='0'"));}}if> 0){if== 0){BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='{0}'", }if== 1){BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='{0}' and LendStatus='1'", }if== 2){BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf='{0}' and LendStatus='0'", }}}}}借阅卡管理using System;using;using ;using ;using ;using Labrary{public partial class FormCardList : Form{public FormCardList(){InitializeComponent();SetListView();}private void SetListView(){List<ObjCardInfo> listCard = ();for (int i = 0; i < ; i++){ObjCardInfo oci = listCard[i];ListViewItem item = new ListViewItem;= oci;subitem1 = new ();= ;subitem2 = new ();= ;subitem3 = new ();= "yyyy年¨oMM月dd日¨");subitem4 = new ();= ;subitem5 = new ();= subitem6 = new ();= subitem7 = new ();= }}private void SetListView(List<ObjCardInfo> listCard){for (int i = 0; i < ; i++){ObjCardInfo oci = listCard[i];ListViewItem item = new ListViewItem;= oci;subitem1 = new ();= ;subitem2 = new ();= ;subitem3 = new ();= "yyyy年¨oMM月dd日¨");subitem4 = new ();= ;subitem5 = new ();= subitem6 = new ();= subitem7 = new ();= }}private void tsbtnExit_Click(object sender, EventArgs e){();}private void tsbtnInsert_Click(object sender, EventArgs e){FormCardInfo fci = new FormCardInfo(1, new ObjCardInfo());if () =={SetListView();IsEnabled(false);}}private void IsEnabled(bool Enabled){oString());= ;subitem1 = new ();= row["lendtime"].ToString();subitem2 = new ();= row["returntime"].ToString();}}private void tsbtnExit_Click(object sender, EventArgs e){();}}}图书管理using System;using;using ;using ;using ;using Labrary{public partial class FormBookInfoList : Form{public FormBookInfoList(){InitializeComponent();}private void SetCboBookType(){string sql = "select * from booktype";DataTable dt = = dt;= "Name";= "ID";}private void SetListView(){IsEnabled(false);List<ObjBookInfo> listBookInfo = for (int i = 0; i < ; i++){ObjBookInfo obi = listBookInfo[i];ListViewItem item = new ListViewItem();= ;= obi;subLendStatus = new ();= ;subBookName = new ();= ;subPress = new ();= ;subPrice = new ();= ;subAddPerson = new ();= subAddTime = new ();= }}private void tsbtnExit_Click(object sender, EventArgs e){();}private void tscboBookType_DropDown(object sender, EventArgs e){SetCboBookType();}private void tscboBookType_DropDownClosed(object sender, EventArgs e) {SetListView();}private void tsbtnInsert_Click(object sender, EventArgs e){FormBookAdd fba = new FormBookAdd();if () =={}}private void listView1_SelectedIndexChanged(object sender, EventArgs e) {if> 0){IsEnabled(true);}else{IsEnabled(false);}}private void IsEnabled(bool enabled){= enabled;= enabled;}private void tsbtnUpdate_Click(object sender, EventArgs e){if> 0){FormBookInfo fbi = new FormBookInfo(3, as ObjBookInfo);if () =={SetListView();}}}private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) {if> 0){FormBookInfo fbi = new FormBookInfo(4, as ObjBookInfo);();}}private void tsbtnBookRecord_Click(object sender, EventArgs e){if> 0){FormBookRecord fbr = new FormBookRecord as ObjBookInfo);();}}}}图书上架using System;using;using ;using ;using ;using Labrary{public partial class FormBookAdd : Form{List<string> listAllRfid = new List<string>();List<ObjBookInfo> listBookInfo = new List<ObjBookInfo>();public FormBookAdd(){InitializeComponent();= 0;}private bool ValidControl(){{("请读取图书RFID!ê");return false; }if== ""){("请选择图书分类");return false; }if== ""){("请填写书名");return false; }if== ""){("请填写作者");return false; }if== ""){("请填写定价");return false; }{("请填写出版社");return false;}if== 0){("请选择书架");return false;}return true;}private void gbtnCancel_Click(object sender, EventArgs e) {();}private void btnReadRFID_Click(object sender, EventArgs e) {List<string> listRfid = ();for (int i = 0; i < ; i++){oString();}oString());= ;subitem1 = new ();= row["lendtime"].ToString();subitem2 = new ();= row["returntime"].ToString();}}private void tsbtnExit_Click(object sender, EventArgs e){();}}}。