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, selectedVoList, this.comboType.Text)) { //删除临时订单 foreach (TempOrderVo tempVo in selectedVoList) { DeleteDao.DeleteByID(tempVo.Id, typeof(TempOrderVo)); } //会员消费记录 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("买单成功!"); EventBus.PublishEvent("StaffWorkStatusChange"); } else { XtraMessageBox.Show("买单失败!"); } }