| | |
| | | string selectedFolderPath = folderBrowserDialog.SelectedPath; |
| | | // 使用 selectedFolderPath 进行后续操作,例如显示在文本框中 |
| | | this.txtLj.Text = selectedFolderPath; |
| | | //GetCSV_Read(selectedFolderPath); |
| | | GetExcel_Read(selectedFolderPath); |
| | | GetCSV_Read(selectedFolderPath); |
| | | //GetExcel_Read(selectedFolderPath); |
| | | } |
| | | } |
| | | } |
| | |
| | | ") "); |
| | | } |
| | | |
| | | DataSet SetData = oCN.RunProcReturn("select HMakeDate from QC_TakeSampleCheckBillMain where HInterID =" + this.HTakeSampleCheckBillID.Text, "QC_TakeSampleCheckBillMain"); |
| | | string HMakeDate = ""; |
| | | if (SetData.Tables[0].Rows.Count > 0) |
| | | { |
| | | HMakeDate = SetData.Tables[0].Rows[0]["HMakeDate"].ToString(); |
| | | } |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into QC_FirstPieceCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment" + |
| | | ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID" + |
| | | ",HBatchNo) " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,getdate(),'" + this.txtHMaker.Text + "',getdate()" + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,'"+ HMakeDate + "','" + this.txtHMaker.Text + "',getdate()" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" + |
| | | "," + HSourceID + "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HPlanQty + "," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HQty + "," + HMaterID + ",'"+this.labHMakerID.Text + "', " + HLastResults + |
| | |
| | | "," + HProcExchEntryID + ",'" + HProcExchBillNo + "','',0,0," + dataTable.Rows[i]["CharacteristicID"].ToString() + ",'" + dataTable.Rows[i]["HQCStd"].ToString() + "','','"+ dataTable.Rows[i]["HQCStd"].ToString() + "','" + HLastResult + "'" + |
| | | ",'" + dataTable.Rows[i]["HUpLimit"].ToString() + "','" + dataTable.Rows[i]["HDownLimit"].ToString() + "',''" + ",0,0,0,0,0,0,'',0,'" + dataTable.Rows[i]["Actual"].ToString() + "','" + dataTable.Rows[i]["HQCStd"].ToString() + "','" + dataTable.Rows[i]["HUpLimit"].ToString() + "','" + dataTable.Rows[i]["HDownLimit"].ToString() + "','','',0,'2'," + dataTable.Rows[i]["HInspectInstruMentID"].ToString() + ",'" + HLastResult + "'" + ") "); |
| | | } |
| | | DataSet SetData = oCN.RunProcReturn("select HMakeDate from QC_TakeSampleCheckBillMain where HInterID =" + this.HTakeSampleCheckBillID.Text, "QC_TakeSampleCheckBillMain"); |
| | | string HMakeDate = ""; |
| | | if (SetData.Tables[0].Rows.Count > 0) |
| | | { |
| | | HMakeDate = SetData.Tables[0].Rows[0]["HMakeDate"].ToString(); |
| | | } |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into QC_PatrolProcCheckOtherBillMain " + |
| | |
| | | ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment" + |
| | | ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID,HBatchNo) " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,getdate(),'"+this.txtHMaker.Text + "',getdate()" + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,'"+ HMakeDate + "','"+this.txtHMaker.Text + "',getdate()" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" + |
| | | "," + HSourceID + "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HPlanQty + "," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HQty + "," + HMaterID + ",'" + this.labHMakerID.Text + "', " + HLastResults + |
| | |
| | | ",'"+ dataTable.Rows[i]["HQCStd"].ToString() + "') "); |
| | | } |
| | | |
| | | DataSet SetData = oCN.RunProcReturn("select HMakeDate from QC_TakeSampleCheckBillMain where HInterID =" + this.HTakeSampleCheckBillID.Text, "QC_TakeSampleCheckBillMain"); |
| | | string HMakeDate = ""; |
| | | if (SetData.Tables[0].Rows.Count > 0) |
| | | { |
| | | HMakeDate = SetData.Tables[0].Rows[0]["HMakeDate"].ToString(); |
| | | } |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into QC_ProcessCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HICMOQty" + |
| | | ",HProcExchQty,HShiftsID,HErrTreatment" + |
| | | ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo" + |
| | | ",HBatchNo) " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,getdate(),'" + this.txtHMaker.Text + "',getdate()" + |
| | | ",HBatchNo,HCheckerResult) " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,'"+ HMakeDate + "','" + this.txtHMaker.Text + "',getdate()" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "'" + |
| | | "," + HMaterID + "," + HProcID + "," + HSourceID + ",0,0,0,0,0," + this.labHMakerID.Text + ",'" + HLastResults + "'" + |
| | | ",'','',0,'',''" + |
| | | ",0,0,'',0,0,0,0,'',0," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + "," + HPlanQty + "," + HQty + ",0,''" + |
| | | "," + this.HTakeSampleCheckBillID.Text + ",'" + this.HTakeSampleCheckBillNo.Text + "'" + |
| | | ",'" + this.txtPcm.Text + "') "); |
| | | ",'" + this.txtPcm.Text + "','"+ HLastResults + "') "); |
| | | |
| | | |
| | | oCN.Commit(); |