private void BtnQuery_Click(object sender, EventArgs e) { OrderInfoVo vo = new OrderInfoVo(); vo.OrderID = GenrateIDUtil.GenerateOrderID(); vo.Price = Convert.ToDouble(this.textPrice.Text); vo.Tax = Convert.ToDouble(this.textGst.Text); vo.TotalPrice = Convert.ToDouble(this.textTotal.Text); vo.PriceType = this.comboType.Text; vo.EndTime = DateTime.Now; vo.CompanyId = SystemConst.companyId; if (TransactionDao.DealOrder(vo, tempOrderList, this.comboType.Text)) { //删除临时订单 DeleteDao.DeleteTempOrderByRoomId(roomId); //会员消费记录 if (!string.IsNullOrWhiteSpace(this.textMemberId.Text)) { MemberConsumeVo consumeVo = new MemberConsumeVo(); string consumeId = GenrateIDUtil.GenerateConsumeID(); consumeVo.Id = consumeId; consumeVo.MId = this.textMemberId.Text; consumeVo.MName = SelectDao.GetMemberNameByID(this.textMemberId.Text); consumeVo.Amount = double.Parse(this.textTotal.Text); consumeVo.ConsumeTime = DateTime.Now; consumeVo.CompanyId = SystemConst.companyId; InsertDao.InsertData(consumeVo); } XtraMessageBox.Show("买单成功!"); RoomVo updateVo = SelectDao.GetRoomByRoomId <RoomVo>(roomId); EventBus.PublishEvent("StaffWorkStatusChange"); this.DialogResult = DialogResult.OK; } else { XtraMessageBox.Show("买单失败!"); } }