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.

81 lines
2.3 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;
using Stone.WinModule.JISData;
namespace Stone.WinModule.JISData
{
public partial class frmJISLAB_All: Stone.WinModule.BasicData.frmBaseMain
{
public frmJISLAB_All()
{
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 = Stone.Common.MyDataSet.GetDataByStrings(";SY78;SY88").Tables[0];
this.txtPackageGroupName.DisplayMember = "Str";
this.txtPackageGroupName.ValueMember = "Str";
this.dateTimePicker2.Value = DateTime.Now.AddYears(2);
}
public override void init()
{
this.strWhere = "ID = 0";
base.init();
}
public override void Search(string code)
{
string d1 = MyDateTime.Format(this.dateTimePicker1.Value, MyDateTimeType.Date);
string d2 = MyDateTime.Format(this.dateTimePicker2.Value, MyDateTimeType.Date);
if (code == "")
{
strWhere = "1=1";
}
else
{
strWhere = " [PartNumber] like '%" + code + "%' or ";
strWhere += " [Description] like '%" + code + "%' or ";
strWhere += " [releaseId] like '%" + code + "%' or ";
strWhere += " [location] like '%" + code + "%' or ";
strWhere += " [locationCode] like '%" + code + "%' or ";
strWhere += " [filename] like '%" + code + "%' ";
}
strWhere = "[startDate]>='" + d1 + "' and [startDate]<='" + d2 + "' and (" + strWhere + ")";
string PackageGroupName = this.txtPackageGroupName.SelectedValue.ToString();
if (PackageGroupName != "")
{
strWhere += $" and [fileType]='{PackageGroupName}'";
}
}
private void frmJISLog_Load(object sender, EventArgs e)
{
}
}
}