Ejemplo n.º 1
0
        /// <summary>
        /// 生产问题图片
        /// </summary>
        private void LoadPDPic()
        {
            PictureBox[] pb;
            ArrayList    JpgList   = new ArrayList();
            ArrayList    pdnumList = new ArrayList();
            DataTable    dtTime;
            // 检测路径是否存在
            //MessageBox.Show(floCoding);
            string strPDnum = @"SELECT PDtime FROM [YouliData].[dbo].[PDnotes] WHERE PDcoding='" + floPDCoding + "' AND PDover ='F'";

            dtTime = SQLHelper2.GetDataSet(strPDnum).Tables[0];
            for (int i = 0; i < dtTime.Rows.Count; i++)
            {
                pdnumList.Add(dtTime.Rows[i][0].ToString());
            }
            //MessageBox.Show(pdnumList[0].ToString());
            for (int i = 0; i < pdnumList.Count; i++)
            {
                //通过查找当前页面的txtflocoding 找不到值
                // string imagePath = @"C:\Users\Administrator\Desktop\优力资料云享版";

                string imagePath = @"\\192.168.1.104\Youli_Server\ProblemFile\PDnote" + "\\" + pdnumList[i].ToString() + "\\" + " " + floPDCoding + "\\";
                //MessageBox.Show(imagePath);
                //  OpenFileDialog openFileDialog = new OpenFileDialog();
                //  openFileDialog.InitialDirectory = imagePath;
                //if(openFileDialog.ShowDialog() == DialogResult.OK)
                //  {

                //  }
                if (Directory.Exists(imagePath))
                {
                    DirectoryInfo dir = new DirectoryInfo(@"\\192.168.1.104\Youli_Server\ProblemFile\PDnote" + "\\" + pdnumList[i].ToString() + "\\" + " " + floPDCoding);

                    foreach (var file in dir.GetFiles("*.jpg"))
                    {
                        //MessageBox.Show(file.FullName);
                        JpgList.Add(file.FullName);
                    }
                }
                else
                {
                    // MessageBox.Show("读取图片路径出错");
                }
            }
            pb = new PictureBox[JpgList.Count];
            for (int j = 0; j < JpgList.Count; j++)
            {
                pb[j]             = new System.Windows.Forms.PictureBox();
                pb[j].BorderStyle = BorderStyle.FixedSingle;
                pb[j].SizeMode    = PictureBoxSizeMode.StretchImage;
                pb[j].Image       = Image.FromFile(JpgList[j].ToString());
                pb[j].Size        = new System.Drawing.Size(370, 280);
                flowLayoutPanel2.Controls.Add(pb[j]);
            }
            // MessageBox.Show(JpgList.Count.ToString());
        }
Ejemplo n.º 2
0
        private void LoadTableQCnotes()
        {
            string strnotes      = @"SELECT * FROM [dbo].[QCnotes] WHERE QCcoding = (SELECT flo_coding FROM [YouliData].[dbo].[flow] WHERE flo_num = '" + editValue + "' )  AND QCover ='F'";
            string strnotesCount = @"SELECT count(*) FROM [dbo].[QCnotes] WHERE QCcoding = (SELECT flo_coding FROM [YouliData].[dbo].[flow] WHERE flo_num = '" + editValue + "' )  AND QCover ='F'";

            //MessageBox.Show(txtflocoding.Text);
            //string strnotes = @"SELECT * FROM [dbo].[QCnotes] WHERE QCcoding = '"+this.txtflocoding.Text.Trim()+"'  AND QCover ='F'";
            if (SQLHelper2.GetSingleResult(strnotesCount).ToString() != "0")
            {
                dgvQCnotes.AutoGenerateColumns = false;
                dgvQCnotes.DataSource          = SQLHelper2.GetDataSet(strnotes).Tables[0];
                floQCCoding = dgvQCnotes.Rows[0].Cells[2].Value.ToString();
            }
        }
