private async void AddFreeze() { var fMoney = Commons.ShowDecimalInputDialog(this, 0, "金额(&A)", "输入冻结金额", 200); if (fMoney < 0) { btnFreeze.Enabled = true; return; } var d = new Dictionary <string, object>(); d["au-id"] = m_auId; d["amt"] = fMoney; var p = await FreezeMoney.AddFreeze(d); if (p.IsOk) { UpdateTable1(); UpdateTable2(); } else { Commons.ShowResultErrorBox(this, p); } btnFreeze.Enabled = true; }
private async void UpdateTable2() { var text = tbComments.Text.LeftStr(500); if (rbNo.Checked) { if (text.Trim() == "") { Commons.ShowInfoBox(this, "审批不通过时必须输入备注"); tbComments.Focus(); return; } if (m_status == 50 || m_status == 70) { if (!Commons.ShowConfirmBox(this, "此时审批不通过会导致\"流标\"!确认吗?")) { return; } } } if (rbYes.Checked && m_status == 50) { var p = await Projects.IsExistsUncheckedTender(m_pId); if (p.IsOk) { if (p.AsInt > 0) { Commons.ShowWarnBox(this, string.Format("存在{0}个状态未知的投标,请检查投标", p.AsInt)); return; } } else { Commons.ShowResultErrorBox(this, p); } } if (m_status == 60) { var reservedAmt = Commons.ShowDecimalInputDialog(this, 0, "金额(&A)", "输入财务核收服务费", 200); if (reservedAmt == -1) { return; } var p = new Dictionary <string, object>(); p["pid"] = m_pId; p["amt"] = reservedAmt; var r = await Projects.SaveReservedAmt(p); if (!r.IsOk) { Commons.ShowResultErrorBox(this, r); } } if (m_status == 70) { if (m_statusSign == 0) { if (!Commons.ShowConfirmBox(this, "签章未完成,确认放款嘛?", "确认")) { return; } } var password = Commons.ShowInputDialog(this, "密码(&P)", "操作人员身份验证", 200, null, true).Trim(); if (password == "") { return; } else if (!(await SignIn.ValidateUser(password))) { Commons.ShowInfoBox(this, "密码错误,禁止操作!"); return; } } var isOk = rbYes.Visible ? rbYes.Checked : true; var p2 = new Dictionary <string, object>(); p2["pid"] = m_pId; p2["flag"] = isOk; p2["comments"] = text; Rpc.IResult r2; switch (m_status) { case 0: r2 = await Projects.PrjSubmit(p2); break; case 1: r2 = await Projects.PrjMgrAudit(p2); break; case 10: r2 = await Projects.PrjRiskCtrlAudit(p2); break; case 20: r2 = await Projects.PrjBusSecAudit(p2); break; case 30: r2 = await Projects.PrjBusVpAprOnline(p2); break; case 50: r2 = await Projects.PrjBusVpConfirmFull(p2); break; case 60: r2 = await Projects.PrjCheckFee(p2); break; case 70: r2 = await Projects.PrjBusVpConfirmLoan(p2); break; default: return; } if (r2.IsOk) { if (!Convert.ToBoolean(r2.AsBoolean)) { Commons.ShowInfoBox(this, "业务操作失败!"); } } else { Commons.ShowResultErrorBox(this, r2); } DialogResult = DialogResult.OK; }