using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LYFZ.Software.UI.OAShopManagement
{
public partial class frmActionPay : LYFZ.ComponentLibrary.BaseContentsFormMain
{
public decimal amount { get; set; }
///
/// 执行付款窗体
///
public frmActionPay()
{
InitializeComponent();
btn_Close.Click += btn_Click;
}
///
//绑定支付内容
///
///
///
public virtual void BindInfoData(string payType,decimal _amount)
{
amount = _amount;
lab_PayAmount.Text = _amount.ToString("0.00") + "元";
this.lab_PayType.Text = payType;
}
///
/// 进程获取活动窗体的按键信息
///
///
///
///
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
BindPayActionData();
}
else if (keyData == Keys.Escape)
{
btn_Click(null, null);
}
return base.ProcessCmdKey(ref msg, keyData);
}
///
/// 执行付款操作
///
protected virtual void BindPayActionData()
{
if(lab_PayType.Text.IndexOf("微信")!=-1)
{
WeiXinPay(txt_AuCode.Text, amount);
}
else if(lab_PayType.Text.IndexOf("支付宝")!=-1)
{
AliyPay(txt_AuCode.Text, amount);
}
else
{
MessageBoxCustom.Show("未找到匹配的支付方式");
}
}
///
/// 微信付款
///
/// 付款码
/// 付款金额
protected virtual void WeiXinPay(string txtCode,decimal amount)
{
}
///
/// 支付宝支付
///
/// 付款码
/// 付款金额
protected virtual void AliyPay(string txtCode, decimal amount)
{
}
public virtual void btn_Click(object sender, EventArgs e)
{
this.Close();
}
private void btn_OK_Click(object sender, EventArgs e)
{
BindPayActionData();
}
}
}