示例#1
0
        //消费查看
        private void BtnExpense_Click(object sender, EventArgs e)
        {
            List <int> sList = new List <int>();

            sList.Add(2);
            sList.Add(6);

            InputSeatForm inputSeatForm = new InputSeatForm(sList);

            if (inputSeatForm.ShowDialog() == DialogResult.OK)
            {
                //修改
                //OrderCheckForm seatExpenseForm = new OrderCheckForm(inputSeatForm.m_Seat, connectionString);
                //seatExpenseForm.ShowDialog();
            }
        }
示例#2
0
        //自动点单
        private void ExpenseOrder_Click(object sender, EventArgs e)
        {
            var           db            = new BathDBDataContext(connectionString);
            InputEmployee inputEmployee = new InputEmployee(db);

            if (inputEmployee.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            Employee server = inputEmployee.emplyee;

            if (!BathClass.getAuthority(db, server, "完整点单") &&
                !BathClass.getAuthority(db, server, "可见本人点单"))
            {
                BathClass.printErrorMsg("权限不够,不能访问!");
                return;
            }
            List <int> sList = new List <int>();

            sList.Add(2);
            sList.Add(6);

            InputSeatForm inputSeatForm = new InputSeatForm(sList);

            if (inputSeatForm.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            //var m_Seat = db.Seat.FirstOrDefault(x => x.Equals(inputSeatForm.m_Seat));
            //m_Seat.ordering = true;
            //db.SubmitChanges();

            //修改
            //OrderForm orderForm = new OrderForm(inputSeatForm.m_Seat, server, connectionString, true);
            //orderForm.ShowDialog();

            //m_Seat.ordering = false;
            //db.SubmitChanges();
        }