| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace SCM |
| | | { |
| | | public partial class Gy_BarCodeDetailList : Form |
| | | { |
| | | //[h_c_barcodedetail] |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.ComponentModel;
|
| | | using System.Data;
|
| | | using System.Drawing;
|
| | | using System.Text;
|
| | | using System.Windows.Forms;
|
| | |
|
| | | namespace SCM
|
| | | {
|
| | | public partial class Gy_BarCodeDetailList : Form
|
| | | {
|
| | | //[h_c_barcodedetail]
|
| | | //h_c_barcodemain
|
| | | public Gy_BarCodeDetailList() |
| | | { |
| | | InitializeComponent(); |
| | | dateTimePicker1.Text = DateTime.Now.AddDays(-7).ToString(); |
| | | dateTimePicker2.Text = DateTime.Now.ToString(); |
| | | comboBox1.SelectedItem = "å
¨é¨"; |
| | | comboBox2.SelectedItem = "é»è®¤æåº"; |
| | | oWeb.Url = SCM.ClsPub1.WEBSURL; |
| | | } |
| | | public frmBillQueryCondition_Base frmCondition; |
| | | public string ViewName = "h_c_barcodedetail"; |
| | | public string ModCaption = "æåååæ£éªæç»è¡¨"; |
| | | public const string ModName = "1250"; |
| | | public string sDlgWhere = ""; //å¤çªä½éå
¥ |
| | | public int selectRow = 0; |
| | | SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1(); |
| | | /// <summary> |
| | | /// æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void cx_Click(object sender, EventArgs e) |
| | | { |
| | | Display(); |
| | | } |
| | | public void SetCondition(frmBillQueryCondition_Base frmCondition, string ViewName, string Name) |
| | | { |
| | | frmCondition.Tag = ""; |
| | | frmCondition.ViewName = ViewName; |
| | | frmCondition.ModName = Name; |
| | | } |
| | | private void Display() |
| | | { |
| | | StringBuilder whereBuilder = new StringBuilder(); |
| | | if (string.IsNullOrEmpty(dateTimePicker1.Text) || string.IsNullOrEmpty(dateTimePicker2.Text)) |
| | | { |
| | | MessageBox.Show("è¾å
¥æ¶é´ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | if(DateTime.Parse(dateTimePicker1.Text)> DateTime.Parse(dateTimePicker2.Text)) |
| | | { |
| | | MessageBox.Show("å¼å§æ¶é´ä¸è½å¤§äºæªè³æ¶é´"); |
| | | return; |
| | | } |
| | | whereBuilder.Append(" and a.HMakeDate>''"+dateTimePicker1.Text+"'' and a.HMakeDate<''"+dateTimePicker2.Text+"''"); |
| | | if (!string.IsNullOrEmpty(txtHBillNo.Text)) |
| | | whereBuilder.Append(" and a.HMaterName like ''"+txtHBillNo.Text+"''"); |
| | | if(!string.IsNullOrEmpty(textBox1.Text)) |
| | | whereBuilder.Append(" and b.FNUMBER like ''%"+textBox1.Text+"%'"); |
| | | if (!string.IsNullOrEmpty(textBox2.Text)) |
| | | whereBuilder.Append(" and c.FLOT_TEXT like ''%"+textBox2.Text+"%''"); |
| | | if(comboBox1.Text!="å
¨é¨") |
| | | whereBuilder.Append(" and a.HRemark=''"+comboBox1.Text+"''"); |
| | | if (!string.IsNullOrEmpty(textBox4.Text)) |
| | | whereBuilder.Append(" and d.HName like ''%"+textBox4.Text+"%''"); |
| | | if (!string.IsNullOrEmpty(textBox5.Text)) |
| | | whereBuilder.Append(" and e.HName like ''%"+textBox5.Text+"%''"); |
| | | if (!string.IsNullOrEmpty(textBox6.Text)) |
| | | whereBuilder.Append(" and a.HWorkLineName like ''%"+textBox6.Text+"%''"); |
| | | string orderBy = " order by a.HMakeDate desc "; |
| | | if(comboBox2.Text=="产ååç§°") |
| | | { |
| | | orderBy = " order by a.HMaterName desc "; |
| | | } |
| | | if(comboBox2.Text=="æ¹æ¬¡æåº") |
| | | { |
| | | orderBy = " order by a.HBatchNo desc"; |
| | | } |
| | | string execSql = "exec "+ViewName+" '"+whereBuilder+"','"+orderBy+"'"; |
| | | DataSet DSet = oWeb.getDataSetBySQL(execSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | // |
| | | grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | //å»ç» |
| | | //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); |
| | | //string s = frmCondition.cmbHComplete.Text; |
| | | //ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol); |
| | | } |
| | | /// <summary> |
| | | /// éåº |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void tc_Click(object sender, EventArgs e) |
| | | { |
| | | this.Close(); |
| | | } |
| | | |
| | | private void groupBox1_Enter(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | |
| | | private void label9_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | | public Gy_BarCodeDetailList()
|
| | | {
|
| | | InitializeComponent();
|
| | | dateTimePicker1.Text = DateTime.Now.AddDays(-7).ToString();
|
| | | dateTimePicker2.Text = DateTime.Now.ToString();
|
| | | comboBox1.SelectedItem = "å
¨é¨";
|
| | | comboBox2.SelectedItem = "é»è®¤æåº";
|
| | | oWeb.Url = SCM.ClsPub1.WEBSURL;
|
| | | }
|
| | | public frmBillQueryCondition_Base frmCondition;
|
| | | public string ViewName = "h_c_barcodedetail";
|
| | | public string ModCaption = "æåååæ£éªæç»è¡¨";
|
| | | public const string ModName = "1250";
|
| | | public string sDlgWhere = ""; //å¤çªä½éå
¥
|
| | | public int selectRow = 0;
|
| | | SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
|
| | | /// <summary>
|
| | | /// æ¥è¯¢
|
| | | /// </summary>
|
| | | /// <param name="sender"></param>
|
| | | /// <param name="e"></param>
|
| | | private void cx_Click(object sender, EventArgs e)
|
| | | {
|
| | | Display();
|
| | | }
|
| | | public void SetCondition(frmBillQueryCondition_Base frmCondition, string ViewName, string Name)
|
| | | {
|
| | | frmCondition.Tag = "";
|
| | | frmCondition.ViewName = ViewName;
|
| | | frmCondition.ModName = Name;
|
| | | }
|
| | | private void Display()
|
| | | {
|
| | | StringBuilder whereBuilder = new StringBuilder();
|
| | | if (string.IsNullOrEmpty(dateTimePicker1.Text) || string.IsNullOrEmpty(dateTimePicker2.Text))
|
| | | {
|
| | | MessageBox.Show("è¾å
¥æ¶é´ä¸è½ä¸ºç©º");
|
| | | return;
|
| | | }
|
| | | if(DateTime.Parse(dateTimePicker1.Text)> DateTime.Parse(dateTimePicker2.Text))
|
| | | {
|
| | | MessageBox.Show("å¼å§æ¶é´ä¸è½å¤§äºæªè³æ¶é´");
|
| | | return;
|
| | | }
|
| | | whereBuilder.Append(" and a.HMakeDate>''"+dateTimePicker1.Text+"'' and a.HMakeDate<''"+dateTimePicker2.Text+"''");
|
| | | if (!string.IsNullOrEmpty(txtHBillNo.Text))
|
| | | whereBuilder.Append(" and a.HMaterName like ''%"+txtHBillNo.Text+"%''");
|
| | | if(!string.IsNullOrEmpty(textBox1.Text))
|
| | | whereBuilder.Append(" and b.FNUMBER like ''%"+textBox1.Text+"%'");
|
| | | if (!string.IsNullOrEmpty(textBox2.Text))
|
| | | whereBuilder.Append(" and c.FLOT_TEXT like ''%"+textBox2.Text+"%''");
|
| | | if(comboBox1.Text!="å
¨é¨")
|
| | | whereBuilder.Append(" and a.HRemark=''"+comboBox1.Text+"''");
|
| | | if (!string.IsNullOrEmpty(textBox4.Text))
|
| | | whereBuilder.Append(" and d.HName like ''%"+textBox4.Text+"%''");
|
| | | if (!string.IsNullOrEmpty(textBox5.Text))
|
| | | whereBuilder.Append(" and e.HName like ''%"+textBox5.Text+"%''");
|
| | | if (!string.IsNullOrEmpty(textBox6.Text))
|
| | | whereBuilder.Append(" and a.HWorkLineName like ''%"+textBox6.Text+"%''");
|
| | | string orderBy = " order by a.HMakeDate desc ";
|
| | | if(comboBox2.Text=="产ååç§°")
|
| | | {
|
| | | orderBy = " order by a.HMaterName desc ";
|
| | | }
|
| | | if(comboBox2.Text=="æ¹æ¬¡æåº")
|
| | | {
|
| | | orderBy = " order by a.HBatchNo desc";
|
| | | }
|
| | | string execSql = "exec "+ViewName+" '"+whereBuilder+"','"+orderBy+"'";
|
| | | DataSet DSet = oWeb.getDataSetBySQL(execSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | //çæé¦è¡æ é¢
|
| | | if (DSet == null)
|
| | | {
|
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo);
|
| | | return;
|
| | | }
|
| | | //
|
| | | grdMain.DataSource = DSet.Tables[0].DefaultView;
|
| | | //å»ç»
|
| | | //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
|
| | | //string s = frmCondition.cmbHComplete.Text;
|
| | | //ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol);
|
| | | }
|
| | | /// <summary>
|
| | | /// éåº
|
| | | /// </summary>
|
| | | /// <param name="sender"></param>
|
| | | /// <param name="e"></param>
|
| | | private void tc_Click(object sender, EventArgs e)
|
| | | {
|
| | | this.Close();
|
| | | }
|
| | |
|
| | | private void groupBox1_Enter(object sender, EventArgs e)
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void label9_Click(object sender, EventArgs e)
|
| | | {
|
| | |
|
| | | }
|
| | | }
|
| | | }
|