private void labelRentalClick(object sender, EventArgs e)
        {
            this.Visible = false;
            FormEmployRental frm = new FormEmployRental(mainform, id);

            frm.Owner = this;
            frm.Show();
            frm.Activate();
        }
        private void buttonPreClick(object sender, EventArgs e)
        {
            oracleConnection1.Open();

            string st = "item_id='" + itemID + "'";

            DataRow[] foundRows = RentalTable.Select(st);
            int       count     = 0;

            foreach (DataRow mydataRow in foundRows)
            {
                count = int.Parse(mydataRow["ren_count"].ToString());
            }

            count++;

            for (int i = 0; i < itemName.Count; i++)
            {
                string        str        = "item_id='" + itemID[i] + "'";
                DataRow[]     foundRows2 = StockTable.Select(str);
                int           num        = 0;
                List <string> loc        = new List <string>();

                foreach (DataRow mydataRow2 in foundRows2)
                {
                    num = int.Parse(mydataRow2["sto_NUM"].ToString());
                    loc.Add(mydataRow2["sto_loc"].ToString());
                }

                string str2 = "sto_num='" + num + "' AND sto_loc='" + loc[loc.Count - 1] + "' AND item_id='" + itemID[i] + "'";
                oracleCommand1.CommandText = "update stock set sto_NUM='" + (num - 1) + "' where " + str2;
                oracleCommand1.ExecuteNonQuery();

                DateTime now  = DateTime.Now;
                string   date = now.Year + "-" + now.Month + "-" + now.Day;
                oracleCommand2.CommandText = "insert into rental values('" + consuID + "','" + itemID[i] + "','" + cateID[i] + "','" + id + "','" + TotalMoney[i] + "',TO_DATE('" + date + "', 'YYYY-MM-DD'),'F','" + count + "','" + num + "')";
                oracleCommand2.ExecuteNonQuery();
            }
            MessageBox.Show("대출이 완료 되었습니다");
            oracleConnection1.Close();
            this.Visible = false;
            rentalForm.F5(sender, e);
            rentalForm.Activate();
            Reservation(itemID, consuID, cateID);
        }