private void btnUnPay_Click(object sender, EventArgs e) { if (_profitsInfo != null) { _profitsInfo.IsPay = false; var isSuccess = DataManager.ProfitsInfoBLL.Add(_profitsInfo); if (!isSuccess) { MessageBox.Show("利润表数据添加失败,如多次失败请联系管理员"); return; } Frm_NoReceiveMoney frm_NoReceiveMoney = Frm_NoReceiveMoney.Create(_profitsInfo.OrderId, _profitsInfo.PayPrices.ToString()); frm_NoReceiveMoney.ShowDialog(this); frm_NoReceiveMoney.Focus(); //如果登记成功 ,返回true ,可以 var isSucess = Boolean.Parse(frm_NoReceiveMoney.Tag.ToString()); if (isSuccess) { this.Tag = "true"; this.Close(); } } else { MessageBox.Show("发生意外事件!!!,请关闭重试"); } }
public static Frm_NoReceiveMoney Create(string orderId = null, string payPrice = null) { _orderId = orderId; _waitPayPrice = payPrice; if (_form == null) { _form = new Frm_NoReceiveMoney(); } return(_form); }
public static Frm_NoReceiveMoney Create(int entityId = int.MaxValue) { //修改 if (entityId != int.MaxValue) { _entityId = entityId; NoReceiveMoney noReceiveMoney = DataManager.NoReceiveMoneyBLL.GetEntityById(entityId); _orderId = noReceiveMoney.OrderId; } if (_form == null) { _form = new Frm_NoReceiveMoney(); } return(_form); }