You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
148 lines
4.8 KiB
C#
148 lines
4.8 KiB
C#
using POSV.Card;
|
|
using POSV.Component;
|
|
using POSV.Utils;
|
|
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 POSV.Member
|
|
{
|
|
public partial class CardMissForm : BusinessForm
|
|
{
|
|
private string cardNo;
|
|
public CardMissForm(string cardNo)
|
|
{
|
|
InitializeComponent();
|
|
this.controlBox.Text = "会员卡挂失";
|
|
this.controlBox.ShowApplicationVersion = false;
|
|
this.cardNolabelX.Text = cardNo;//会员卡号
|
|
this.cardNo = cardNo;
|
|
|
|
this.numericTextBox1.Focus();
|
|
this.numericTextBox1.SelectAll();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 挂失
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void BtnMissConfirm(object sender, EventArgs e)
|
|
{
|
|
if (cardNo == null)
|
|
{
|
|
ShowMessage(this.lblInfo, "请选择要操作的卡号", true);
|
|
return;
|
|
}
|
|
|
|
if (this.numericTextBox1.Text == null || "".Equals(this.numericTextBox1.Text))
|
|
{
|
|
ShowMessage(this.lblInfo, "请输入密码", true);
|
|
return;
|
|
}
|
|
string passwd = DesUtils.Encrypt(this.numericTextBox1.Text) ;
|
|
|
|
CardMissConfirmRequest request = new CardMissConfirmRequest();
|
|
request.CardNo = cardNo;
|
|
request.Passwd = passwd;
|
|
request.ShopNo = Global.Instance.Authc.StoreNo;
|
|
request.PosNo = Global.Instance.Authc.PosNo;
|
|
request.WorkerNo = Global.Instance.Worker.No;
|
|
request.SourceSign = "pos";
|
|
var response = CardUtils.CardMissConfirm(request);
|
|
if (response != null)
|
|
{
|
|
ShowMessage(this.lblInfo, response.Item2, true);
|
|
if (response.Item1)
|
|
{
|
|
OnResultClick?.Invoke(sender, new NotifyEventArgs(NotifyAction.Notify, "cardMiss", this.cardNo));
|
|
//先关闭父窗体
|
|
if (this.Owner != null)
|
|
{
|
|
this.Owner.Close();
|
|
}
|
|
//再关闭当前窗体
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 解除挂失
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void BtnMissRelease(object sender, EventArgs e)
|
|
{
|
|
if (cardNo == null)
|
|
{
|
|
ShowMessage(this.lblInfo, "请选择要操作的卡号", true);
|
|
return;
|
|
}
|
|
if (this.numericTextBox1.Text == null || "".Equals(this.numericTextBox1.Text))
|
|
{
|
|
ShowMessage(this.lblInfo, "请输入密码", true);
|
|
return;
|
|
}
|
|
string passwd = DesUtils.Encrypt(this.numericTextBox1.Text);
|
|
|
|
CardMissReleaseRequest request = new CardMissReleaseRequest();
|
|
request.CardNo = cardNo;
|
|
request.Passwd = passwd;
|
|
request.ShopNo = Global.Instance.Authc.StoreNo;
|
|
request.PosNo = Global.Instance.Authc.PosNo;
|
|
request.WorkerNo = Global.Instance.Worker.No;
|
|
request.SourceSign = "pos";
|
|
var response = CardUtils.CardMissRelease(request);
|
|
if (response != null)
|
|
{
|
|
ShowMessage(this.lblInfo, response.Item2, true);
|
|
if (response.Item1) {
|
|
OnResultClick?.Invoke(sender, new NotifyEventArgs(NotifyAction.Notify, "memberRecharge", this.cardNo));
|
|
//先关闭父窗体
|
|
if (this.Owner != null)
|
|
{
|
|
this.Owner.Close();
|
|
}
|
|
//再关闭当前窗体
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
private void OnCloseTouchClick(object sender, EventArgs e)
|
|
{
|
|
//先关闭父窗体
|
|
if (this.Owner != null)
|
|
{
|
|
this.Owner.Close();
|
|
}
|
|
//再关闭当前窗体
|
|
this.Close();
|
|
|
|
}
|
|
|
|
public event NofityEventHandler OnResultClick;
|
|
|
|
private void OnBtnCustomClick(object sender, EventArgs e)
|
|
{
|
|
var item = sender as NumericTextBox;
|
|
|
|
NumericKeyboard.ShowKeyboard(this, item);
|
|
}
|
|
/// <summary>
|
|
/// 回车事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnPwdEnter(object sender, EnterEventArg e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|