using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
|
namespace MES
|
{
|
public partial class Sc_CheckOver : Form
|
{
|
public Sc_CheckOver()
|
{
|
InitializeComponent();
|
}
|
|
public long HInterID;
|
public int IsOk;
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
|
private void cmdCancel_Click(object sender, EventArgs e)
|
{
|
IsOk = 2;
|
this.Close();
|
}
|
|
private void cmdOK_Click(object sender, EventArgs e)
|
{
|
IsOk = 1;
|
Save("ºÏ¸ñ");
|
this.Close();
|
}
|
|
private void Xs_SellOutDayReportDlg_Activated(object sender, EventArgs e)
|
{
|
}
|
|
private void timer1_Tick(object sender, EventArgs e)
|
{
|
timer1.Enabled = false;
|
IsOk = 0;
|
Show();
|
}
|
|
private void Show()
|
{
|
DataSet oDs = new DataSet();
|
oDs = oCn.RunProcReturn(" Select * From h_v_Sc_ProcessReportList where HMainID=" + HInterID.ToString(), "h_v_Sc_ProcessReportList");
|
if (oDs == null || oDs.Tables[0].Rows.Count == 0)
|
return;
|
txtHBillNo.Tag = DBUtility.ClsPub.isLong(oDs.Tables[0].Rows[0]["HMainID"]);
|
txtHBillNo.Text = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["µ¥¾ÝºÅ"]);
|
txtHNumber.Tag = DBUtility.ClsPub.isLong(oDs.Tables[0].Rows[0]["HMaterID"]);
|
txtHNumber.Text = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["ÎïÁÏ´úÂë"]);
|
txtHName.Text = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["ÎïÁÏÃû³Æ"]);
|
txtHModel.Text = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["¹æ¸ñÐͺÅ"]);
|
txtHQty.Text = DBUtility.ClsPub.isDoule(oDs.Tables[0].Rows[0]["ÊýÁ¿"]).ToString();
|
txtHBadCount.Text = DBUtility.ClsPub.isDoule(oDs.Tables[0].Rows[0]["²»Á¼ÊýÁ¿"]).ToString();
|
txtHWasterQty.Text = DBUtility.ClsPub.isDoule(oDs.Tables[0].Rows[0]["±¨·ÏÊý"]).ToString();
|
}
|
|
private void Save(string status)
|
{
|
try
|
{
|
oCn.BeginTran();
|
int HBillStatus = 0;
|
if (status == "ºÏ¸ñ")
|
{
|
HBillStatus = 16;
|
}
|
if (status == "²»ºÏ¸ñ")
|
{
|
HBillStatus = 17;
|
}
|
oCn.RunProc(" update Sc_ProcessReportMain set HBillStatus=" + HBillStatus + ", HCheckStatus='" + status + "' where HInterID=" + HInterID.ToString());
|
MessageBox.Show("¼ìÑéÅж¨³É¹¦£¡", "Ìáʾ");
|
oCn.Commit();
|
}
|
catch (Exception e)
|
{
|
oCn.RollBack();
|
throw (e);
|
}
|
}
|
|
private void cmdNoOK_Click(object sender, EventArgs e)
|
{
|
IsOk = 1;
|
Save("²»ºÏ¸ñ");
|
this.Close();
|
}
|
|
|
|
|
}
|
}
|