//支付流水修改 private void btn_Alter_Click(object sender, EventArgs e) { if (_pay.flow_no != null || this.dgvPayWay.Rows.Count < 1) { if (ExtendUtility.Instance.ParseToDateTime(_pay.oper_date).ToString("yyyy/MM/dd") == System.DateTime.Now.Date.ToString("yyyy/MM/dd")) { if (_pay.oper_id == Gattr.OperId) { //当前流水的交易方式 string payName = ExtendUtility.Instance.ParseToString(this.dgvPayWay.Rows[this.dgvPayWay.CurrentRow.Index].Cells["pay_name"].Value.ToString().Trim()); if (payName == "余额支付" || payName == "人民币付款找零") { MessageBox.Show(payName + "支付禁止修改!", Gattr.AppTitle); return; } _pay.flow_id = ExtendUtility.Instance.ParseToInt32(this.dgvPayWay.Rows[this.dgvPayWay.CurrentRow.Index].Cells["flow_id"].Value.ToString().Trim()); _pay.pay_amount = ExtendUtility.Instance.ParseToDecimal(this.dgvPayWay.Rows[this.dgvPayWay.CurrentRow.Index].Cells["pay_amount"].Value.ToString().Trim()); FrmPayWayAlter frmPayWayAlter = new FrmPayWayAlter(_pay, false, isArrearage); DialogResult resultPayWay = frmPayWayAlter.ShowDialog(); //修改成功则重新获取当前订单的支付信息 if (resultPayWay == DialogResult.OK) { LoadData(); } } else { MessageBox.Show("您无权限操作本单!只可以修改自己的单据"); LoggerHelper.Log("MsmkLogger", Gattr.OperId + "试图操作无权限挂账订单" + _pay.flow_no, LogEnum.SysLog); } } else { MessageBox.Show("只可以修改当日的单据"); } } else { MessageBox.Show("未查询到订单!"); } }
//添加支付流水 private void btn_Add_Click(object sender, EventArgs e) { if (_pay.flow_no != null) { if (_pay.oper_id == Gattr.OperId) { FrmPayWayAlter frmPayWayAlter = new FrmPayWayAlter(_pay, true, isArrearage); DialogResult resultPayWay = frmPayWayAlter.ShowDialog(); if (resultPayWay == DialogResult.OK) { LoadData(); } } else { MessageBox.Show("您无权限操作本单!只可以修改自己的单据"); LoggerHelper.Log("MsmkLogger", Gattr.OperId + "试图操作无权限挂账订单" + _pay.flow_no, LogEnum.SysLog); } } else { MessageBox.Show("未查询到订单!"); } }