Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            engineerForm form1 = new engineerForm();

            form1.Show();
            this.Close();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (listView1.CheckedItems.Count == 0)
            {
                MessageBox.Show("Haven't chosen any tools!");
            }
            foreach (ListViewItem i in listView1.CheckedItems)
            {
                /*
                 * 此处调用数据库代码,完成归还信息记录
                 * 使用SQL语言
                 */
            }
            MessageBox.Show("Return successfully");
            engineerForm form2 = new engineerForm();

            form2.Show();
            this.Close();
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string[] id       = new string[5];
            string[] category = new string[5];
            int[]    qty      = new int[5];
            int      x        = 0;

            if (listView1.CheckedItems.Count == 0)
            {
                MessageBox.Show("Haven't selected any tool");
            }
            else
            {
                foreach (ListViewItem i in listView1.CheckedItems)
                {
                    QtyEnterForm qtyEnter = new QtyEnterForm(i.SubItems[0].Text, i.SubItems[2].Text);
                    qtyEnter.ShowDialog();
                    if (qtyEnter.clicked == true)
                    {
                        id[x]       = i.SubItems[0].Text;
                        category[x] = i.SubItems[1].Text;
                        qty[x++]    = qtyEnter.getValue();
                    }
                }
                ConfirmForm f1 = new ConfirmForm(id, category, qty, listView1.CheckedItems.Count);
                f1.ShowDialog();
                this.Hide();
                if (f1.b2_clicked == true)
                {
                    this.Show();
                }
                else if (f1.b1_clicked == true)
                {
                    MessageBox.Show("Request successfully!");
                    engineerForm form2 = new engineerForm();
                    form2.Show();
                    this.Close();
                }
            }
        }