| | |
| | | dateTimePicker2.Text = DateTime.Now.ToString(); |
| | | comboBox1.SelectedItem = "å
¨é¨"; |
| | | comboBox2.SelectedItem = "é»è®¤æåº"; |
| | | oWeb.Url = SCM.ClsPub1.WEBSURL; |
| | | } |
| | | public frmBillQueryCondition_Base frmCondition; |
| | | public string ViewName = "h_c_barcodedetail"; |
| | |
| | | MessageBox.Show("å¼å§æ¶é´ä¸è½å¤§äºæªè³æ¶é´"); |
| | | return; |
| | | } |
| | | whereBuilder.Append($" and a.HMakeDate>'{dateTimePicker1.Text}' and a.HMakeDate<'{dateTimePicker2.Text}'"); |
| | | 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}%'"); |
| | | whereBuilder.Append($" and a.HMaterName like ''%{txtHBillNo.Text}%''"); |
| | | if(!string.IsNullOrEmpty(textBox1.Text)) |
| | | whereBuilder.Append($" and b.FNUMBER like '%{textBox1.Text}%'"); |
| | | whereBuilder.Append($" and b.FNUMBER like ''%{textBox1.Text}%''"); |
| | | if (!string.IsNullOrEmpty(textBox2.Text)) |
| | | whereBuilder.Append($" and c.FLOT_TEXT like '%{textBox2.Text}%'"); |
| | | whereBuilder.Append($" and c.FLOT_TEXT like ''%{textBox2.Text}%''"); |
| | | if(comboBox1.Text!="å
¨é¨") |
| | | whereBuilder.Append($" and a.HRemark='{comboBox1.Text}'"); |
| | | whereBuilder.Append($" and a.HRemark=''{comboBox1.Text}''"); |
| | | if (!string.IsNullOrEmpty(textBox4.Text)) |
| | | whereBuilder.Append($" and d.HName like '%{textBox4.Text}%'"); |
| | | whereBuilder.Append($" and d.HName like ''%{textBox4.Text}%''"); |
| | | if (!string.IsNullOrEmpty(textBox5.Text)) |
| | | whereBuilder.Append($" and e.HName like '%{textBox5.Text}%'"); |
| | | whereBuilder.Append($" and e.HName like ''%{textBox5.Text}%''"); |
| | | if (!string.IsNullOrEmpty(textBox6.Text)) |
| | | whereBuilder.Append($" and a.HWorkLineName like '%{textBox6.Text}%'"); |
| | | whereBuilder.Append($" and a.HWorkLineName like ''%{textBox6.Text}%''"); |
| | | string orderBy = " order by a.HMakeDate desc "; |
| | | if(comboBox2.Text=="产ååç§°") |
| | | { |
| | |
| | | { |
| | | orderBy = " order by a.HBatchNo desc"; |
| | | } |
| | | string execSql = $"exec {ViewName} {whereBuilder},{orderBy}"; |
| | | string execSql = $"exec {ViewName} '{whereBuilder}','{orderBy}'"; |
| | | DataSet DSet = oWeb.getDataSetBySQL(execSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | |
| | | // |
| | | 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); |
| | | //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); |
| | | //string s = frmCondition.cmbHComplete.Text; |
| | | //ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol); |
| | | } |
| | | /// <summary> |
| | | /// éåº |