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.
113 lines
3.2 KiB
113 lines
3.2 KiB
3 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using System.Data;
|
||
|
using System.Drawing;
|
||
|
using System.Text;
|
||
|
using System.Windows.Forms;
|
||
|
using Stone.Common;
|
||
|
using Stone.Entity;
|
||
|
|
||
|
namespace Stone.WinModule.JISData
|
||
|
{
|
||
|
public partial class frmJISATP : Stone.WinModule.BasicData.frmBaseMain
|
||
|
{
|
||
|
public frmJISATP()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
|
||
|
|
||
|
this.tlbAdd.Visible = false;
|
||
|
this.tlbAddCopy.Visible = false;
|
||
|
this.tlbEdit.Visible = false;
|
||
|
this.tlbDelete.Visible = false;
|
||
|
this.tlbInput.Visible = false;
|
||
|
this.tlbFilter.Visible = false;
|
||
|
|
||
|
|
||
|
this.txtPackageGroupName.DataSource = new Entity_t_Sys_AppconfigItem().GetData("[Code]='print_group'").Tables[0];
|
||
|
this.txtPackageGroupName.DisplayMember = "Value1";
|
||
|
this.txtPackageGroupName.ValueMember = "Value1";
|
||
|
}
|
||
|
|
||
|
public override void init()
|
||
|
{
|
||
|
this.strWhere = "ID = 0";
|
||
|
try
|
||
|
{
|
||
|
strWhere = "convert(varchar(10),[expectedAssemblyDate],120)='" + MyDateTime.Format(MyDateTimeType.Date) + "'";
|
||
|
}
|
||
|
catch { }
|
||
|
base.init();
|
||
|
|
||
|
}
|
||
|
|
||
|
public override void Search(string code)
|
||
|
{
|
||
|
|
||
|
|
||
|
|
||
|
string PackageGroupName = this.txtPackageGroupName.SelectedValue.ToString();
|
||
|
string d1 = MyDateTime.Format(this.dateTimePicker1.Value, MyDateTimeType.Date) + " 00:00:00";
|
||
|
string d2 = MyDateTime.Format(this.dateTimePicker2.Value, MyDateTimeType.Date) + " 23:59:59";
|
||
|
|
||
|
|
||
|
|
||
|
if (code == "")
|
||
|
{
|
||
|
strWhere = "1=1";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
strWhere = " [orderNumber] = '" + code + "'";
|
||
|
}
|
||
|
|
||
|
string strPackageGroupName = "";
|
||
|
if (PackageGroupName == "")
|
||
|
{
|
||
|
strPackageGroupName = "1=1";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
strPackageGroupName = " [PackageGroupName] = '" + PackageGroupName + "'";
|
||
|
}
|
||
|
|
||
|
strWhere = "[expectedAssemblyDate]>='" + d1 + "' and [expectedAssemblyDate]<='" + d2 + "' and (" + strWhere + ")" + " and (" + strPackageGroupName + ")";
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
private void frmJISLog_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
this.timer1.Enabled = true;
|
||
|
}
|
||
|
|
||
|
private void timer1_Tick(object sender, EventArgs e)
|
||
|
{
|
||
|
this.timer1.Enabled = false;
|
||
|
|
||
|
try
|
||
|
{
|
||
|
|
||
|
|
||
|
DataSet dsData = m_Base.entityView.GetDataDistinct("partNumber", "[description] is null", "partNumber");
|
||
|
if (dsData.Tables[0].Rows.Count > 0)
|
||
|
{
|
||
|
|
||
|
frmTodNowProduct frm = new frmTodNowProduct();
|
||
|
frm.dgrdView.DataSource = dsData.Tables[0];
|
||
|
Stone.Common.MyGridViewStyle.SetDataGridRowNumber(frm.dgrdView);
|
||
|
Stone.Common.MyGridViewStyle.SetDataGridMenuCommon(frm.dgrdView);
|
||
|
frm.ShowDialog();
|
||
|
frm.Dispose();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|