Exemplo n.º 1
0
        private void 还书办理_Click(object sender, EventArgs e)
        {
            BooksManagement subForm = new BooksManagement();

            subForm.Owner = this;
            subForm.Show();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            BooksManagement subForm = new BooksManagement();

            subForm.Show();
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string bid     = bid1.Text.Trim();
            string bname   = bname1.Text.Trim();
            string author  = author1.Text.Trim();
            string bpress  = bpress1.Text.Trim();
            string bnum    = bnum1.Text.Trim();
            string bhbnum  = bhbnum1.Text.Trim();
            string bborrow = bhbnum1.Text.Trim();
            string sql     = "update booktable set bname='" + bname + "',author='" + author + "',bpress='" + bpress + "',bnum='" + bnum + "',bhbnum='" + bhbnum + "',bborrow='" + bborrow + "'where bid='" + bid + "'";

            BooksManagement.ExecuteSql(sql);
            BooksManagement.form.reflash();
            this.Close();
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            string bid     = bid1.Text.Trim();
            string bname   = bname1.Text.Trim();
            string author  = author1.Text.Trim();
            string bpress  = bpress1.Text.Trim();
            string bnum    = bnum1.Text.Trim();
            string bhbnum  = bhbnum1.Text.Trim();
            string bborrow = bhbnum1.Text.Trim();

            if (bid == "" || bname == "" || author == "" || bpress == "" || bnum == "" || bhbnum == "" || bborrow == "")
            {
                MessageBox.Show("图书信息必须齐全!");
                return;
            }
            string sqlSearch = "select * from booktable where bid='" + bid +
                               "'";
            DataTable dt = OprSql.Queue(sqlSearch, "logintable").Tables["logintable"];

            if (dt.Rows.Count == 1)
            {
                MessageBox.Show("图书信息输入错误!");
                bid1.Text     = "";
                bname1.Text   = "";
                bpress1.Text  = "";
                author1.Text  = "";
                bnum1.Text    = "";
                bhbnum1.Text  = "";
                bborrow1.Text = "";
                return;
            }
            else
            {
                string sql = "insert into booktable values('" + bid + "','" + bname + "','" + bpress + "','" + author + "','" + bnum + "','" + bhbnum + "','" + bborrow + "')";
                BooksManagement.ExecuteSql(sql);
                this.Close();
            }
        }
Exemplo n.º 5
0
 public BooksManagement()
 {
     form = this;
     InitializeComponent();
 }