101 lines
2.6 KiB
C#
101 lines
2.6 KiB
C#
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 SOH.QianTai
|
|
{
|
|
public partial class frm_YanZheng : Form
|
|
{
|
|
int id;
|
|
string orderid;
|
|
byte state;
|
|
public frm_YanZheng()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void y1_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (y1.Text.Length >= 4)
|
|
{
|
|
y1.Text = y1.Text.Substring(0, 4);
|
|
y2.Focus();
|
|
}
|
|
}
|
|
|
|
private void y2_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (y2.Text.Length >= 4)
|
|
{
|
|
y2.Text = y2.Text.Substring(0, 4);
|
|
y3.Focus();
|
|
}
|
|
}
|
|
|
|
private void y3_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (y3.Text.Length >= 4)
|
|
{
|
|
y3.Text = y3.Text.Substring(0, 4);
|
|
string yzm = y1.Text + "-" + y2.Text + "-" + y3.Text;
|
|
TianRui.FuWuSoapClient fw = new TianRui.FuWuSoapClient();
|
|
var yz = fw.GetDingDan(yzm);
|
|
lbl_tcmc.Text = yz.TaoCanMingCheng;
|
|
lbl_tcjg.Text = yz.DingDanJiaGe.ToString();
|
|
lbl_ddsj.Text = yz.DingDanShiJian.ToString("yyyy-MM-dd HH:mm:ss");
|
|
lbl_ddzt.Text = yz.state == 0 ? "未使用" : "已使用";
|
|
id = yz.id;
|
|
orderid = yz.orderid;
|
|
state = yz.state;
|
|
}
|
|
}
|
|
|
|
private void y1_Enter(object sender, EventArgs e)
|
|
{
|
|
y1.SelectAll();
|
|
}
|
|
|
|
private void y2_Enter(object sender, EventArgs e)
|
|
{
|
|
|
|
y2.SelectAll();
|
|
}
|
|
|
|
private void y3_Enter(object sender, EventArgs e)
|
|
{
|
|
|
|
y3.SelectAll();
|
|
}
|
|
|
|
private void frm_YanZheng_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
if(state==1)
|
|
{
|
|
MessageBox.Show("你的套餐已经使用不能重复使用!");
|
|
return;
|
|
}
|
|
TianRui.FuWuSoapClient fw = new TianRui.FuWuSoapClient();
|
|
|
|
fw.XiaoFei(id.ToString(), LoginUser.yydm, LoginUser.username);
|
|
var jbyw = this.Owner as frmJiBenYeWu;
|
|
jbyw.lbl_wdh.Text = orderid;
|
|
jbyw.lbl_wdjg.Text = lbl_tcjg.Text;
|
|
jbyw.lbl_tcmc.Text = lbl_tcmc.Text;
|
|
this.Close();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|