Beispiel #1
0
        private void endToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListViewItem item = listviewitem.SelectedItems[0];

            cId = int.Parse(item.SubItems[0].Text);

            Bill bill = new Bill();

            bill.ComputerId = cId;

            billBLL.GetBillId(bill);

            string dateTime = DateTime.Now.ToShortTimeString();


            Bill bills = new Bill();

            bills.EndTime = DateTime.Parse(dateTime);
            bills.BillID  = StaticClass.BillID;

            billBLL.GetEndTime(bills);

            Computer pc = new Computer();

            pc.ComputerID = cId;

            computers.IsActiveFalse(pc);

            BillDetails bd = new BillDetails();

            bd.ShowDialog();
        }
Beispiel #2
0
        private void orderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListViewItem item = listviewitem.SelectedItems[0];

            cId = int.Parse(item.SubItems[0].Text);

            Bill bill = new Bill();

            bill.ComputerId = cId;


            billBLL.GetBillId(bill);
            Order order = new Order();

            order.lblBillID.Text = StaticClass.BillID.ToString();

            using (var con = SQLfunctions.GetConnection())
            {
                using (var cmd = SQLfunctions.Command(con, cmdText: "GetProduct", cmdType: CommandType.StoredProcedure))
                {
                    using (SqlDataReader dr = cmd.ExecuteReader())
                    {
                        while (dr.Read())
                        {
                            order.cmbProduct.Items.Add(dr[0]);
                        }
                    }
                }
            }
            order.ShowDialog();
        }