Ejemplo n.º 3
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            String PM = Interaction.InputBox("输入密码", "删除订单", "", -1, -1);

            if (PM != "")
            {
                if (PM == "yl123")
                {
                    string strSQLDelete = @"DELETE FROM [dbo].[flow]
                                     WHERE flo_time = '" + txtflotime.Text + @"' 
                                       AND flo_num ='" + txtflonum.Text + "'";
                    SQLHelper2.Update(strSQLDelete);
                    SQLHelper.Update(strSQLDelete);
                    MessageBox.Show("删除成功!");
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                else
                {
                    MessageBox.Show("请输入正确的密码谢谢!!!!!");
                    return;
                }
            }
        }
Ejemplo n.º 4
0
        private void btnAddOrderNum_Click(object sender, EventArgs e)
        {
            //SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder();
            //scsb.DataSource = "YL_SERVER";
            //scsb.UserID = "sa";
            //scsb.Password = "******";
            //scsb.InitialCatalog = "YouliData";
            string txtAdd = dataGridView1.Rows[0].Cells["Column4"].Value.ToString();
            //conn_add = new SqlConnection(scsb.ToString());
            //if (conn_add.State == System.Data.ConnectionState.Closed)
            //    conn_add.Open();
            //先读取对sql数据库读取填写的制令单号 检查有没有获取值
            string strRepet = "SELECT flo_num FROM flow WHERE[flo_num]='" + txtAdd + "'";
            //SQLHelper.GetReader(strRepet);
            //SqlCommand commm = new SqlCommand(strRepet, conn_add);
            SqlDataReader dr = SQLHelper.GetReader(strRepet);

            if (dr.Read())
            {
                MessageBox.Show("制令单号重复");
                //conn_add.Close();
                return;
            }
            else
            {
                //conn_add.Close();
                //conn_add.Open();
                #region 判断为NULL 及其他数据为空
                if (dataGridView1.Rows[0].Cells["Column1"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column1"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column2"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column2"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column3"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column3"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column4"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column4"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column5"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column5"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column6"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column6"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column7"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column7"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column8"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column8"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column9"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column9"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column10"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column10"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column11"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column11"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column12"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column12"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column13"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column13"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column14"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column14"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column15"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column15"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column16"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column16"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column17"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column17"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column18"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column18"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column19"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column19"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column20"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column20"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column21"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column21"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column22"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column22"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column23"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column23"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column24"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column24"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column25"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column25"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column26"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column26"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column27"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column27"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column28"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column28"].Value = "";
                }
                if (dataGridView1.Rows[0].Cells["Column29"].Value == null)
                {
                    dataGridView1.Rows[0].Cells["Column29"].Value = "";
                }
                #endregion
                string strSql = @"INSERT INTO [dbo].[flow]
                                   ([flo_time]
                                     ,[flo_client]
                                     ,[flo_factory]
                                     ,[flo_line]
                                     ,[flo_num]
                                     ,[flo_coding]
                                     ,[flo_cilentID]
                                     ,[flo_model]
                                    ,[flo_logo]
                                    ,[flo_proname]
                                    ,[flo_range]
                                    ,[flo_unit]
                                    ,[flo_reunit]
                                    ,[flo_memunit]
                                    ,[flo_frames]
                                    ,[flo_backcolor]
                                    ,[flo_closetime]
                                    ,[flo_backtime]
                                    ,[flo_revise]
                                    ,[flo_cleRange]
                                    ,[flo_cleShutdown]
                                    ,[flo_gravity]
                                    ,[flo_levFacSet]
                                    ,[flo_cell]
                                    ,[flo_plastic]
                                    ,[flo_quantity]
                                    ,[flo_delivery]
                                    ,[flo_encase]
                                    ,[flo_box]
                                    ,[flo_ask]
                                    ,[flo_pic]
                                    ,[flo_out]
                                    ,[flo_finishTo]
                                    ,[flo_bomVerify])
                                  VALUES
                                    ('" + "[" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + "]" + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column1"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column2"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column3"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column4"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column5"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column6"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column7"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column8"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column9"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column10"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column11"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column12"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column13"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column14"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column15"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column16"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column17"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column18"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column19"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column20"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column21"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column22"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column23"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column24"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column25"].Value.ToString().Trim() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column26"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column27"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column28"].Value.ToString() + @"'
                                    ,'" + dataGridView1.Rows[0].Cells["Column29"].Value.ToString() + @"'
                                    ,'" + "0" + @"' 
                                    ,'" + "N" + @"' 
                                    ,'" + "N" + @"' 
                                    ,'" + "0" + @"' )";
                //SqlCommand comm = new SqlCommand(strSql, conn_add);
                //comm.ExecuteNonQuery();
                #region 添加到云服务器
                SQLHelper2.Update(strSql);
                SQLHelper.Update(strSql);
                #endregion
                MessageBox.Show("添加成功!");
                this.DialogResult = DialogResult.OK;
                //this.Close();
            }
        }
Ejemplo n.º 5
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            string strSQL = "";

            if (toolStripButton1.Enabled == false)
            {
                toolStripButton1.Enabled = true;
                try
                {
                    if (orderProcess.txtuser == "严华新" || orderProcess.txtuser == "胡连年")
                    {
                        string scValue  = "N";
                        string outValue = "N";
                        string finValue = "N";
                        if (checkBox1.Checked)
                        {
                            scValue = "Y";
                        }
                        if (chkout.Checked)
                        {
                            outValue = "Y";
                        }
                        if (chkfinish.Checked)
                        {
                            finValue = "Y";
                        }
                        if (txtfloaskChg)
                        {
                            txtfloask.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm") + txtfloask.Text;
                        }
                        if (txtflorecordChg)
                        {
                            txtflorecord.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm") + txtflorecord.Text;
                        }
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_client] = '" + txtfloclient.Text + @"'
                                   ,[flo_factory] = '" + txtflofactory.Text + @"'
                                   ,[flo_line] = '" + txtfloline.Text + @"'
                                   ,[flo_num] = '" + txtflonum.Text + @"'
                                   ,[flo_record] = '" + txtflorecord.Text + @"'
                                   ,[flo_coding] = '" + txtflocoding.Text + @"'
                                   ,[flo_cilentID] = '" + txtflocilentID.Text + @"'
                                   ,[flo_model] = '" + txtflomodel.Text + @"'
                                   ,[flo_logo] = '" + txtflologo.Text + @"'
                                   ,[flo_proname] = '" + txtfloproname.Text + @"'
                                   ,[flo_range] = '" + txtflorange.Text + @"'
                                   ,[flo_unit] = '" + txtflounit.Text + @"'
                                   ,[flo_reunit] = '" + txtfloreunit.Text + @"'
                                   ,[flo_memunit] = '" + txtflomemunit.Text + @"'
                                   ,[flo_frames] = '" + txtfloframes.Text + @"'
                                   ,[flo_backcolor] = '" + txtflobackcolor.Text + @"'
                                   ,[flo_closetime] = '" + txtfloclosetime.Text + @"'
                                   ,[flo_backtime] = '" + txtflobacktime.Text + @"'
                                   ,[flo_revise] = '" + txtflorevise.Text + @"'
                                   ,[flo_cleRange] = '" + txtflocleRange.Text + @"'
                                   ,[flo_cleShutdown] = '" + txtflocleShutdown.Text + @"'
                                   ,[flo_gravity] = '" + txtflogravity.Text + @"'
                                   ,[flo_levFacSet] = '" + txtflolevFacSet.Text + @"'
                                   ,[flo_cell] = '" + txtflocell.Text + @"'
                                   ,[flo_plastic] = '" + txtfloplastic.Text + @"'
                                   ,[flo_quantity] = '" + txtfloquantity.Text.Trim() + @"'
                                   ,[flo_delivery] = '" + txtflodelivery.Text + @"'
                                   ,[flo_encase] = '" + txtfloencase.Text + @"'
                                   ,[flo_box] = '" + txtflobox.Text + @"'
                                   ,[flo_ask] = '" + txtfloask.Text + @"'
                                   ,[flo_starv] = '" + txtflostarv.Text + @"'
                                   ,[flo_online] = '" + txtfloonline.Text + @"'
                                   ,[flo_ProSum] = '" + txtfloProSum.Text + @"'
                                   ,[flo_spotChk] = '" + txtflospotChk.Text + @"'
                                   ,[flo_finish] = '" + scValue + @"'
                                   ,[flo_out] = '" + outValue + @"'
                                   ,[flo_finishTo] = '" + finValue + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "高超")
                    {
                        if (txtflomodi1Chg)
                        {
                            txtflomodibom1.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm") + txtflomodibom1.Text;
                        }
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_modibom1] = '" + txtflomodibom1.Text + @"'
                                   ,[flo_fristMake] = '" + txtflofristMake.Text + @"'
                                   ,[flo_ProSum] = '" + txtfloProSum.Text + @"'
                                   ,[flo_spotChk] = '" + txtflospotChk.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "陶志")
                    {
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_ProSum] = '" + txtfloProSum.Text + @"'
                                   ,[flo_spotChk] = '" + txtflospotChk.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "叶显俊" || orderProcess.txtuser == "QC" || orderProcess.txtuser == "任芳")
                    {
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_fristChk] = '" + txtflofristChk.Text + @"'
                                   ,[flo_ProSum] = '" + txtfloProSum.Text + @"'
                                   ,[flo_spotChk] = '" + txtflospotChk.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "王庆青")
                    {
                        string bomVerifyValue = "0";
                        if (chkflobomVerify.Checked)
                        {
                            bomVerifyValue = "1";
                        }
                        if (txtflomodi2Chg)
                        {
                            txtflomodibom2.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm") + txtflomodibom2.Text;
                        }
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_modibom2] = '" + txtflomodibom2.Text + @"'
                                   ,[flo_back] = '" + txtflowback.Text + @"'
                                   ,[flo_bomVerify] = '" + bomVerifyValue + @"'
                                   ,[flo_elsequan] = '" + txtfloelsequan.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "陈荣")
                    {
                        if (txtflofacChg)
                        {
                            txtflofacAlter.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm") + txtflofacAlter.Text;
                        }
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_facAlter] = '" + txtflofacAlter.Text + @"'
                                   ,[flo_ProSum] = '" + txtfloProSum.Text + @"'
                                   ,[flo_spotChk] = '" + txtflospotChk.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "胡镜")
                    {
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_elequan] = '" + txtfloelequan.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "陈玉萍")
                    {
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_oliquan] = '" + txtflooliquan.Text + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    else if (orderProcess.txtuser == "张栋")
                    {
                        string picValue = "0";
                        if (chkflopic.Checked)
                        {
                            picValue = "1";
                        }
                        strSQL = @"UPDATE [dbo].[flow]
                                   SET [flo_state] = '" + txtflostate.Text + @"'
                                   ,[flo_pic] = '" + picValue + @"'
                               WHERE flo_time = '" + txtflotime.Text + @"' 
                                    AND flo_num= '" + txtflonum.Text + "'";
                    }
                    SQLHelper2.Update(strSQL);
                    SQLHelper.Update(strSQL);
                    MessageBox.Show("提交成功!");
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                catch
                {
                    MessageBox.Show("保存出错! \r\n无权限人员或数据库错误", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("未进行编辑 无提交内容!");
            }
        }
Ejemplo n.º 6
0
        private void loading()
        {
            string Sqlstr = "SELECT * FROM flow WHERE flo_num = '" + this.editValue + "'";

            dt = SQLHelper2.GetDataSet(Sqlstr).Tables[0];
            #region 读取sql数据存入txt文本框

            txtflotime.Text        = dt.Rows[0]["flo_time"].ToString();
            txtflostate.Text       = dt.Rows[0]["flo_state"].ToString();
            txtfloclient.Text      = dt.Rows[0]["flo_client"].ToString();
            txtflofactory.Text     = dt.Rows[0]["flo_factory"].ToString();
            txtfloline.Text        = dt.Rows[0]["flo_line"].ToString();
            txtflonum.Text         = dt.Rows[0]["flo_num"].ToString();
            txtflorecord.Text      = dt.Rows[0]["flo_record"].ToString();
            txtflocoding.Text      = dt.Rows[0]["flo_coding"].ToString();
            txtflocilentID.Text    = dt.Rows[0]["flo_cilentID"].ToString();
            txtflomodel.Text       = dt.Rows[0]["flo_model"].ToString();
            txtflologo.Text        = dt.Rows[0]["flo_logo"].ToString();
            txtfloproname.Text     = dt.Rows[0]["flo_proname"].ToString();
            txtflorange.Text       = dt.Rows[0]["flo_range"].ToString();
            txtflounit.Text        = dt.Rows[0]["flo_unit"].ToString();
            txtfloreunit.Text      = dt.Rows[0]["flo_reunit"].ToString();
            txtflomemunit.Text     = dt.Rows[0]["flo_memunit"].ToString();
            txtfloframes.Text      = dt.Rows[0]["flo_frames"].ToString();
            txtflobackcolor.Text   = dt.Rows[0]["flo_backcolor"].ToString();
            txtfloclosetime.Text   = dt.Rows[0]["flo_closetime"].ToString();
            txtflobacktime.Text    = dt.Rows[0]["flo_backtime"].ToString();
            txtflorevise.Text      = dt.Rows[0]["flo_revise"].ToString();
            txtflocleRange.Text    = dt.Rows[0]["flo_cleRange"].ToString();
            txtflocleShutdown.Text = dt.Rows[0]["flo_cleShutdown"].ToString();
            txtflogravity.Text     = dt.Rows[0]["flo_gravity"].ToString();
            txtflolevFacSet.Text   = dt.Rows[0]["flo_levFacSet"].ToString();
            txtflocell.Text        = dt.Rows[0]["flo_cell"].ToString();
            txtfloplastic.Text     = dt.Rows[0]["flo_plastic"].ToString();
            txtfloquantity.Text    = dt.Rows[0]["flo_quantity"].ToString();
            txtflodelivery.Text    = dt.Rows[0]["flo_delivery"].ToString();
            txtfloencase.Text      = dt.Rows[0]["flo_encase"].ToString();
            txtflobox.Text         = dt.Rows[0]["flo_box"].ToString();
            txtfloask.Text         = dt.Rows[0]["flo_ask"].ToString();
            txtflowback.Text       = dt.Rows[0]["flo_back"].ToString();
            if (dt.Rows[0]["flo_pic"].ToString() == "1")
            {
                chkflopic.Checked = true;
            }
            txtflomodibom1.Text = dt.Rows[0]["flo_modibom1"].ToString();
            txtflomodibom2.Text = dt.Rows[0]["flo_modibom2"].ToString();
            if (dt.Rows[0]["flo_bomVerify"].ToString() == "1")
            {
                chkflobomVerify.Checked = true;
            }
            txtflostarv.Text     = dt.Rows[0]["flo_starv"].ToString();
            txtfloonline.Text    = dt.Rows[0]["flo_online"].ToString();
            txtflooliquan.Text   = dt.Rows[0]["flo_oliquan"].ToString();
            txtfloelequan.Text   = dt.Rows[0]["flo_elequan"].ToString();
            txtfloelsequan.Text  = dt.Rows[0]["flo_elsequan"].ToString();
            txtflofacAlter.Text  = dt.Rows[0]["flo_facAlter"].ToString();
            txtflofristMake.Text = dt.Rows[0]["flo_fristMake"].ToString();
            txtflofristChk.Text  = dt.Rows[0]["flo_fristChk"].ToString();
            txtfloProSum.Text    = dt.Rows[0]["flo_ProSum"].ToString();

            txtflospotChk.Text = dt.Rows[0]["flo_spotChk"].ToString();
            if (dt.Rows[0]["flo_out"].ToString() == "Y")
            {
                chkout.Checked = true;
            }
            if (dt.Rows[0]["flo_finish"].ToString() == "Y")
            {
                checkBox1.Checked = true;
            }
            if (dt.Rows[0]["flo_finishTo"].ToString() == "Y")
            {
                chkfinish.Checked = true;
            }
            #endregion
        }