//录单汇总 private void BtnInputOrders_Click(object sender, EventArgs e) { var db_new = new BathDBDataContext(connectionString); InputEmployee inputEmployee = new InputEmployee(db_new); if (inputEmployee.ShowDialog() != DialogResult.OK) { return; } if (!BathClass.getAuthority(db_new, inputEmployee.emplyee, "录单汇总")) { BathClass.printErrorMsg("不具有权限"); return; } TableOrderTableForm orderTableForm = new TableOrderTableForm(connectionString, inputEmployee.emplyee); orderTableForm.ShowDialog(); }
//自动点单 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(); }