private void btnVNOKClick(object vipMoney) { this.BeginInvoke(new Action(() => { RechargeInfo vipMoneyTemp = vipMoney as RechargeInfo; double Integral = -1; bool result = moneyBLL.Recharge(rechargeInfo, Integral); if (result) { SelectMoneyLeft(vipMoneyTemp.VipId, false); LogInfo logInfo = new LogInfo(); logInfo.UserId = StaticData.userLocal.UserId; logInfo.Content = "为非会员'" + cmbVipNoId.SelectedText + "'充值" + txtVipNoMoney.Text + "元"; logInfo.LogTime = DateTime.Now; logInfo.DpId = StaticData.departLocal.DpId; bool b = new LogBLL().LogInsert(logInfo); txtVipNoMoney.Text = ""; MessageBox.Show("充值成功!"); this.Close(); } else { MessageBox.Show("系统故障,充值失败!"); } btnVNOK.Enabled = true; })); }
private void btnOKClick(object vipMoney) { this.BeginInvoke(new Action(() => { RechargeInfo vipMoneyTemp = vipMoney as RechargeInfo; //if (vipMoneyTemp .ID <1) //{ // MessageBox.Show("请查出用户信息"); // return; //} double Integarl = -1; if (txtIntegral.TextLength > 0) { Integarl = double.Parse(txtIntegral.Text.Trim()); } bool result = moneyBLL.Recharge(vipMoneyTemp, Integarl); if (result) { LogInfo logInfo = new LogInfo(); logInfo.UserId = StaticData.userLocal.UserId; if (Integarl >= 0) { logInfo.Content = "为会员‘" + txtVipName.Text + "'充值" + vipMoneyTemp.ChargeMoney + "元,积分由" + txtIntegralLeft.Text + "更改为" + Integarl.ToString(); } logInfo.Content = "为会员‘" + txtVipName.Text + "'充值" + vipMoneyTemp.ChargeMoney + "元"; logInfo.LogTime = DateTime.Now; logInfo.DpId = StaticData.departLocal.DpId; bool b = new LogBLL().LogInsert(logInfo); SelectMoneyLeft(vipMoneyTemp.VipId, true); if (int.Parse(txtMoney.Text.Trim()) < 0) { MessageBox.Show("扣费成功!"); } else { MessageBox.Show("充值成功!"); chargeMoney = vipMoneyTemp.ChargeMoney; } txtMoney.Text = ""; txtIntegral.Text = ""; this.Close(); } else { MessageBox.Show("系统故障,充值失败!"); } })); }