You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.1 KiB
77 lines
2.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using DevExpress.XtraEditors;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
using ICSSoft.Frame.Data.BLL;
|
|
using ICSSoft.Base.Config.AppConfig;
|
|
namespace ICSSoft.Frame.APP
|
|
{
|
|
public partial class FormICSMO2RCARDSearch : DevExpress.XtraEditors.XtraForm
|
|
{
|
|
private string MoId = "";
|
|
private string MoCode = "";
|
|
private decimal Qty = 0.00m;
|
|
public FormICSMO2RCARDSearch()
|
|
{
|
|
InitializeComponent();
|
|
|
|
}
|
|
public FormICSMO2RCARDSearch(string moid,string mocode,decimal qty)
|
|
{
|
|
InitializeComponent();
|
|
MoId = moid;
|
|
MoCode = mocode;
|
|
Qty = qty;
|
|
txtMoCode.Properties.ReadOnly = true;
|
|
txtMoCode.Text = MoCode;
|
|
int a = Convert.ToInt32(qty);
|
|
txtqty.Text = Convert.ToString(a);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
int shuliang = int.Parse(txtqty.Text);
|
|
string rac = "";
|
|
int max = 0;
|
|
List<string> rcard = new List<string>();
|
|
max = ICSMOBLL.SearchMaxS(MoCode, AppConfig.AppConnectString);
|
|
|
|
for (int i = 0; i < shuliang; i++)
|
|
{
|
|
rac = "";
|
|
max++;
|
|
rac = max.ToString().PadLeft(5, '0');
|
|
rac = MoCode + rac;
|
|
rcard.Add(rac);
|
|
}
|
|
ICSMOBLL.AddMO2RCARD(rcard, MoId, MoCode, AppConfig.AppConnectString);
|
|
ICSBaseSimpleCode.AppshowMessageBox("生成成功");
|
|
|
|
this.Close();
|
|
this.DialogResult = DialogResult.Yes;
|
|
}
|
|
#region 关闭
|
|
private void btnCancle_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
this.DialogResult = DialogResult.Cancel;
|
|
}
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
this.DialogResult = DialogResult.Cancel;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|