• 大小: 13.03MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-03
  • 语言: C#
  • 标签: winform  书店管理  

资源简介

自己随便写的东西,但绝对没有打bug,还是值得一看的

资源截图

代码片段和文件信息

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 BookSManages.Model;
using BookSManages.ADO;

namespace BookSManages
{
    public partial class BookMain : Form
    {
        public BookMain()
        {
            InitializeComponent();
        }
        private string StrNumber;
        public BookMain(string number)
        {
            InitializeComponent();
            this.StrNumber = number;
        }

        private void BookMain_Load(object sender EventArgs e)
        {
            //MessageBox.Show(StrNumber);
            try
            {
                Employess objEmp = new BookSManages.ADO.EmployessADO().SelectEmp(StrNumber);
                lblName.Text = “您好,“ + objEmp.Name + “欢迎登录本系统。“;
                if (objEmp.Number != “s0001“)
                {
                    tolBtnBook.Visible = false;
                    tolBtnUser.Visible = false;
                }
                else
                {
                    button1.Visible = false;
                    button2.Visible = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            bit = false;
            this.ConcernShow();
            this.ClassShow();
            this.booksShow(null null);

        }
        public void booksShow(string conId string classID)
        {
            booksAdo objado = new booksAdo();
            dgBooks.DataSource = objado.shuji(conId classID);
            dgBooks.Columns[0].Visible = false;
            dgBooks.Columns[1].Visible = false;
            dgBooks.Columns[2].Visible = false;
            dgBooks.Columns[3].Visible = false;

        }

        /// 
        /// 加载出版社控件里的数据
        /// 

        private void ConcernShow()
        {
            List list = BookSManages.ADO.Database.GetListConcern();
            cmbConcern.Items.Clear();//清空控件
            //加载数据
            for (int i = 0; i < list.Count; i++)
            {
                cmbConcern.Items.Add(list[i].ConcernName);
            }


        }
        /// 
        /// 加载图书类别控件里的数据
        /// 

        private void ClassShow()
        {
            List list = BookSManages.ADO.Database.GetListCalss();
            cmbClass.Items.Clear();//清空控件
            //加载数据
            for (int i = 0; i < list.Count; i++)
            {
                cmbClass.Items.Add(list[i].ClassName);
            }


        }
        bool bit = false;
        private void BookMain_FormClosing(object sender FormClosingEventArgs e)
        {
            if (bit)
                this.Owner.Show();
            else
                Application.Exit();
        }
        /// 

        /// 修改

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      73520  2011-11-10 11:36  Books\BookSManages\Backup\BookSetup\BookSetup.vdproj

     文件       9769  2011-09-29 15:26  Books\BookSManages\Backup\BookSManages\ADO\booksAdo.cs

     文件       2831  2011-09-28 16:59  Books\BookSManages\Backup\BookSManages\ADO\borrowADO.cs

     文件       3358  2011-09-28 12:10  Books\BookSManages\Backup\BookSManages\ADO\ClassADO.cs

     文件       3766  2011-09-27 16:38  Books\BookSManages\Backup\BookSManages\ADO\Concern.cs

     文件       3688  2011-09-22 14:56  Books\BookSManages\Backup\BookSManages\ADO\Database.cs

     文件      13717  2011-09-23 15:34  Books\BookSManages\Backup\BookSManages\ADO\EmployessADO.cs

     文件       4642  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\borrowbooks.cs

     文件       4527  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\borrowbooks.Designer.cs

     文件       5814  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\borrowbooks.resx

     文件       2284  2011-09-29 16:00  Books\BookSManages\Backup\BookSManages\Book\BrowseBooks.cs

     文件      12277  2011-09-29 16:00  Books\BookSManages\Backup\BookSManages\Book\BrowseBooks.Designer.cs

     文件       5814  2011-09-29 16:00  Books\BookSManages\Backup\BookSManages\Book\BrowseBooks.resx

     文件       3338  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\ClassBook.cs

     文件      10401  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\ClassBook.Designer.cs

     文件       5814  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\ClassBook.resx

     文件       4651  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\ConcernBook.cs

     文件       7169  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\ConcernBook.Designer.cs

     文件       5814  2011-09-29 16:02  Books\BookSManages\Backup\BookSManages\Book\ConcernBook.resx

     文件      10918  2011-09-29 15:47  Books\BookSManages\Backup\BookSManages\Book\ManageBooks.cs

     文件      17427  2011-09-29 15:47  Books\BookSManages\Backup\BookSManages\Book\ManageBooks.Designer.cs

     文件       6017  2011-09-29 15:47  Books\BookSManages\Backup\BookSManages\Book\ManageBooks.resx

     文件       9357  2011-09-29 16:00  Books\BookSManages\Backup\BookSManages\BookMain.cs

     文件      27815  2011-09-29 16:00  Books\BookSManages\Backup\BookSManages\BookMain.Designer.cs

     文件       9829  2011-09-29 16:00  Books\BookSManages\Backup\BookSManages\BookMain.resx

     文件      16298  2011-09-29 15:59  Books\BookSManages\Backup\BookSManages\BookSManages.csproj

     文件        568  2011-09-29 15:54  Books\BookSManages\Backup\BookSManages\BookSManages.csproj.user

     文件     136606  2011-09-29 15:53  Books\BookSManages\Backup\BookSManages\Icon.ico

     文件       2454  2011-09-29 15:59  Books\BookSManages\Backup\BookSManages\Login.cs

     文件       7468  2011-09-29 15:59  Books\BookSManages\Backup\BookSManages\Login.Designer.cs

............此处省略584个文件信息

评论

共有 条评论