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.
124 lines
4.0 KiB
124 lines
4.0 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.WinBiz.JISAdmin;
|
||
|
using Gm_WMS.DataAccess.DataService;
|
||
|
using System.IO;
|
||
|
|
||
|
namespace Stone.WinModule.BasicData
|
||
|
{
|
||
|
public partial class frmCallOff : Stone.WinModule.frmBase
|
||
|
{
|
||
|
public bool IsSample = false;
|
||
|
EntityBase v_JIS_Tod_List = new Entity_v_JIS_Tod_List();
|
||
|
public frmCallOff()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
|
||
|
try
|
||
|
{
|
||
|
this.txtPackageGroupName.DataSource = new Entity_t_Sys_AppconfigItem().GetData("Code='print_group'").Tables[0];
|
||
|
this.txtPackageGroupName.ValueMember = "Value1";
|
||
|
this.txtPackageGroupName.DisplayMember = "Value1";
|
||
|
|
||
|
this.dateTimePicker1.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
|
||
|
this.dateTimePicker2.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);
|
||
|
|
||
|
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
private void frmEdiPrintAssemble_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
if (IsSample) v_JIS_Tod_List = new Entity_v_JIS_Tod_List_JY();
|
||
|
|
||
|
}
|
||
|
|
||
|
private void btnQuery_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
string PackageGroupName = this.txtPackageGroupName.SelectedValue.ToString();
|
||
|
string d1 = this.dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:00");
|
||
|
string d2 = this.dateTimePicker2.Value.ToString("yyyy-MM-dd HH:mm:00");
|
||
|
|
||
|
string strWhere = "{0} [SwetTime]>='{1}' and [SwetTime]<='{2}' {3} {4}";
|
||
|
if (IsSample)
|
||
|
{
|
||
|
strWhere = "{0} [time]>='{1}' and [time]<='{2}' {3} {4}";
|
||
|
}
|
||
|
object[] obj = new object[10];
|
||
|
obj[0] = PackageGroupName != "" ? "[PackageGroupName]='" + PackageGroupName + "' and " : "";
|
||
|
obj[1] = d1;
|
||
|
obj[2] = d2;
|
||
|
obj[3] = this.txtOrderNumber.Text.Trim() != "" ? " and ([OrderNumber]='" + this.txtOrderNumber.Text.Trim() + "' or [partNumber]='" + this.txtOrderNumber.Text.Trim() + "')" : "";
|
||
|
obj[4] = IsSample ? " and [OrderNumber] like '6%'" : "";
|
||
|
|
||
|
strWhere = string.Format(strWhere, obj);
|
||
|
|
||
|
|
||
|
|
||
|
this.dgrdView1.DataSource = v_JIS_Tod_List.GetData("", strWhere, "[SequenceNumber] asc").Tables[0];
|
||
|
MyGridViewStyle.SetDataGridRowNumber(this.dgrdView1);
|
||
|
MyGridViewStyle.SetDataGridMenuCommon(this.dgrdView1);
|
||
|
MyGridViewStyle.GetGridViewState(this.dgrdView1, this.Text);
|
||
|
this.dgrdView1.Columns["ID"].Visible = false;
|
||
|
this.dgrdView1.Columns["SequenceNumber"].HeaderText = "EINSTEIN Seq";
|
||
|
|
||
|
|
||
|
this.lblShow.Text = "记录:" + this.dgrdView1.Rows.Count;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void btnSet_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MyGridViewStyle.Show(this.dgrdView1, this.Text);
|
||
|
}
|
||
|
|
||
|
private void btnOutPut_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
Stone.Common.MyExport.ShowExport(this.dgrdView1);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
MyMessageBox.ShowInfoMessage(ex.Message);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void frmEdiPrintAssemble_FormClosing(object sender, FormClosingEventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
MyGridViewStyle.SaveGridViewState(this.dgrdView1, this.Text);
|
||
|
}
|
||
|
catch
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|