yangle
2024-11-29 1d9f82659dbfdfd6ac0ddbb33f1fd5af1164d939
WFormSynchronizeData_SMR/WFormReadData_SMR/ReadCoordinateExcelFrom.cs
@@ -61,8 +61,8 @@
                        string selectedFolderPath = folderBrowserDialog.SelectedPath;
                        // 使用 selectedFolderPath 进行后续操作,例如显示在文本框中  
                        this.txtLj.Text = selectedFolderPath;
                        //GetCSV_Read(selectedFolderPath);
                        GetExcel_Read(selectedFolderPath);
                        GetCSV_Read(selectedFolderPath);
                        //GetExcel_Read(selectedFolderPath);
                    }
                }
            }
@@ -503,6 +503,13 @@
                        ") ");
                    }
                    
                    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" +
@@ -512,7 +519,7 @@
                        ",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 +
@@ -602,6 +609,12 @@
                        "," + 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 " +
@@ -611,7 +624,7 @@
                        ",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 +
@@ -701,6 +714,13 @@
                                ",'"+ 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" +
@@ -714,15 +734,15 @@
                    ",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();