本文整理汇总了C#中Payment.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Payment.ShowDialog方法的具体用法?C# Payment.ShowDialog怎么用?C# Payment.ShowDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Payment
的用法示例。
在下文中一共展示了Payment.ShowDialog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btPayDiscount_Click
private void btPayDiscount_Click(object sender, EventArgs e)
{
_mainForm.RefreshData(_invmasterRow);
if (!_mainForm.SaveToBase(_invmasterRow))
{
return;
}
decimal disc;
decimal pr = _mainForm.LocalSettingRow.PrDiscount;
disc = Decimal.Round(_invmasterRow.Sum * (pr / 100), 2);
//посчитать скидку
if (disc == 0)
{
MessageBox.Show("Оплата со скидкой не возможна!");
return;
}
_invmasterRow.Sum -= disc;
Payment _frmPay = new Payment(_invmasterRow);
if (DialogResult.OK == _frmPay.ShowDialog(this))
{
_Changes = _frmPay.Change;
_cashCustomer = _frmPay.CashCustomer;
_invmasterRow.Discount = disc;
if (this.CloseCeck(Convert.ToDecimal(_frmPay.CashCustomer.ToString()), 0 - disc, false))
{
this._mainForm.SaveToBase(_invmasterRow);
this.DialogResult = DialogResult.OK;
}
}
else
{
_invmasterRow.RejectChanges();
}
}
示例2: btPay_Click
private void btPay_Click(object sender, EventArgs e)
{
_mainForm.RefreshData(_invmasterRow);
Payment _frmPay = new Payment(_invmasterRow);
if (DialogResult.OK == _frmPay.ShowDialog(this))
{
_Changes = _frmPay.Change;
_cashCustomer = _frmPay.CashCustomer;
if ( this.CloseCeck(Convert.ToDecimal(_frmPay.CashCustomer.ToString())))
{
this.DialogResult = DialogResult.OK;
}
}
}
示例3: btPay_Click
private void btPay_Click(object sender, EventArgs e)
{
/*if (_invmasterRow.RowState == DataRowState.Unchanged)
_invmasterRow.SetModified();
*/
if (!(_mainForm.RefreshData(_invmasterRow)))
{
MessageBox.Show("Ошибка сохранения данных!");
return;
}
if (this.isError)
{
MessageBox.Show("Ошибка данных!");
return;
}
if (_invmasterRow.Sum == 0)
{
MessageBox.Show("Нулевая сумма чека !!!", "Ошибка оплаты", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
Payment _frmPay = new Payment(_invmasterRow);
if (DialogResult.OK == _frmPay.ShowDialog(this))
{
_Changes = _frmPay.Change;
_cashCustomer = _frmPay.CashCustomer;
decimal baseSum = _invmasterRow.Sum;
if (this.CloseCeck(Convert.ToDecimal(_frmPay.CashCustomer.ToString()), 0, false))
{
this.DialogResult = DialogResult.OK;
}
}
}