Beispiel #1
0
        /// <summary>
        /// 包装
        /// </summary>
        /// <param name="bhd"></param>
        private void BaoZhuangBind(tsuhan_sg_tx bhd)
        {
            #region 包装
            bhd.BZ_sbbh1 = this.tb19.Text;
            bhd.BZ_sbbh2 = this.tb20.Text;
            bhd.BZ_sbbh3 = this.tb21.Text;
            bhd.BZ_sbbh4 = this.tb22.Text;
            if (this.tbsjsl6.Text == "")
            {
                this.tbsjsl6.Text = "0";
            }
            bhd.BZ_sjsl = Convert.ToInt32(this.tbsjsl6.Text);
            if (this.tbxcsl6.Text == "")
            {
                this.tbxcsl6.Text = "0";
            }
            bhd.BZ_xcsl = Convert.ToInt32(this.tbxcsl6.Text);
            if (this.dtpxctime4.Text == "")
            {
                this.dtpxctime4.Text =DateTime.Now.ToString("yyyy-MM-dd");
            }
            bhd.BZ_xctime = Convert.ToDateTime(this.dtpxctime4.Text);
            bhd.BZ_czy1 = this.tbcz19.Text;
            bhd.BZ_czy2 = this.tbcz20.Text;
            bhd.BZ_czy3 = this.tbcz21.Text;
            bhd.BZ_czy4 = this.tbcz22.Text;
            bhd.BZ_czyname1 = this.tbname19.Text;
            bhd.BZ_czyname2 = this.tbname20.Text;
            bhd.BZ_czyname3 = this.tbname21.Text;
            bhd.BZ_czyname4 = this.tbname22.Text;
            bhd.BZ_lry = this.tblr7.Text;
            bhd.BZ_lryname = this.tblrname7.Text;
            if (this.tbyy42.Text == "")
            {
                this.tbyy42.Text = "0";
            }
            bhd.bzng1 = Convert.ToInt32(this.tbyy42.Text);
            bhd.bzngoth = this.rtbyy43.Text;
            if (this.tbyy43sl.Text == "")
            {
                this.tbyy43sl.Text = "0";
            }
            bhd.bzngothnum = Convert.ToInt32(this.tbyy43sl.Text);
            if (this.tbbhgsl4.Text == "")
            {
                this.tbbhgsl4.Text = "0";
            }
            bhd.BZ_bhgallsl = Convert.ToInt32(this.tbbhgsl4.Text);

            #endregion
        }
Beispiel #2
0
        private void tblry_MouseUp(object sender, MouseEventArgs e)
        {
            tsuhan_sg_tx bhd = new tsuhan_sg_tx();
            //var name = Convert.ToInt32(gh);
            tsuhan_scgl_yh yh = yhbll.GetModel(gh);

            if (this.tabControl1.SelectedTab == tabPage1)
            {
                #region 备料
                bhd.bl_lry = this.tblry.Text;
                bool result5;
                result5 = yhbll.Exist(this.tblry.Text);
                if (this.tblry.Text == "")
                {
                    this.tblry.Text = "0";
                }
                else if (result5 != true)
                {
                    //rg.ShowDialog();
                    this.tblrName.Text = "";

                    return;
                }
                else
                {
                    var yh5 = yhbll.GetModel(this.tblry.Text);
                    this.tblrName.Text = yh5.姓名;
                    bhd.bl_lry = this.tblrName.Text;
                }

                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage2)
            {
                #region LD耦合焊接
                bhd.LD_lry = this.tblr1.Text;
                bool result5;
                result5 = yhbll.Exist(this.tblr1.Text);
                if (this.tblr1.Text == "")
                {
                    this.tblr1.Text = "0";
                }
                else if (result5 != true)
                {
                    this.tblrname1.Text = "";
                    return;
                }
                else
                {
                    var yh5 = yhbll.GetModel(this.tblr1.Text);
                    this.tblrname1.Text = yh5.姓名;
                    bhd.LD_lryname = this.tblrname1.Text;
                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage3)
            {
                #region PT耦合固化
                bhd.PT_lry = this.tblr2.Text;
                bool result5;
                result5 = yhbll.Exist(this.tblr2.Text);

                if (this.tblr2.Text == "")
                {
                    this.tblr2.Text = "0";
                }
                else if (result5 != true)
                {
                    //rg.ShowDialog();
                    this.tblrname2.Text = "";
                    return;
                }
                else
                {
                    var yh5 = yhbll.GetModel(this.tblr2.Text);
                    this.tblrname2.Text = yh5.姓名;
                    bhd.PT_lryname = this.tblrname2.Text;
                }

                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage4)
            {
                #region 温循前
                bhd.WXQ_lry = this.tblr3.Text;
                bool result2;
                result2 = yhbll.Exist(this.tblr3.Text);
                if (this.tblr3.Text == "")
                {
                    this.tblr3.Text = "0";
                }
                else if (result2 != true)
                {
                    //rg.ShowDialog();
                    this.tblrname3.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tblr3.Text);
                    this.tblrname3.Text = yh1.姓名;
                    bhd.WXQ_lryname = this.tblrname3.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage5)
            {
                #region 温循后
                bhd.WX_Hlry = this.tblr4.Text;
                bool result2;
                result2 = yhbll.Exist(this.tblr4.Text);

                if (this.tblr4.Text == "")
                {
                    this.tblr4.Text = "0";
                }
                else if (result2 != true)
                {
                    //rg.ShowDialog();
                    this.tblrname4.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tblr4.Text);
                    this.tblrname4.Text = yh1.姓名;
                    bhd.WXH_czyname = this.tblrname4.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage6)
            {
                #region 测试
                bhd.CS_lry = this.tblr5.Text;
                bool result5;
                result5 = yhbll.Exist(this.tblr5.Text);

                if (this.tblr5.Text == "")
                {
                    this.tblr5.Text = "0";
                }
                else if (result5 != true)
                {
                    //rg.ShowDialog();
                    this.tblrname5.Text = "";
                    return;
                }
                else
                {
                    var yh4 = yhbll.GetModel(this.tblr5.Text);
                    this.tblrname5.Text = yh4.姓名;
                    bhd.CS_czyname4 = this.tblrname5.Text;
                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage7)
            {
                #region 清洗
                bhd.QX_lry = this.tblr6.Text;
                bool result5;
                result5 = yhbll.Exist(this.tblr6.Text);

                if (this.tblr6.Text == "")
                {
                    this.tblr6.Text = "0";
                }
                else if (result5 != true)
                {
                    //rg.ShowDialog();
                    this.tblrname6.Text = "";
                    return;
                }
                else
                {
                    var yh4 = yhbll.GetModel(this.tblr6.Text);
                    this.tblrname6.Text = yh4.姓名;
                    bhd.QX_lryname = this.tblrname6.Text;
                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage8)
            {
                #region 包装
                bhd.BZ_lry = this.tblr7.Text;
                bool result5;
                result5 = yhbll.Exist(this.tblr7.Text);

                if (this.tblr7.Text == "")
                {
                    this.tblr7.Text = "0";
                }
                else if (result5 != true)
                {
                    //rg.ShowDialog();
                    this.tblrname7.Text = "";
                    return;
                }
                else
                {
                    var yh4 = yhbll.GetModel(this.tblr7.Text);
                    this.tblrname7.Text = yh4.姓名;
                    bhd.BZ_lryname = this.tblrname7.Text;
                }
                #endregion
            }
        }
Beispiel #3
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            //时间正则表达式
            string reg = @"^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$";
            string regs =@"^(((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-)) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d)$";
            var name =Convert.ToInt32(gh);
            tsuhan_scgl_yh yh = yhbll.GetModel(gh);
            var sgdh1 = this.tbSGDXH.Text + this.tbDXH1.Text;
            var str1 = sgdh1.Substring(sgdh1.Length - 1, 1);
            #region 判断不合格数量是否正确

                //if (yh.机构 == "全部")
                //{
                    #region 备料
                    if (this.tbyy10Sl.Text == "")
                    {
                        this.tbyy10Sl.Text = "0";
                    }
                    if (this.tbyy9.Text == "")
                    {
                        this.tbyy9.Text = "0";
                    }
                    if (this.tbyy8.Text == "")
                    {
                        this.tbyy8.Text = "0";
                    }
                    if (this.tbyy7.Text == "")
                    {
                        this.tbyy7.Text = "0";
                    }
                    if (this.tbyy6.Text == "")
                    {
                        this.tbyy6.Text = "0";
                    }
                    if (this.tbyy5.Text == "")
                    {
                        this.tbyy5.Text = "0";
                    }
                    if (this.tbyy4.Text == "")
                    {
                        this.tbyy4.Text = "0";
                    }
                    if (this.tbyy3.Text == "")
                    {
                        this.tbyy3.Text = "0";
                    }
                    if (this.tbyy2.Text == "")
                    {
                        this.tbyy2.Text = "0";
                    }
                    if (this.tbyy1.Text == "")
                    {
                        this.tbyy1.Text = "0";
                    }
                    if (this.tbbhgsl.Text == "")
                    {
                        this.tbbhgsl.Text = "0";
                    }
                    var allnum = int.Parse(this.tbyy1.Text) + int.Parse(this.tbyy2.Text) + int.Parse(this.tbyy3.Text) + int.Parse(this.tbyy4.Text) + int.Parse(this.tbyy5.Text) + int.Parse(this.tbyy6.Text) + int.Parse(this.tbyy7.Text) + int.Parse(this.tbyy8.Text) + int.Parse(this.tbyy9.Text) + int.Parse(this.tbyy10Sl.Text);

                    if (this.tbbhgsl.Text != Convert.ToString(allnum))
                    {
                        MessageBox.Show("备料不合格总数错误", "提示");
                        return;
                    }
                    #endregion
                    #region LD耦合焊接
                    if (this.tbyy20sl.Text == "")
                    {
                        this.tbyy20sl.Text = "0";
                    }
                    if (this.tbyy19.Text == "")
                    {
                        this.tbyy19.Text = "0";
                    }
                    if (this.tbyy18.Text == "")
                    {
                        this.tbyy18.Text = "0";
                    }
                    if (this.tbyy17.Text == "")
                    {
                        this.tbyy17.Text = "0";
                    }
                    if (this.tbyy16.Text == "")
                    {
                        this.tbyy16.Text = "0";
                    }
                    if (this.tbyy15.Text == "")
                    {
                        this.tbyy15.Text = "0";
                    }
                    if (this.tbyy14.Text == "")
                    {
                        this.tbyy14.Text = "0";
                    }
                    if (this.tbyy13.Text == "")
                    {
                        this.tbyy13.Text = "0";
                    }
                    if (this.tbyy12.Text == "")
                    {
                        this.tbyy12.Text = "0";
                    }
                    if (this.tbyy11.Text == "")
                    {
                        this.tbyy11.Text = "0";
                    }
                    if (this.tbjzsl1.Text == "")
                    {
                        this.tbjzsl1.Text = "0";
                    }
                    if (this.tbbhksl1.Text == "")
                    {
                        this.tbbhksl1.Text = "0";
                    }

                    var allnum1 = int.Parse(this.tbyy11.Text) + int.Parse(this.tbyy12.Text) + int.Parse(this.tbyy13.Text) + int.Parse(this.tbyy14.Text) + int.Parse(this.tbyy15.Text) + int.Parse(this.tbyy16.Text) + int.Parse(this.tbyy17.Text) + int.Parse(this.tbyy18.Text) + int.Parse(this.tbyy19.Text) + int.Parse(this.tbyy20sl.Text);
                    var num = int.Parse(this.tbbhksl1.Text) + int.Parse(this.tbjzsl1.Text);
                    var all = num + int.Parse(this.tbxcsl1.Text);
                    if (Convert.ToString(num) != Convert.ToString(allnum1))
                    {
                        MessageBox.Show("LD耦合焊接不合格总数错误", "提示");
                        return;
                    }
                    else if (Convert.ToString(all) != this.tbsjsl1.Text)
                    {
                        MessageBox.Show("下传数量与上接数量不符", "提示");
                        return;
                    }
                    #endregion
                    #region PT耦合固化
                    if (this.tbyy30sl.Text == "")
                    {
                        this.tbyy30sl.Text = "0";
                    }
                    if (this.tbyy29.Text == "")
                    {
                        this.tbyy29.Text = "0";
                    }
                    if (this.tbyy28.Text == "")
                    {
                        this.tbyy28.Text = "0";
                    }
                    if (this.tbyy27.Text == "")
                    {
                        this.tbyy27.Text = "0";
                    }
                    if (this.tbyy26.Text == "")
                    {
                        this.tbyy26.Text = "0";
                    }
                    if (this.tbyy25.Text == "")
                    {
                        this.tbyy25.Text = "0";
                    }
                    if (this.tbyy24.Text == "")
                    {
                        this.tbyy24.Text = "0";
                    }
                    if (this.tbyy23.Text == "")
                    {
                        this.tbyy23.Text = "0";
                    }
                    if (this.tbyy22.Text == "")
                    {
                        this.tbyy22.Text = "0";
                    }
                    if (this.tbyy21.Text == "")
                    {
                        this.tbyy21.Text = "0";
                    }
                    if (this.textBox100.Text == "")
                    {
                        this.textBox100.Text = "0";
                    }
                    var allnum2 = int.Parse(this.tbyy21.Text) + int.Parse(this.tbyy22.Text) + int.Parse(this.tbyy23.Text) + int.Parse(this.tbyy24.Text) + int.Parse(this.tbyy25.Text) + int.Parse(this.tbyy26.Text) + int.Parse(this.tbyy27.Text) + int.Parse(this.tbyy28.Text) + int.Parse(this.tbyy29.Text) + int.Parse(this.tbyy30sl.Text);
                    var all2 = allnum2 + int.Parse(this.tbxcsl2.Text);
                    if (this.textBox100.Text != Convert.ToString(allnum2))
                    {
                        MessageBox.Show("PT耦合固化不合格总数错误", "提示");
                        return;
                    }
                    else if (Convert.ToString(all2) != this.tbsjsl2.Text)
                    {
                        MessageBox.Show("数量与上接数量不符", "提示");
                        return;
                    }
                    #endregion
                    #region 测试
                    if (this.tbyy39sl.Text == "")
                    {
                        this.tbyy39sl.Text = "0";
                    }
                    if (this.tbyy38.Text == "")
                    {
                        this.tbyy38.Text = "0";
                    }
                    if (this.tbyy37.Text == "")
                    {
                        this.tbyy37.Text = "0";
                    }
                    if (this.tbyy36.Text == "")
                    {
                        this.tbyy36.Text = "0";
                    }
                    if (this.tbyy35.Text == "")
                    {
                        this.tbyy35.Text = "0";
                    }
                    if (this.tbyy34.Text == "")
                    {
                        this.tbyy34.Text = "0";
                    }
                    if (this.tbyy33.Text == "")
                    {
                        this.tbyy33.Text = "0";
                    }
                    if (this.tbyy32.Text == "")
                    {
                        this.tbyy32.Text = "0";
                    }
                    if (this.tbyy31.Text == "")
                    {
                        this.tbyy31.Text = "0";
                    }
                    if (this.tbbhgsl2.Text == "")
                    {
                        this.tbbhgsl2.Text = "0";
                    }
                    var allnum3 = int.Parse(this.tbyy31.Text) + int.Parse(this.tbyy32.Text) + int.Parse(this.tbyy33.Text) + int.Parse(this.tbyy34.Text) + int.Parse(this.tbyy35.Text) + int.Parse(this.tbyy36.Text) + int.Parse(this.tbyy37.Text) + int.Parse(this.tbyy38.Text) + int.Parse(this.tbyy39sl.Text);
                    var all3 = allnum3 + int.Parse(tbxcsl4.Text);
                    if (this.tbbhgsl2.Text != Convert.ToString(allnum3))
                    {
                        MessageBox.Show("测试不合格总数错误", "提示");
                        return;
                    }
                    else if (Convert.ToString(all3) != this.tbsjsl4.Text)
                    {
                        MessageBox.Show("数量与上接数量不符", "提示");
                        return;
                    }
                    #endregion
                    #region 清洗
                    if (this.tbyy40.Text == "")
                    {
                        this.tbyy40.Text = "0";
                    }
                    if (this.tbyy41sl.Text == "")
                    {
                        this.tbyy41sl.Text = "0";
                    }
                    if (this.tbbhgsl3.Text == "")
                    {
                        this.tbbhgsl3.Text = "0";
                    }
                    var allnum4 = int.Parse(this.tbyy40.Text) + int.Parse(this.tbyy41sl.Text);
                    var all4 = allnum4 + int.Parse(this.tbxcsl5.Text);
                    if (this.tbbhgsl3.Text != Convert.ToString(allnum4))
                    {
                        MessageBox.Show("清洗不合格总数错误", "提示");
                        return;
                    }
                    else if (Convert.ToString(all4) != this.tbsjsl5.Text)
                    {
                        MessageBox.Show("数量与上接数量不符", "提示");
                        return;
                    }
                    #endregion
                    #region 包装
                    if (this.tbyy42.Text == "")
                    {
                        this.tbyy42.Text = "0";
                    }
                    if (this.tbyy43sl.Text == "")
                    {
                        this.tbyy43sl.Text = "0";
                    }
                    if (this.tbbhgsl4.Text == "")
                    {
                        this.tbbhgsl4.Text = "0";
                    }
                    var allnum5 = int.Parse(this.tbyy42.Text) + int.Parse(this.tbyy43sl.Text);
                    var all5 = allnum5 + int.Parse(this.tbxcsl6.Text);
                    if (this.tbbhgsl4.Text != Convert.ToString(allnum5))
                    {
                        MessageBox.Show("包装不合格总数错误", "提示");
                        return;
                    }
                    else if (Convert.ToString(all5) != this.tbsjsl6.Text)
                    {
                        MessageBox.Show("数量与上接数量不符", "提示");
                        return;
                    }
                    #endregion
                #region
                //    }
            //    else if (yh.机构 == "备料")
            //    {
            //        #region
            //        //if (this.tbyy10Sl.Text == "")
            //        //{
            //        //    this.tbyy10Sl.Text = "0";
            //        //}
            //        //if (this.tbyy9.Text == "")
            //        //{
            //        //    this.tbyy9.Text = "0";
            //        //}
            //        //if (this.tbyy8.Text == "")
            //        //{
            //        //    this.tbyy8.Text = "0";
            //        //}
            //        //if (this.tbyy7.Text == "")
            //        //{
            //        //    this.tbyy7.Text = "0";
            //        //}
            //        //if (this.tbyy6.Text == "")
            //        //{
            //        //    this.tbyy6.Text = "0";
            //        //}
            //        //if (this.tbyy5.Text == "")
            //        //{
            //        //    this.tbyy5.Text = "0";
            //        //}
            //        //if (this.tbyy4.Text == "")
            //        //{
            //        //    this.tbyy4.Text = "0";
            //        //}
            //        //if (this.tbyy3.Text == "")
            //        //{
            //        //    this.tbyy3.Text = "0";
            //        //}
            //        //if (this.tbyy2.Text == "")
            //        //{
            //        //    this.tbyy2.Text = "0";
            //        //}
            //        //if (this.tbyy1.Text == "")
            //        //{
            //        //    this.tbyy1.Text = "0";
            //        //}
            //        //if (this.tbbhgsl.Text == "")
            //        //{
            //        //    this.tbbhgsl.Text = "0";
            //        //}
            //        //var allnum = int.Parse(this.tbyy1.Text) + int.Parse(this.tbyy2.Text) + int.Parse(this.tbyy3.Text) + int.Parse(this.tbyy4.Text) + int.Parse(this.tbyy5.Text) + int.Parse(this.tbyy6.Text) + int.Parse(this.tbyy7.Text) + int.Parse(this.tbyy8.Text) + int.Parse(this.tbyy9.Text) + int.Parse(this.tbyy10Sl.Text);
            //        //if (this.tbbhgsl.Text != Convert.ToString(allnum))
            //        //{
            //        //    MessageBox.Show("不合格总数错误", "提示");
            //        //    return;
            //        //}
            //        #endregion
            //    }
            //    else if (yh.机构 == "LD耦合焊接")
            //    {
            //        #region
            //        if (this.tbyy20sl.Text == "")
            //        {
            //            this.tbyy20sl.Text = "0";
            //        }
            //        if (this.tbyy19.Text == "")
            //        {
            //            this.tbyy19.Text = "0";
            //        }
            //        if (this.tbyy18.Text == "")
            //        {
            //            this.tbyy18.Text = "0";
            //        }
            //        if (this.tbyy17.Text == "")
            //        {
            //            this.tbyy17.Text = "0";
            //        }
            //        if (this.tbyy16.Text == "")
            //        {
            //            this.tbyy16.Text = "0";
            //        }
            //        if (this.tbyy15.Text == "")
            //        {
            //            this.tbyy15.Text = "0";
            //        }
            //        if (this.tbyy14.Text == "")
            //        {
            //            this.tbyy14.Text = "0";
            //        }
            //        if (this.tbyy13.Text == "")
            //        {
            //            this.tbyy13.Text = "0";
            //        }
            //        if (this.tbyy12.Text == "")
            //        {
            //            this.tbyy12.Text = "0";
            //        }
            //        if (this.tbyy11.Text == "")
            //        {
            //            this.tbyy11.Text = "0";
            //        }
            //        if (this.tbjzsl1.Text == "")
            //        {
            //            this.tbjzsl1.Text = "0";
            //        }
            //        if (this.tbbhksl1.Text == "")
            //        {
            //            this.tbbhksl1.Text = "0";
            //        }

            //        var allnum1 = int.Parse(this.tbyy11.Text) + int.Parse(this.tbyy12.Text) + int.Parse(this.tbyy13.Text) + int.Parse(this.tbyy14.Text) + int.Parse(this.tbyy15.Text) + int.Parse(this.tbyy16.Text) + int.Parse(this.tbyy17.Text) + int.Parse(this.tbyy18.Text) + int.Parse(this.tbyy19.Text) + int.Parse(this.tbyy20sl.Text);
            //        var num = int.Parse(this.tbbhksl1.Text) + int.Parse(this.tbjzsl1.Text);
            //        if (this.tbxcsl1.Text == "")
            //        {
            //            this.tbxcsl1.Text = "0";
            //        }
            //        var all = num + int.Parse(this.tbxcsl1.Text);
            //        if (Convert.ToString(num) != Convert.ToString(allnum1))
            //        {
            //            MessageBox.Show("不合格总数错误", "提示");
            //            return;
            //        }
            //        else if (Convert.ToString(all) != this.tbsjsl1.Text)
            //        {
            //            MessageBox.Show("数量与上接数量不符", "提示");
            //            return;
            //        }
            //        #endregion
            //    }
            //    else if (yh.机构 == "PT耦合固化")
            //    {
            //        #region PT耦合固化
            //        if (this.tbyy30sl.Text == "")
            //        {
            //            this.tbyy30sl.Text = "0";
            //        }
            //        if (this.tbyy29.Text == "")
            //        {
            //            this.tbyy29.Text = "0";
            //        }
            //        if (this.tbyy28.Text == "")
            //        {
            //            this.tbyy28.Text = "0";
            //        }
            //        if (this.tbyy27.Text == "")
            //        {
            //            this.tbyy27.Text = "0";
            //        }
            //        if (this.tbyy26.Text == "")
            //        {
            //            this.tbyy26.Text = "0";
            //        }
            //        if (this.tbyy25.Text == "")
            //        {
            //            this.tbyy25.Text = "0";
            //        }
            //        if (this.tbyy24.Text == "")
            //        {
            //            this.tbyy24.Text = "0";
            //        }
            //        if (this.tbyy23.Text == "")
            //        {
            //            this.tbyy23.Text = "0";
            //        }
            //        if (this.tbyy22.Text == "")
            //        {
            //            this.tbyy22.Text = "0";
            //        }
            //        if (this.tbyy21.Text == "")
            //        {
            //            this.tbyy21.Text = "0";
            //        }
            //        if (this.textBox100.Text == "")
            //        {
            //            this.textBox100.Text = "0";
            //        }
            //        var allnum2 = int.Parse(this.tbyy21.Text) + int.Parse(this.tbyy22.Text) + int.Parse(this.tbyy23.Text) + int.Parse(this.tbyy24.Text) + int.Parse(this.tbyy25.Text) + int.Parse(this.tbyy26.Text) + int.Parse(this.tbyy27.Text) + int.Parse(this.tbyy28.Text) + int.Parse(this.tbyy29.Text) + int.Parse(this.tbyy30sl.Text);
            //        if (this.tbxcsl2.Text == "")
            //        {
            //            this.tbxcsl2.Text = "0";
            //        }
            //        var all = allnum2 + int.Parse(this.tbxcsl2.Text);
            //        if (this.textBox100.Text != Convert.ToString(allnum2))
            //        {
            //            MessageBox.Show("不合格总数错误", "提示");
            //            return;
            //        }
            //        else if (Convert.ToString(all) != this.tbsjsl2.Text)
            //        {
            //            MessageBox.Show("数量与上接数量不符", "提示");
            //            return;
            //        }
            //        #endregion
            //    }
            //    else if (yh.机构 == "测试")
            //    {
            //        #region 测试
            //        if (this.tbyy39sl.Text == "")
            //        {
            //            this.tbyy39sl.Text = "0";
            //        }
            //        if (this.tbyy38.Text == "")
            //        {
            //            this.tbyy38.Text = "0";
            //        }
            //        if (this.tbyy37.Text == "")
            //        {
            //            this.tbyy37.Text = "0";
            //        }
            //        if (this.tbyy36.Text == "")
            //        {
            //            this.tbyy36.Text = "0";
            //        }
            //        if (this.tbyy35.Text == "")
            //        {
            //            this.tbyy35.Text = "0";
            //        }
            //        if (this.tbyy34.Text == "")
            //        {
            //            this.tbyy34.Text = "0";
            //        }
            //        if (this.tbyy33.Text == "")
            //        {
            //            this.tbyy33.Text = "0";
            //        }
            //        if (this.tbyy32.Text == "")
            //        {
            //            this.tbyy32.Text = "0";
            //        }
            //        if (this.tbyy31.Text == "")
            //        {
            //            this.tbyy31.Text = "0";
            //        }
            //        if (this.tbbhgsl2.Text == "")
            //        {
            //            this.tbbhgsl2.Text = "0";
            //        }
            //        var allnum3 = int.Parse(this.tbyy31.Text) + int.Parse(this.tbyy32.Text) + int.Parse(this.tbyy33.Text) + int.Parse(this.tbyy34.Text) + int.Parse(this.tbyy35.Text) + int.Parse(this.tbyy36.Text) + int.Parse(this.tbyy37.Text) + int.Parse(this.tbyy38.Text) + int.Parse(this.tbyy39sl.Text);
            //        if (tbxcsl4.Text == "")
            //        {
            //            tbxcsl4.Text = "0";
            //        }
            //        var all = int.Parse(this.tbbhgsl2.Text) + int.Parse(tbxcsl4.Text);
            //        if (this.tbbhgsl2.Text != Convert.ToString(allnum3))
            //        {
            //            MessageBox.Show("不合格总数错误", "提示");
            //            return;
            //        }
            //        else if (Convert.ToString(all) != this.tbsjsl4.Text)
            //        {
            //            MessageBox.Show("数量与上接数量不符", "提示");
            //            return;
            //        }
            //        #endregion
            //    }
            //    else if (yh.机构 == "清洗")
            //    {
            //        #region 清洗
            //        if (this.tbyy40.Text == "")
            //        {
            //            this.tbyy40.Text = "0";
            //        }
            //        if (this.tbyy41sl.Text == "")
            //        {
            //            this.tbyy41sl.Text = "0";
            //        }
            //        if (this.tbbhgsl3.Text == "")
            //        {
            //            this.tbbhgsl3.Text = "0";
            //        }
            //        var allnum4 = int.Parse(this.tbyy40.Text) + int.Parse(this.tbyy41sl.Text);
            //        if (this.tbxcsl5.Text == "")
            //        {
            //            this.tbxcsl5.Text = "0";
            //        }
            //        var all = allnum4 + int.Parse(this.tbxcsl5.Text);
            //        if (this.tbbhgsl3.Text != Convert.ToString(allnum4))
            //        {
            //            MessageBox.Show("不合格总数错误", "提示");
            //            return;
            //        }
            //        else if (Convert.ToString(all) != this.tbsjsl5.Text)
            //        {
            //            MessageBox.Show("数量与上接数量不符", "提示");
            //            return;
            //        }
            //        #endregion
            //    }
            //    else if (yh.机构 == "包装")
            //    {
            //        #region 包装
            //        if (this.tbyy42.Text == "")
            //        {
            //            this.tbyy42.Text = "0";
            //        }
            //        if (this.tbyy43sl.Text == "")
            //        {
            //            this.tbyy43sl.Text = "0";
            //        }
            //        if (this.tbbhgsl4.Text == "")
            //        {
            //            this.tbbhgsl4.Text = "0";
            //        }
            //        var allnum5 = int.Parse(this.tbyy42.Text) + int.Parse(this.tbyy43sl.Text);
            //        if (this.tbxcsl6.Text == "")
            //        {
            //            this.tbxcsl6.Text = "";
            //        }
            //        var all = allnum5 + int.Parse(this.tbxcsl6.Text);
            //        if (this.tbbhgsl4.Text != Convert.ToString(allnum5))
            //        {
            //            MessageBox.Show("不合格总数错误", "提示");
            //            return;
            //        }
            //        else if (Convert.ToString(all) != this.tbsjsl6.Text)
            //        {
            //            MessageBox.Show("下传数量与上接数量不符", "提示");
            //            return;
            //        }
            //        #endregion
                //    }
                #endregion
            //}
            #endregion

            DialogResult dr = MessageBox.Show("确定要修改吗???","提示",MessageBoxButtons.YesNo);

             if (dr == DialogResult.Yes)
             {
                 var sgd = this.tbSGDXH.Text;
                 if (sgd != "")
                 {
                     tsuhan_sg_tx bhd = new tsuhan_sg_tx();
                     tsuhan_sg_bhd bh = new tsuhan_sg_bhd();
                     var sgdh = this.tbSGDXH.Text + this.tbDXH1.Text;
                     var str = sgdh.Substring(sgdh.Length - 1, 1);
                     bhd.随工单号 =sgdh ;

                     var tx = txbll.QueryByXuhao(sgdh);
                     bhd.id = tx.id;
                     //if (str == "R")
                     //{
                         #region 判断时间格式
                         //if (yh.机构 == "全部")
                         //{
                             var time = this.dtpxcTime.Text;
                             Match m1 = Regex.Match(dtpxcTime.Text, reg);
                             Match m2 = Regex.Match(dtp1.Text, reg);
                             Match m3 = Regex.Match(dtptime2.Text, reg);
                             Match m4 = Regex.Match(dtpfrtime1.Text, regs);
                             Match m5 = Regex.Match(dtpqcTime1.Text, regs);
                             Match m6 = Regex.Match(dtpxtime3.Text, reg);
                             Match m7 = Regex.Match(dtpxctime3.Text, reg);
                             Match m8 = Regex.Match(dtpxctime4.Text, reg);
                             if (m1.Success == false)
                             {
                                 MessageBox.Show("备料时间格式输入错误.如[2015-5-5]", "提示");
                                 return;
                             }
                             else if (m2.Success == false)
                             {
                                 MessageBox.Show("LD耦合焊接时间格式输入错误.如[2015-5-5]", "提示");
                                 return;
                             }
                             else if (m3.Success == false)
                             {
                                 MessageBox.Show("PT耦合固化时间格式输入错误.如[2015-5-5]", "提示");
                                 return;
                             }
                             else if (m4.Success == false)
                             {
                                 MessageBox.Show("温循前时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                                 return;
                             }
                             else if (m5.Success == false)
                             {
                                 MessageBox.Show("温循后时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                                 return;
                             }
                             else if (m6.Success == false)
                             {
                                 MessageBox.Show("测试时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                                 return;
                             }
                             else if (m7.Success == false)
                             {
                                 MessageBox.Show("清洗时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                                 return;
                             }
                             else if (m8.Success == false)
                             {
                                 MessageBox.Show("包装时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                                 return;
                             }
                             else
                             {
                                 BeiLiaoBind(bhd);
                                 LDHanJieBind(bhd);
                                 PTGuHuaBind(bhd);
                                 WenXunQianBind(bhd);
                                 WenXunHouBind(bhd);
                                 CeShiBind(bhd);
                                 QingXiBind(bhd);
                                 BaoZhuangBind(bhd);
                             }

                         //}
                         //else if (yh.机构 == "备料")
                         //{
                         //    if (tx.bl_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtpxcTime.Text;
                         //        Match m = Regex.Match(dtpxcTime.Text, reg);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("备料时间格式输入错误.如[2015-5-5]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {
                         //            BeiLiaoBind(bhd);

                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "LD耦合焊接")
                         //{
                         //    if (tx.LD_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtp1.Text;
                         //        Match m = Regex.Match(dtp1.Text, reg);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("LD耦合焊接时间格式输入错误.如[2015-5-5]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {
                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            //if (this.tbsjsl1.Text != Convert.ToString(tx.bl_xcsl))
                         //            //{
                         //            //    MessageBox.Show("LD耦合焊接上接数量与备料下传数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "PT耦合固化")
                         //{
                         //    if (tx.PT_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtptime2.Text;
                         //        Match m = Regex.Match(dtptime2.Text, reg);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("PT耦合固化时间格式输入错误.如[2015-5-5]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {
                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            PTGuHuaBind(bhd);
                         //            //if (this.tbsjsl2.Text != Convert.ToString(tx.LD_xcsl))
                         //            //{
                         //            //    MessageBox.Show("PT耦合固化上接数量与LD耦合焊接下传数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "温循前")
                         //{
                         //    if (tx.WXQ_frsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtpfrtime1.Text;
                         //        Match m = Regex.Match(dtpfrtime1.Text, regs);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("温循前时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {
                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            PTGuHuaBind(bhd);
                         //            WenXunQianBind(bhd);

                         //            //if (this.tbsjsl3.Text != Convert.ToString(tx.PT_xcsl))
                         //            //{
                         //            //    MessageBox.Show("温循前上接数量与PT耦合固化下传数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "温循后")
                         //{
                         //    if (tx.WXH_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtpqcTime1.Text;
                         //        Match m = Regex.Match(dtpqcTime1.Text, regs);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("温循后时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {

                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            PTGuHuaBind(bhd);
                         //            WenXunQianBind(bhd);
                         //            WenXunHouBind(bhd);
                         //            //if (this.tbqcsl1.Text != Convert.ToString(tx.WXQ_frsl))
                         //            //{
                         //            //    MessageBox.Show("温循后上接数量与温循前放入数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "测试")
                         //{
                         //    if (tx.CS_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtpxtime3.Text;
                         //        Match m = Regex.Match(dtpxtime3.Text, reg);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("测试时间格式输入错误.如[2015-5-5]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {

                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            PTGuHuaBind(bhd);
                         //            WenXunQianBind(bhd);
                         //            WenXunHouBind(bhd);
                         //            CeShiBind(bhd);
                         //            //if (this.tbsjsl4.Text != Convert.ToString(tx.WXH_qcsl))
                         //            //{
                         //            //    MessageBox.Show("测试上接数量与温循后下传数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "清洗")
                         //{
                         //    if (tx.QX_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtpxctime3.Text;
                         //        Match m = Regex.Match(dtpxctime3.Text, reg);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("清洗时间格式输入错误.如[2015-5-5]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {
                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            PTGuHuaBind(bhd);
                         //            WenXunQianBind(bhd);
                         //            WenXunHouBind(bhd);
                         //            CeShiBind(bhd);
                         //            QingXiBind(bhd);
                         //            //if (this.tbsjsl5.Text != Convert.ToString(tx.CS_xcsl))
                         //            //{
                         //            //    MessageBox.Show("清洗上接数量与测试下传数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                         //    }
                         //}
                         //else if (yh.机构 == "包装")
                         //{
                         //    if (tx.BZ_xcsl != null)
                         //    {
                         //        MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                         //        return;
                         //    }
                         //    else
                         //    {
                         //        var time = this.dtpxctime4.Text;
                         //        Match m = Regex.Match(dtpxctime4.Text, reg);
                         //        if (m.Success == false)
                         //        {
                         //            MessageBox.Show("包装时间格式输入错误.如[2015-5-5]", "提示");
                         //            return;
                         //        }
                         //        else
                         //        {
                         //            BeiLiaoBind(bhd);
                         //            LDHanJieBind(bhd);
                         //            PTGuHuaBind(bhd);
                         //            WenXunQianBind(bhd);
                         //            WenXunHouBind(bhd);
                         //            CeShiBind(bhd);
                         //            QingXiBind(bhd);
                         //            BaoZhuangBind(bhd);
                         //            //if (this.tbsjsl6.Text != Convert.ToString(tx.QX_xcsl))
                         //            //{
                         //            //    MessageBox.Show("包装上接数量与清洗下传数量不符", "提示");
                         //            //    return;
                         //            //}
                         //        }
                             //}
                         //}

                         #endregion
                             #region
                             //}
                     //else
                     //{
                     //    #region 判断时间格式
                     //    if (yh.机构 == "全部")
                     //    {
                     //        var time = this.dtpxcTime.Text;
                     //        Match m1 = Regex.Match(dtpxcTime.Text, reg);
                     //        Match m2 = Regex.Match(dtp1.Text, reg);
                     //        Match m3 = Regex.Match(dtptime2.Text, reg);
                     //        Match m4 = Regex.Match(dtpfrtime1.Text, regs);
                     //        Match m5 = Regex.Match(dtpqcTime1.Text, regs);
                     //        Match m6 = Regex.Match(dtpxtime3.Text, reg);
                     //        Match m7 = Regex.Match(dtpxctime3.Text, reg);
                     //        Match m8 = Regex.Match(dtpxctime4.Text, reg);
                     //        if (m1.Success == false)
                     //        {
                     //            MessageBox.Show("备料时间格式输入错误.如[2015-5-5]", "提示");
                     //            return;
                     //        }
                     //        else if (m2.Success == false)
                     //        {
                     //            MessageBox.Show("LD耦合焊接时间格式输入错误.如[2015-5-5]", "提示");
                     //            return;
                     //        }
                     //        else if (m3.Success == false)
                     //        {
                     //            MessageBox.Show("PT耦合固化时间格式输入错误.如[2015-5-5]", "提示");
                     //            return;
                     //        }
                     //        else if (m4.Success == false)
                     //        {
                     //            MessageBox.Show("温循前时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //            return;
                     //        }
                     //        else if (m5.Success == false)
                     //        {
                     //            MessageBox.Show("温循后时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //            return;
                     //        }
                     //        else if (m6.Success == false)
                     //        {
                     //            MessageBox.Show("测试时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //            return;
                     //        }
                     //        else if (m7.Success == false)
                     //        {
                     //            MessageBox.Show("清洗时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //            return;
                     //        }
                     //        else if (m8.Success == false)
                     //        {
                     //            MessageBox.Show("包装时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            BeiLiaoBind(bhd);
                     //            LDHanJieBind(bhd);
                     //            PTGuHuaBind(bhd);
                     //            WenXunQianBind(bhd);
                     //            WenXunHouBind(bhd);
                     //            CeShiBind(bhd);
                     //            QingXiBind(bhd);
                     //            BaoZhuangBind(bhd);
                     //        }

                     //    }
                     //    else if (yh.机构 == "备料")
                     //    {
                     //        if (tx.bl_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtpxcTime.Text;
                     //            Match m = Regex.Match(dtpxcTime.Text, reg);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("备料时间格式输入错误.如[2015-5-5]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {
                     //                BeiLiaoBind(bhd);

                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "LD耦合焊接")
                     //    {
                     //        if (tx.LD_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtp1.Text;
                     //            Match m = Regex.Match(dtp1.Text, reg);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("LD耦合焊接时间格式输入错误.如[2015-5-5]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {
                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                if (this.tbsjsl1.Text != Convert.ToString(tx.bl_xcsl))
                     //                {
                     //                    MessageBox.Show("LD耦合焊接上接数量与备料下传数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "PT耦合固化")
                     //    {
                     //        if (tx.PT_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtptime2.Text;
                     //            Match m = Regex.Match(dtptime2.Text, reg);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("PT耦合固化时间格式输入错误.如[2015-5-5]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {
                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                PTGuHuaBind(bhd);
                     //                if (this.tbsjsl2.Text != Convert.ToString(tx.LD_xcsl))
                     //                {
                     //                    MessageBox.Show("PT耦合固化上接数量与LD耦合焊接下传数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "温循前")
                     //    {
                     //        if (tx.WXQ_frsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtpfrtime1.Text;
                     //            Match m = Regex.Match(dtpfrtime1.Text, regs);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("温循前时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {
                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                PTGuHuaBind(bhd);
                     //                WenXunQianBind(bhd);

                     //                if (this.tbsjsl3.Text != Convert.ToString(tx.PT_xcsl))
                     //                {
                     //                    MessageBox.Show("温循前上接数量与PT耦合固化下传数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "温循后")
                     //    {
                     //        if (tx.WXH_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtpqcTime1.Text;
                     //            Match m = Regex.Match(dtpqcTime1.Text, regs);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("温循后时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {

                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                PTGuHuaBind(bhd);
                     //                WenXunQianBind(bhd);
                     //                WenXunHouBind(bhd);
                     //                if (this.tbqcsl1.Text != Convert.ToString(tx.WXQ_frsl))
                     //                {
                     //                    MessageBox.Show("温循后上接数量与温循前放入数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "测试")
                     //    {
                     //        if (tx.CS_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtpxtime3.Text;
                     //            Match m = Regex.Match(dtpxtime3.Text, reg);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("测试时间格式输入错误.如[2015-5-5]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {

                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                PTGuHuaBind(bhd);
                     //                WenXunQianBind(bhd);
                     //                WenXunHouBind(bhd);
                     //                CeShiBind(bhd);
                     //                if (this.tbsjsl4.Text != Convert.ToString(tx.WXH_qcsl))
                     //                {
                     //                    MessageBox.Show("测试上接数量与温循后下传数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "清洗")
                     //    {
                     //        if (tx.QX_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtpxctime3.Text;
                     //            Match m = Regex.Match(dtpxctime3.Text, reg);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("清洗时间格式输入错误.如[2015-5-5]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {
                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                PTGuHuaBind(bhd);
                     //                WenXunQianBind(bhd);
                     //                WenXunHouBind(bhd);
                     //                CeShiBind(bhd);
                     //                QingXiBind(bhd);
                     //                if (this.tbsjsl5.Text != Convert.ToString(tx.CS_xcsl))
                     //                {
                     //                    MessageBox.Show("清洗上接数量与测试下传数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }
                     //    else if (yh.机构 == "包装")
                     //    {
                     //        if (tx.BZ_xcsl != null)
                     //        {
                     //            MessageBox.Show("此单你已经提交过了,不能再修改", "提示");
                     //            return;
                     //        }
                     //        else
                     //        {
                     //            var time = this.dtpxctime4.Text;
                     //            Match m = Regex.Match(dtpxctime4.Text, reg);
                     //            if (m.Success == false)
                     //            {
                     //                MessageBox.Show("包装时间格式输入错误.如[2015-5-5]", "提示");
                     //                return;
                     //            }
                     //            else
                     //            {
                     //                BeiLiaoBind(bhd);
                     //                LDHanJieBind(bhd);
                     //                PTGuHuaBind(bhd);
                     //                WenXunQianBind(bhd);
                     //                WenXunHouBind(bhd);
                     //                CeShiBind(bhd);
                     //                QingXiBind(bhd);
                     //                BaoZhuangBind(bhd);
                     //                if (this.tbsjsl6.Text != Convert.ToString(tx.QX_xcsl))
                     //                {
                     //                    MessageBox.Show("包装上接数量与清洗下传数量不符", "提示");
                     //                    return;
                     //                }
                     //            }
                     //        }
                     //    }

                     //    #endregion
                             //}
                             #endregion
                             bhd.lsh1 = this.tbLSH1.Text;
                     bhd.lsh2 = this.tbLSH2.Text;
                     bhd.lsh3 = this.tbLSH3.Text;

                     bhd.case1 = this.tbCASE1.Text;
                     bhd.case2 = this.tbCASE2.Text;
                     bhd.case3 = this.tbCASE3.Text;

                     bhd.ld1 = this.tbLDP1.Text;
                     bhd.ld2 = this.tbLDP2.Text;
                     bhd.ld3 = this.tbLDP3.Text;

                     bhd.pd1 = this.tbPDP1.Text;
                     bhd.pd2 = this.tbPDP2.Text;
                     bhd.pd3 = this.tbPDP3.Text;

                     bhd.ldj1 = this.tbLDN1.Text;
                     bhd.ldj2 = this.tbLDN2.Text;
                     bhd.ldj3 = this.tbLDN3.Text;

                     if (this.tbJC1.Text=="")
                     {
                         this.tbJC1.Text = "0";
                     }
                     bhd.jc1 = Convert.ToDecimal(this.tbJC1.Text);
                     if (this.tbJC2.Text == "")
                     {
                         this.tbJC2.Text = "0";
                     }
                     bhd.jc2 = Convert.ToDecimal(this.tbJC2.Text);
                     if (this.tbJC3.Text == "")
                     {
                         this.tbJC3.Text = "0";
                     }
                     bhd.jc3 = Convert.ToDecimal(this.tbJC3.Text);

                     bhd.oxl1 = this.tbAXL1.Text;
                     bhd.oxl2 = this.tbAXL2.Text;
                     bhd.oxl3 = this.tbAXL3.Text;

                     bhd.ldxp_xinpianjj = this.tbjj.Text;
                     bhd.ldxp_jianyanry = this.tbjyry.Text;
                     bhd.ldxp_jianyansb = this.tbjysb.Text;
                     bhd.备注 = this.rtbremark.Text;
                     bhd.LD_xh = this.textBox34.Text;
                     bhd.LD_name = this.textBox35.Text;
                     bhd.LD_sjdh = this.textBox36.Text;
                     bhd.PT_xh = this.textBox39.Text;
                     bhd.PT_name = this.textBox38.Text;
                     bhd.PT_sjdh = this.textBox37.Text;
                     bhd.KT_xh = this.textBox42.Text;
                     bhd.KT_name = this.textBox41.Text;
                     bhd.KT_sjdh = this.textBox40.Text;
                     bhd.NBP_xh0 = this.textBox45.Text;
                     bhd.NBP_name0 = this.textBox44.Text;
                     bhd.NBP_sjdh0 = this.textBox43.Text;
                     bhd.NBP_xh45 = this.textBox51.Text;
                     bhd.NBP_name45 = this.textBox50.Text;
                     bhd.NBP_sjdh45 = this.textBox49.Text;
                     bhd.JK_xh = this.textBox48.Text;
                     bhd.JK_name = this.textBox47.Text;
                     bhd.JK_sjdh = this.textBox46.Text;
                    // bool result3 = bhdbll.Add(bh);
                     bool result = false;
                     //bool result1 = false;
                     result= txbll.Update(bhd);
                     //result1 = bhdbll.Update(bh);
                     if (result == true)
                     {
                         MessageBox.Show("修改成功!", "提示");
                         this.btnUpdate.Enabled = false;
                     }
                     else
                     {
                         MessageBox.Show("修改失败!", "提示");
                     }
                 }
             }
        }
Beispiel #4
0
        private void tbczy4_MouseUp(object sender, MouseEventArgs e)
        {
            tsuhan_sg_tx bhd = new tsuhan_sg_tx();
            var name =Convert.ToInt32(gh);
            tsuhan_scgl_yh yh = yhbll.GetModel(gh);
            //if (yh.机构 == "全部")
            //{
                if (this.tabControl1.SelectedTab == tabPage1)
                {
                    #region 备料
                    bhd.bl_czy4 = this.tbczy4.Text;
                    bool result4;
                    var t = this.tbczy4.Text;
                    result4 = yhbll.Exist(t);
                    if (this.tbczy4.Text == "")
                    {
                        this.tbczy4.Text = "0";
                    }
                    else if (result4 != true)
                    {
                        //rg.ShowDialog();
                        this.tbczName4.Text = "";
                        return;
                    }
                    else
                    {
                        var yh4 = yhbll.GetModel(this.tbczy4.Text);
                        this.tbczName4.Text = yh4.姓名;
                        bhd.bl_czyname4 = this.tbczName4.Text;
                    }

                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage2)
                {
                    #region LD耦合焊接
                    bhd.LD_czy4 = this.tbcz4.Text;
                    bool result4;
                    result4 = yhbll.Exist(this.tbcz4.Text);
                    if (this.tbcz4.Text == "")
                    {
                        this.tbcz4.Text = "0";
                    }
                    else if (result4 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname4.Text = "";
                        return;
                    }
                    else
                    {
                        var yh4 = yhbll.GetModel(this.tbcz4.Text);
                        this.tbname4.Text = yh4.姓名;
                        bhd.LD_czyname3 = this.tbname3.Text;
                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage3)
                {
                    #region PT耦合固化
                    bhd.PT_czy4 = this.tbcz8.Text;
                    bool result4;
                    result4 = yhbll.Exist(this.tbcz8.Text);

                    if (this.tbcz8.Text == "")
                    {
                        this.tbcz8.Text = "0";
                    }
                    else if (result4 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname8.Text = "";
                        return;
                    }
                    else
                    {
                        var yh4 = yhbll.GetModel(this.tbcz8.Text);
                        this.tbname8.Text = yh4.姓名;
                        bhd.PT_czyname4 = this.tbname8.Text;
                    }

                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage6)
                {
                    #region 测试
                    bhd.CS_czy4 = this.tbcz14.Text;
                    bool result4;
                    result4 = yhbll.Exist(this.tbcz14.Text);

                    if (this.tbcz14.Text == "")
                    {
                        this.tbcz14.Text = "0";
                    }
                    else if (result4 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname14.Text = "";
                        return;
                    }
                    else
                    {
                        var yh4 = yhbll.GetModel(this.tbcz14.Text);
                        this.tbname14.Text = yh4.姓名;
                        bhd.CS_czyname4 = this.tbname14.Text;
                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage7)
                {
                    #region 清洗
                    bhd.QX_czy4 = this.tbcz18.Text;
                    bool result4;
                    result4 = yhbll.Exist(this.tbcz18.Text);

                    if (this.tbcz18.Text == "")
                    {
                        this.tbcz18.Text = "0";
                    }
                    else if (result4 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname18.Text = "";
                        return;
                    }
                    else
                    {
                        var yh4 = yhbll.GetModel(this.tbcz18.Text);
                        this.tbname18.Text = yh4.姓名;
                        bhd.QX_czyname4 = this.tbname18.Text;
                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage8)
                {
                    #region 包装
                    bhd.BZ_czy4 = this.tbcz22.Text;
                    bool result4;
                    result4 = yhbll.Exist(this.tbcz22.Text);

                    if (this.tbcz22.Text == "")
                    {
                        this.tbcz22.Text = "0";
                    }
                    else if (result4 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname22.Text = "";
                        return;
                    }
                    else
                    {
                        var yh4 = yhbll.GetModel(this.tbcz22.Text);
                        this.tbname22.Text = yh4.姓名;
                        bhd.BZ_czyname4 = this.tbname22.Text;
                    }
                    #endregion
                }
            //}
            //if (yh.机构 == "备料")
            //{
            //    #region 备料
            //    bhd.bl_czy4 = this.tbczy4.Text;
            //    bool result4;
            //    result4 = yhbll.Exist(this.tbczy4.Text);
            //    if (this.tbczy4.Text == "")
            //    {
            //        this.tbczy4.Text = "0";
            //    }
            //    else if (result4 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbczName4.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh4 = yhbll.GetModel(this.tbczy4.Text);
            //        this.tbczName4.Text = yh4.姓名;
            //        bhd.bl_czyname4 = this.tbczName4.Text;
            //    }

            //    #endregion
            //}
            //else if (yh.机构 == "LD耦合焊接")
            //{
            //    #region LD耦合焊接
            //    bhd.LD_czy4 = this.tbcz4.Text;
            //    bool result4;
            //    result4 = yhbll.Exist(this.tbcz4.Text);
            //    if (this.tbcz4.Text == "")
            //    {
            //        this.tbcz4.Text = "0";
            //    }
            //    else if (result4 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname4.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh4 = yhbll.GetModel(this.tbcz4.Text);
            //        this.tbname4.Text = yh4.姓名;
            //        bhd.LD_czyname4 = this.tbname4.Text;
            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "PT耦合固化")
            //{
            //    #region PT耦合固化
            //    bhd.PT_czy4 = this.tbcz8.Text;
            //    bool result4;
            //    result4 = yhbll.Exist(this.tbcz8.Text);

            //    if (this.tbcz8.Text == "")
            //    {
            //        this.tbcz8.Text = "0";
            //    }
            //    else if (result4 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname8.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh4 = yhbll.GetModel(this.tbcz8.Text);
            //        this.tbname8.Text = yh4.姓名;
            //        bhd.PT_czyname4 = this.tbname8.Text;
            //    }

            //    #endregion
            //}
            //else if (yh.机构 == "测试")
            //{
            //    #region 测试
            //    bhd.CS_czy4 = this.tbcz14.Text;
            //    bool result4;
            //    result4 = yhbll.Exist(this.tbcz14.Text);

            //    if (this.tbcz14.Text == "")
            //    {
            //        this.tbcz14.Text = "0";
            //    }
            //    else if (result4 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname14.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh4 = yhbll.GetModel(this.tbcz14.Text);
            //        this.tbname14.Text = yh4.姓名;
            //        bhd.CS_czyname4 = this.tbname14.Text;
            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "清洗")
            //{
            //    #region 清洗
            //    bhd.QX_czy4 = this.tbcz18.Text;
            //    bool result4;
            //    result4 = yhbll.Exist(this.tbcz18.Text);

            //    if (this.tbcz18.Text == "")
            //    {
            //        this.tbcz18.Text = "0";
            //    }
            //    else if (result4 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname18.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh4 = yhbll.GetModel(this.tbcz18.Text);
            //        this.tbname18.Text = yh4.姓名;
            //        bhd.QX_czyname4 = this.tbname18.Text;
            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "包装")
            //{
            //    #region 包装
            //    bhd.BZ_czy4 = this.tbcz22.Text;
            //    bool result4;
            //    result4 = yhbll.Exist(this.tbcz22.Text);

            //    if (this.tbcz22.Text == "")
            //    {
            //        this.tbcz22.Text = "0";
            //    }
            //    else if (result4 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname22.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh4 = yhbll.GetModel(this.tbcz22.Text);
            //        this.tbname22.Text = yh4.姓名;
            //        bhd.BZ_czyname4 = this.tbname22.Text;
            //    }
            //    #endregion

            //}
        }
Beispiel #5
0
 /// <summary>
 /// 新增随工单
 /// </summary>
 /// <param name="bhd"></param>
 /// <returns></returns>
 public bool Add(tsuhan_sg_tx model)
 {
     return dal.Add(model);
 }
Beispiel #6
0
        private void tbczy1_MouseUp(object sender, MouseEventArgs e)
        {
            tsuhan_sg_tx bhd = new tsuhan_sg_tx();
            //var name = Convert.ToInt32(gh);
            tsuhan_scgl_yh yh = yhbll.GetModel(gh);

            if (this.tabControl1.SelectedTab == tabPage1)
            {
                #region 备料
                bhd.bl_czy1 = this.tbczy1.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbczy1.Text);
                if (this.tbczy1.Text == "")
                {
                    this.tbczy1.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbczName1.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbczy1.Text);
                    this.tbczName1.Text = yh1.姓名;
                    bhd.bl_czyname1 = this.tbczName1.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage2)
            {
                #region LD耦合焊接
                bhd.LD_czy1 = this.tbcz1.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz1.Text);
                if (this.tbcz1.Text == "")
                {
                    this.tbcz1.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname1.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz1.Text);
                    this.tbname1.Text = yh1.姓名;
                    bhd.LD_czyname1 = this.tbname1.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage3)
            {
                #region PT耦合固化
                bhd.PT_czy1 = this.tbcz5.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz5.Text);
                if (this.tbcz5.Text == "")
                {
                    this.tbcz5.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname5.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz5.Text);
                    this.tbname5.Text = yh1.姓名;
                    bhd.PT_czyname1 = this.tbname5.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage4)
            {
                #region 温循前
                bhd.WXQ_czy = this.tbcz9.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz9.Text);
                if (this.tbcz9.Text == "")
                {
                    this.tbcz9.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname9.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz9.Text);
                    this.tbname9.Text = yh1.姓名;
                    bhd.WXQ_czyname = this.tbname9.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage5)
            {
                #region 温循后
                bhd.WXH_czy = this.tbcz10.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz10.Text);

                if (this.tbcz10.Text == "")
                {
                    this.tbcz10.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname10.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz10.Text);
                    this.tbname10.Text = yh1.姓名;
                    bhd.WXH_czyname = this.tbname10.Text;

                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage6)
            {
                #region 测试
                bhd.CS_czy1 = this.tbcz11.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz11.Text);
                if (this.tbcz11.Text == "")
                {
                    this.tbcz11.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname11.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz11.Text);
                    this.tbname11.Text = yh1.姓名;
                    bhd.CS_czyname1 = this.tbname11.Text;
                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage7)
            {
                #region 清洗
                bhd.QX_czy1 = this.tbcz15.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz15.Text);
                if (this.tbcz15.Text == "")
                {
                    this.tbcz15.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname15.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz15.Text);
                    this.tbname15.Text = yh1.姓名;
                    bhd.QX_czyname1 = this.tbname15.Text;
                }
                #endregion
            }
            else if (this.tabControl1.SelectedTab == tabPage8)
            {
                #region 包装
                bhd.BZ_czy1 = this.tbcz19.Text;
                bool result1;
                result1 = yhbll.Exist(this.tbcz19.Text);
                if (this.tbcz19.Text == "")
                {
                    this.tbcz19.Text = "0";
                }
                else if (result1 != true)
                {
                    rg.ShowDialog();
                    this.tbname19.Text = "";
                    return;
                }
                else
                {
                    var yh1 = yhbll.GetModel(this.tbcz19.Text);
                    this.tbname19.Text = yh1.姓名;
                    bhd.BZ_czyname1 = this.tbname19.Text;
                }
                #endregion
            }

            #region
            //if (yh.机构 == "全部")
            //{
            //    if (this.tabControl1.SelectedTab == tabPage1)
            //    {
            //        #region 备料
            //        bhd.bl_czy1 = this.tbczy1.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbczy1.Text);
            //        if (this.tbczy1.Text == "")
            //        {
            //            this.tbczy1.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbczName1.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbczy1.Text);
            //            this.tbczName1.Text = yh1.姓名;
            //            bhd.bl_czyname1 = this.tbczName1.Text;

            //        }
            //        #endregion
            //        #region 备料
            //        bhd.bl_czy2 = this.tbczy2.Text;
            //        bool result2;
            //        result2 = yhbll.Exist(this.tbczy2.Text);

            //        if (this.tbczy2.Text == "")
            //        {
            //            this.tbczy2.Text = "0";
            //        }
            //        else if (result2 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbczName2.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh2 = yhbll.GetModel(this.tbczy2.Text);
            //            this.tbczName2.Text = yh2.姓名;
            //            bhd.bl_czyname2 = this.tbczName2.Text;

            //        }
            //        #endregion
            //        #region 备料
            //        bhd.bl_czy3 = this.tbczy3.Text;
            //        bool result3;
            //        result3 = yhbll.Exist(this.tbczy3.Text);

            //        if (this.tbczy3.Text == "")
            //        {
            //            this.tbczy3.Text = "0";
            //        }
            //        else if (result3 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbczName3.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh3 = yhbll.GetModel(this.tbczy3.Text);
            //            this.tbczName3.Text = yh3.姓名;
            //            bhd.bl_czyname3 = this.tbczName3.Text;

            //        }
            //        #endregion
            //        #region 备料
            //        bhd.bl_czy4 = this.tbczy4.Text;
            //        bool result4;
            //        result4 = yhbll.Exist(this.tbczy4.Text);
            //        if (this.tbczy4.Text == "")
            //        {
            //            this.tbczy4.Text = "0";
            //        }
            //        else if (result4 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbczName4.Text = "";

            //            return;
            //        }
            //        else
            //        {
            //            var yh4 = yhbll.GetModel(this.tbczy4.Text);
            //            this.tbczName4.Text = yh4.姓名;
            //            bhd.bl_czyname4 = this.tbczName4.Text;
            //        }

            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage2)
            //    {
            //        #region LD耦合焊接
            //        bhd.LD_czy1 = this.tbcz1.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz1.Text);
            //        if (this.tbcz1.Text == "")
            //        {
            //            this.tbcz1.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname1.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz1.Text);
            //            this.tbname1.Text = yh1.姓名;
            //            bhd.LD_czyname1 = this.tbname1.Text;

            //        }
            //        #endregion
            //        #region LD耦合焊接
            //        bhd.LD_czy2 = this.tbcz2.Text;
            //        bool result2;
            //        result2 = yhbll.Exist(this.tbcz2.Text);

            //        if (this.tbcz2.Text == "")
            //        {
            //            this.tbcz2.Text = "0";
            //        }
            //        else if (result2 != true)
            //        {
            //            this.tbname2.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh2 = yhbll.GetModel(this.tbcz2.Text);
            //            this.tbname2.Text = yh2.姓名;
            //            bhd.LD_czyname1 = this.tbname1.Text;

            //        }
            //        #endregion
            //        #region LD耦合焊接
            //        bhd.LD_czy3 = this.tbcz3.Text;
            //        bool result3;
            //        result3 = yhbll.Exist(this.tbcz3.Text);

            //        if (this.tbcz3.Text == "")
            //        {
            //            this.tbcz3.Text = "0";
            //        }
            //        else if (result3 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname3.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh3 = yhbll.GetModel(this.tbcz3.Text);
            //            this.tbname3.Text = yh3.姓名;
            //            bhd.LD_czyname2 = this.tbname2.Text;

            //        }
            //        #endregion
            //        #region LD耦合焊接
            //        bhd.LD_czy4 = this.tbcz4.Text;
            //        bool result4;
            //        result4 = yhbll.Exist(this.tbcz4.Text);
            //        if (this.tbcz4.Text == "")
            //        {
            //            this.tbcz4.Text = "0";
            //        }
            //        else if (result4 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname4.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh4 = yhbll.GetModel(this.tbcz4.Text);
            //            this.tbname4.Text = yh4.姓名;
            //            bhd.LD_czyname3 = this.tbname3.Text;
            //        }
            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage3)
            //    {
            //        #region PT耦合固化
            //        bhd.PT_czy1 = this.tbcz5.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz5.Text);
            //        if (this.tbcz5.Text == "")
            //        {
            //            this.tbcz5.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname5.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz5.Text);
            //            this.tbname5.Text = yh1.姓名;
            //            bhd.PT_czyname1 = this.tbname5.Text;

            //        }
            //        #endregion
            //        #region PT耦合固化
            //        bhd.PT_czy2 = this.tbcz6.Text;
            //        bool result2;
            //        result2 = yhbll.Exist(this.tbcz6.Text);

            //        if (this.tbcz6.Text == "")
            //        {
            //            this.tbcz6.Text = "0";
            //        }
            //        else if (result2 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname6.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh2 = yhbll.GetModel(this.tbcz6.Text);
            //            this.tbname6.Text = yh2.姓名;
            //            bhd.PT_czyname2 = this.tbname6.Text;

            //        }

            //        #endregion
            //        #region PT耦合固化
            //        bhd.PT_czy3 = this.tbcz7.Text;
            //        bool result3;
            //        result3 = yhbll.Exist(this.tbcz7.Text);

            //        if (this.tbcz7.Text == "")
            //        {
            //            this.tbcz7.Text = "0";
            //        }
            //        else if (result3 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname7.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh3 = yhbll.GetModel(this.tbcz7.Text);
            //            this.tbname7.Text = yh3.姓名;
            //            bhd.PT_czyname3 = this.tbname7.Text;

            //        }
            //        #endregion
            //        #region PT耦合固化
            //        bhd.PT_czy4 = this.tbcz8.Text;
            //        bool result4;
            //        result4 = yhbll.Exist(this.tbcz8.Text);

            //        if (this.tbcz8.Text == "")
            //        {
            //            this.tbcz8.Text = "0";
            //        }
            //        else if (result4 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname8.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh4 = yhbll.GetModel(this.tbcz8.Text);
            //            this.tbname8.Text = yh4.姓名;
            //            bhd.PT_czyname4 = this.tbname8.Text;
            //        }

            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage4)
            //    {
            //        #region 温循前
            //        bhd.WXQ_czy = this.tbcz9.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz9.Text);
            //        if (this.tbcz9.Text == "")
            //        {
            //            this.tbcz9.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname9.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz9.Text);
            //            this.tbname9.Text = yh1.姓名;
            //            bhd.WXQ_czyname = this.tbname9.Text;

            //        }
            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage5)
            //    {
            //        #region 温循后
            //        bhd.WXH_czy = this.tbcz10.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz10.Text);

            //        if (this.tbcz10.Text == "")
            //        {
            //            this.tbcz10.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname10.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz10.Text);
            //            this.tbname10.Text = yh1.姓名;
            //            bhd.WXH_czyname = this.tbname10.Text;

            //        }
            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage6)
            //    {
            //        #region 测试
            //        bhd.CS_czy1 = this.tbcz11.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz11.Text);
            //        if (this.tbcz11.Text == "")
            //        {
            //            this.tbcz11.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname11.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz11.Text);
            //            this.tbname11.Text = yh1.姓名;
            //            bhd.CS_czyname1 = this.tbname11.Text;
            //        }
            //        #endregion

            //        #region 测试
            //        bhd.CS_czy2 = this.tbcz12.Text;
            //        bool result2;
            //        result2 = yhbll.Exist(this.tbcz12.Text);

            //        if (this.tbcz12.Text == "")
            //        {
            //            this.tbcz12.Text = "0";
            //        }
            //        else if (result2 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname12.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh2 = yhbll.GetModel(this.tbcz12.Text);
            //            this.tbname12.Text = yh2.姓名;
            //            bhd.CS_czyname2 = this.tbname12.Text;
            //        }
            //        #endregion
            //        #region 测试
            //        bhd.CS_czy3 = this.tbcz13.Text;
            //        bool result3;
            //        result3 = yhbll.Exist(this.tbcz13.Text);

            //        if (this.tbcz13.Text == "")
            //        {
            //            this.tbcz13.Text = "0";
            //        }
            //        else if (result3 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname13.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh3 = yhbll.GetModel(this.tbcz13.Text);
            //            this.tbname13.Text = yh3.姓名;
            //            bhd.CS_czyname3 = this.tbname13.Text;
            //        }

            //        #endregion
            //        #region 测试
            //        bhd.CS_czy4 = this.tbcz14.Text;
            //        bool result4;
            //        result4 = yhbll.Exist(this.tbcz14.Text);

            //        if (this.tbcz14.Text == "")
            //        {
            //            this.tbcz14.Text = "0";
            //        }
            //        else if (result4 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname14.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh4 = yhbll.GetModel(this.tbcz14.Text);
            //            this.tbname14.Text = yh4.姓名;
            //            bhd.CS_czyname4 = this.tbname14.Text;
            //        }
            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage7)
            //    {
            //        #region 清洗
            //        bhd.QX_czy1 = this.tbcz15.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz15.Text);
            //        if (this.tbcz15.Text == "")
            //        {
            //            this.tbcz15.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname15.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz15.Text);
            //            this.tbname15.Text = yh1.姓名;
            //            bhd.QX_czyname1 = this.tbname15.Text;
            //        }
            //        #endregion
            //        #region 清洗
            //        bhd.QX_czy2 = this.tbcz16.Text;
            //        bool result2;
            //        result2 = yhbll.Exist(this.tbcz16.Text);
            //        if (this.tbcz16.Text == "")
            //        {
            //            this.tbcz16.Text = "0";
            //        }
            //        else if (result2 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname16.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh2 = yhbll.GetModel(this.tbcz16.Text);
            //            this.tbname16.Text = yh2.姓名;
            //            bhd.QX_czyname2 = this.tbname16.Text;
            //        }
            //        #endregion
            //        #region 清洗
            //        bhd.QX_czy3 = this.tbcz17.Text;
            //        bool result3;
            //        result3 = yhbll.Exist(this.tbcz17.Text);

            //        if (this.tbcz17.Text == "")
            //        {
            //            this.tbcz17.Text = "0";
            //        }
            //        else if (result3 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname17.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh3 = yhbll.GetModel(this.tbcz17.Text);
            //            this.tbname17.Text = yh3.姓名;
            //            bhd.QX_czyname3 = this.tbname17.Text;
            //        }
            //        #endregion
            //        #region 清洗
            //        bhd.QX_czy4 = this.tbcz18.Text;
            //        bool result4;
            //        result4 = yhbll.Exist(this.tbcz18.Text);

            //        if (this.tbcz18.Text == "")
            //        {
            //            this.tbcz18.Text = "0";
            //        }
            //        else if (result4 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname18.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh4 = yhbll.GetModel(this.tbcz18.Text);
            //            this.tbname18.Text = yh4.姓名;
            //            bhd.QX_czyname4 = this.tbname18.Text;
            //        }
            //        #endregion
            //    }
            //    else if (this.tabControl1.SelectedTab == tabPage8)
            //    {
            //        #region 包装
            //        bhd.BZ_czy1 = this.tbcz19.Text;
            //        bool result1;
            //        result1 = yhbll.Exist(this.tbcz19.Text);
            //        if (this.tbcz19.Text == "")
            //        {
            //            this.tbcz19.Text = "0";
            //        }
            //        else if (result1 != true)
            //        {
            //            rg.ShowDialog();
            //            this.tbname19.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh1 = yhbll.GetModel(this.tbcz19.Text);
            //            this.tbname19.Text = yh1.姓名;
            //            bhd.BZ_czyname1 = this.tbname19.Text;
            //        }
            //        #endregion
            //        #region 包装
            //        bhd.BZ_czy2 = this.tbcz20.Text;
            //        bool result2;
            //        result2 = yhbll.Exist(this.tbcz20.Text);

            //        if (this.tbcz20.Text == "")
            //        {
            //            this.tbcz20.Text = "0";
            //        }
            //        else if (result2 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname20.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh2 = yhbll.GetModel(this.tbcz20.Text);
            //            this.tbname20.Text = yh2.姓名;
            //            bhd.BZ_czyname2 = this.tbname20.Text;
            //        }
            //        #endregion
            //        #region 包装
            //        bhd.BZ_czy3 = this.tbcz21.Text;
            //        bool result3;
            //        result3 = yhbll.Exist(this.tbcz21.Text);

            //        if (this.tbcz21.Text == "")
            //        {
            //            this.tbcz21.Text = "0";
            //        }
            //        else if (result3 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname21.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh3 = yhbll.GetModel(this.tbcz21.Text);
            //            this.tbname21.Text = yh3.姓名;
            //            bhd.BZ_czyname3 = this.tbname21.Text;
            //        }

            //        #endregion
            //        #region 包装
            //        bhd.BZ_czy4 = this.tbcz22.Text;
            //        bool result4;
            //        result4 = yhbll.Exist(this.tbcz22.Text);

            //        if (this.tbcz22.Text == "")
            //        {
            //            this.tbcz22.Text = "0";
            //        }
            //        else if (result4 != true)
            //        {
            //            //rg.ShowDialog();
            //            this.tbname22.Text = "";
            //            return;
            //        }
            //        else
            //        {
            //            var yh4 = yhbll.GetModel(this.tbcz22.Text);
            //            this.tbname22.Text = yh4.姓名;
            //            bhd.BZ_czyname4 = this.tbname22.Text;
            //        }
            //        #endregion
            //    }
            //}
            //if (yh.机构 == "备料")
            //{
            //    #region 备料
            //    bhd.bl_czy1 = this.tbczy1.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbczy1.Text);
            //    if (this.tbczy1.Text == "")
            //    {
            //        this.tbczy1.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbczName1.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbczy1.Text);
            //        this.tbczName1.Text = yh1.姓名;
            //        bhd.bl_czyname1 = this.tbczName1.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "LD耦合焊接")
            //{
            //    #region LD耦合焊接
            //    bhd.LD_czy1 = this.tbcz1.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz1.Text);
            //    if (this.tbcz1.Text == "")
            //    {
            //        this.tbcz1.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname1.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz1.Text);
            //        this.tbname1.Text = yh1.姓名;
            //        bhd.LD_czyname1 = this.tbname1.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "PT耦合固化")
            //{
            //    #region PT耦合固化
            //    bhd.PT_czy1 = this.tbcz5.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz5.Text);
            //    if (this.tbcz5.Text == "")
            //    {
            //        this.tbcz5.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname5.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz5.Text);
            //        this.tbname5.Text = yh1.姓名;
            //        bhd.PT_czyname1 = this.tbname5.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "温循前")
            //{
            //    #region 温循前
            //    bhd.WXQ_czy = this.tbcz9.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz9.Text);
            //    if (this.tbcz9.Text == "")
            //    {
            //        this.tbcz9.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname9.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz9.Text);
            //        this.tbname9.Text = yh1.姓名;
            //        bhd.WXQ_czyname = this.tbname9.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "温循后")
            //{
            //    #region 温循后
            //    bhd.WXH_czy = this.tbcz10.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz10.Text);

            //    if (this.tbcz10.Text == "")
            //    {
            //        this.tbcz10.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname10.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz10.Text);
            //        this.tbname10.Text = yh1.姓名;
            //        bhd.WXH_czyname = this.tbname10.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "测试")
            //{
            //    #region 测试
            //    bhd.CS_czy1 = this.tbcz11.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz11.Text);
            //    if (this.tbcz11.Text == "")
            //    {
            //        this.tbcz11.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname11.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz11.Text);
            //        this.tbname11.Text = yh1.姓名;
            //        bhd.CS_czyname1 = this.tbname11.Text;
            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "清洗")
            //{
            //    #region 清洗
            //    bhd.QX_czy1 = this.tbcz15.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz15.Text);
            //    if (this.tbcz15.Text == "")
            //    {
            //        this.tbcz15.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname15.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz15.Text);
            //        this.tbname15.Text = yh1.姓名;
            //        bhd.QX_czyname1 = this.tbname15.Text;
            //    }
            //    #endregion
            //}
            //else if (yh.机构 == "包装")
            //{
            //    #region 包装
            //    bhd.BZ_czy1 = this.tbcz19.Text;
            //    bool result1;
            //    result1 = yhbll.Exist(this.tbcz19.Text);
            //    if (this.tbcz19.Text == "")
            //    {
            //        this.tbcz19.Text = "0";
            //    }
            //    else if (result1 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname19.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh1 = yhbll.GetModel(this.tbcz19.Text);
            //        this.tbname19.Text = yh1.姓名;
            //        bhd.BZ_czyname1 = this.tbname19.Text;
            //    }
            //    #endregion

            //}
            #endregion
        }
Beispiel #7
0
        /// <summary>
        /// LD耦合焊接
        /// </summary>
        /// <param name="bhd"></param>
        private void LDHanJieBind(tsuhan_sg_tx bhd)
        {
            #region LD耦合焊接
            bhd.LD_sbbh1 = this.tb1.Text;
            bhd.LD_sbbh2 = this.tb2.Text;
            bhd.LD_sbbh3 = this.tb3.Text;
            bhd.LD_sbbh4 = this.tb4.Text;
            if (this.tbsjsl1.Text == "")
            {
                this.tbsjsl1.Text = "0";
            }

            bhd.LD_sjsl = Convert.ToInt32(this.tbsjsl1.Text);
            if (this.tbxcsl1.Text == "")
            {
                this.tbxcsl1.Text = "0";
            }
            bhd.LD_xcsl = Convert.ToInt32(this.tbxcsl1.Text);
            if (this.dtp1.Text == "" || this.dtp1.Text == string.Empty)
            {
                this.dtp1.Text = DateTime.Now.ToString("yyyy-MM-dd");
            }
            bhd.LD_xctime = Convert.ToDateTime(this.dtp1.Text);
            bhd.LD_czy1 = this.tbcz1.Text;
            bhd.LD_czy2 = this.tbcz2.Text;
            bhd.LD_czy3 = this.tbcz3.Text;
            bhd.LD_czy4 = this.tbcz4.Text;
            bhd.LD_czyname1 = this.tbname1.Text;
            bhd.LD_czyname2 = this.tbname2.Text;
            bhd.LD_czyname3 = this.tbname3.Text;
            bhd.LD_czyname4 = this.tbname4.Text;
            bhd.LD_lry = this.tblr1.Text;
            bhd.LD_lryname = this.tblrname1.Text;
            if (this.tbyy11.Text == "")
            {
                this.tbyy11.Text = "0";
            }
            bhd.ldng1 = Convert.ToInt32(this.tbyy11.Text);
            if (this.tbyy12.Text == "")
            {
                this.tbyy12.Text = "0";
            }
            bhd.ldng2 = Convert.ToInt32(this.tbyy12.Text);
            if (this.tbyy13.Text == "")
            {
                this.tbyy13.Text = "0";
            }
            bhd.ldng3 = Convert.ToInt32(this.tbyy13.Text);
            if (this.tbyy14.Text == "")
            {
                this.tbyy14.Text = "0";
            }
            bhd.ldng4 = Convert.ToInt32(this.tbyy14.Text);
            if (this.tbyy15.Text == "")
            {
                this.tbyy15.Text = "0";
            }
            bhd.ldng5 = Convert.ToInt32(this.tbyy15.Text);
            if (this.tbyy16.Text == "")
            {
                this.tbyy16.Text = "0";
            }
            bhd.ldng6 = Convert.ToInt32(this.tbyy16.Text);
            if (this.tbyy17.Text == "")
            {
                this.tbyy17.Text = "0";
            }
            bhd.ldng7 = Convert.ToInt32(this.tbyy17.Text);
            if (this.tbyy18.Text == "")
            {
                this.tbyy18.Text = "0";
            }
            bhd.ldng8 = Convert.ToInt32(this.tbyy18.Text);
            if (this.tbyy19.Text == "")
            {
                this.tbyy19.Text = "0";
            }
            bhd.ldng9 = Convert.ToInt32(this.tbyy19.Text);
            bhd.ldngoth = this.tbyy20.Text;
            if (this.tbyy20sl.Text == "")
            {
                this.tbyy20sl.Text = "0";
            }
            bhd.ldngothnum = Convert.ToInt32(this.tbyy20sl.Text);
            if (this.tbbhksl1.Text=="")
            {
                this.tbbhksl1.Text = "0";
            }
            bhd.LD_bhgallsl = Convert.ToInt32(this.tbbhksl1.Text);
            if (this.tbjzsl1.Text == "")
            {
                this.tbjzsl1.Text = "0";
            }
            bhd.LD_jzsl = Convert.ToInt32(this.tbjzsl1.Text);
            #endregion
        }
Beispiel #8
0
 /// <summary>
 /// 新增随工单
 /// </summary>
 /// <param name="bhd"></param>
 /// <returns></returns>
 public bool Add(tsuhan_sg_tx model)
 {
     return(dal.Add(model));
 }
Beispiel #9
0
        /// <summary>
        /// 备料
        /// </summary>
        /// <param name="bhd"></param>
        private void BeiLiaoBind(tsuhan_sg_tx bhd)
        {
            #region 备料
            bhd.bl_sbbh1 = this.tbsbbh1.Text;
            bhd.bl_sbbh2 = this.tbsbbh2.Text;
            bhd.bl_sbbh3 = this.tbsbbh3.Text;
            bhd.bl_sbbh4 = this.tbsbbh4.Text;
            if (this.tbxcsl.Text=="")
            {
                this.tbxcsl.Text = "0";
            }
            bhd.bl_xcsl = Convert.ToInt32(this.tbxcsl.Text);
            if (this.tbbhgsl.Text == "")
            {
                this.tbbhgsl.Text = "0";
            }
            bhd.bl_bhgallsl = Convert.ToInt32(this.tbbhgsl.Text);
            if (this.dtpxcTime.Text == "" || this.dtpxcTime.Text == string.Empty)
            {
                this.dtpxcTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
            }
            bhd.bl_xctime = Convert.ToDateTime(this.dtpxcTime.Text);
            bhd.bl_czy1 = this.tbczy1.Text;
            bhd.bl_czy2 = this.tbczy2.Text;
            bhd.bl_czy3 = this.tbczy3.Text;
            //bhd.bl_czy4 = this.tbczy4.Text;
            //var yh1 = yhbll.GetModel(this.tbczy1.Text);
            //var yh2 = yhbll.GetModel(this.tbczy2.Text);
            //var yh3 = yhbll.GetModel(this.tbczy3.Text);
            //var yh4 = yhbll.GetModel(this.tbczy4.Text);
            //this.tbczName1.Text = yh1.姓名;
            //this.tbczName2.Text = yh2.姓名;
            //this.tbczName3.Text = yh3.姓名;
            //this.tbczName4.Text = yh4.姓名;
            bhd.bl_czyname1 = this.tbczName1.Text;
            bhd.bl_czyname2 = this.tbczName2.Text;
            bhd.bl_czyname3 = this.tbczName3.Text;
            bhd.bl_czyname4 = this.tbczName4.Text;
            bhd.bl_lry = this.tblry.Text;
            bhd.bl_lryname = this.tblrName.Text;
            if (this.tbyy1.Text=="")
            {
                this.tbyy1.Text = "0";
            }
            bhd.blng1 = Convert.ToInt32(this.tbyy1.Text);
            if (this.tbyy2.Text == "")
            {
                this.tbyy2.Text = "0";
            }
            bhd.blng2 = Convert.ToInt32(this.tbyy2.Text);
            if (this.tbyy3.Text == "")
            {
                this.tbyy3.Text = "0";
            }
            bhd.blng3 = Convert.ToInt32(this.tbyy3.Text);
            if (this.tbyy4.Text == "")
            {
                this.tbyy4.Text = "0";
            }
            bhd.blng4 = Convert.ToInt32(this.tbyy4.Text);
            if (this.tbyy5.Text == "")
            {
                this.tbyy5.Text = "0";
            }
            bhd.blng5 = Convert.ToInt32(this.tbyy5.Text);
            if (this.tbyy6.Text == "")
            {
                this.tbyy6.Text = "0";
            }
            bhd.blng6 = Convert.ToInt32(this.tbyy6.Text);
            if (this.tbyy7.Text == "")
            {
                this.tbyy7.Text = "0";
            }
            bhd.blng7 = Convert.ToInt32(this.tbyy7.Text);
            if (this.tbyy8.Text == "")
            {
                this.tbyy8.Text = "0";
            }
            bhd.blng8 = Convert.ToInt32(this.tbyy8.Text);
            if (this.tbyy9.Text == "")
            {
                this.tbyy9.Text = "0";
            }
            bhd.blng9 = Convert.ToInt32(this.tbyy9.Text);
            bhd.blngoth = this.tbyy10.Text;
            if (this.tbyy10Sl.Text == "")
            {
                this.tbyy10Sl.Text = "0";
            }
            bhd.blngothnum = Convert.ToInt32(this.tbyy10Sl.Text);

            #endregion
        }
Beispiel #10
0
        /// <summary>
        /// 测试
        /// </summary>
        /// <param name="bhd"></param>
        private void CeShiBind(tsuhan_sg_tx bhd)
        {
            #region 测试
            bhd.CS_sbbh1 = this.tb11.Text;
            bhd.CS_sbbh2 = this.tb12.Text;
            bhd.CS_sbbh3 = this.tb13.Text;
            bhd.CS_sbbh4 = this.tb14.Text;
            if (this.tbsjsl4.Text == "")
            {
                this.tbsjsl4.Text = "0";
            }
            bhd.CS_sjsl = Convert.ToInt32(this.tbsjsl4.Text);
            if (this.tbxcsl4.Text == "")
            {
                this.tbxcsl4.Text = "0";
            }
            bhd.CS_xcsl = Convert.ToInt32(this.tbxcsl4.Text);
            if (this.dtpxtime3.Text == "")
            {
                this.dtpxtime3.Text = DateTime.Now.ToString("yyyy-MM-dd");
            }
            bhd.CS_xctime = Convert.ToDateTime(this.dtpxtime3.Text);
            bhd.CS_czy1 = this.tbcz11.Text;
            bhd.CS_czy2 = this.tbcz12.Text;
            bhd.CS_czy3 = this.tbcz13.Text;
            bhd.CS_czy4 = this.tbcz14.Text;
            bhd.CS_czyname1 = this.tbname11.Text;
            bhd.CS_czyname2 = this.tbname12.Text;
            bhd.CS_czyname3 = this.tbname13.Text;
            bhd.CS_czyname4 = this.tbname14.Text;
            bhd.CS_lry = this.tblr5.Text;
            bhd.CS_lryname = this.tblrname5.Text;
            if (this.tbyy31.Text == "")
            {
                this.tbyy31.Text = "0";
            }
            bhd.csng1 = Convert.ToInt32(this.tbyy31.Text);
            if (this.tbyy32.Text == "")
            {
                this.tbyy32.Text = "0";
            }
            bhd.csng2 = Convert.ToInt32(this.tbyy32.Text);
            if (this.tbyy33.Text == "")
            {
                this.tbyy33.Text = "0";
            }
            bhd.csng3 = Convert.ToInt32(this.tbyy33.Text);
            if (this.tbyy34.Text == "")
            {
                this.tbyy34.Text = "0";
            }
            bhd.csng4 = Convert.ToInt32(this.tbyy34.Text);
            if (this.tbyy35.Text == "")
            {
                this.tbyy35.Text = "0";
            }
            bhd.csng5 = Convert.ToInt32(this.tbyy35.Text);
            if (this.tbyy36.Text == "")
            {
                this.tbyy36.Text = "0";
            }
            bhd.csng6 = Convert.ToInt32(this.tbyy36.Text);
            if (this.tbyy37.Text == "")
            {
                this.tbyy37.Text = "0";
            }
            bhd.csng7 = Convert.ToInt32(this.tbyy37.Text);
            if (this.tbyy38.Text == "")
            {
                this.tbyy38.Text = "0";
            }
            bhd.csng8 = Convert.ToInt32(this.tbyy38.Text);
            bhd.csngoth = this.rtbyy39.Text;
            if (this.tbyy39sl.Text == "")
            {
                this.tbyy39sl.Text = "0";
            }
            bhd.csngothnum = Convert.ToInt32(this.tbyy39sl.Text);
            if (this.tbbhgsl2.Text == "")
            {
                this.tbbhgsl2.Text = "0";
            }
            bhd.CS_bhgallsl = Convert.ToInt32(this.tbbhgsl2.Text);

            #endregion
        }
Beispiel #11
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            //时间正则表达式
            string reg = @"^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$";
            string regs = @"^(((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-)) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d)$";

            var name =Convert.ToInt32(gh);
            tsuhan_scgl_yh yh = yhbll.GetModel(gh);
            tsuhan_sg_tx bhd = new tsuhan_sg_tx();
            var sgdxh = this.tbSGDXH.Text + this.tbDXH1.Text;
            bhd.随工单号 = sgdxh;

            #region 判断不合格数量是否正确
            //if (yh.机构 == "备料")
            //{

                if (this.tbyy10Sl.Text == "")
                {
                    this.tbyy10Sl.Text = "0";
                }
                if (this.tbyy9.Text == "")
                {
                    this.tbyy9.Text = "0";
                }
                if (this.tbyy8.Text == "")
                {
                    this.tbyy8.Text = "0";
                }
                if (this.tbyy7.Text == "")
                {
                    this.tbyy7.Text = "0";
                }
                if (this.tbyy6.Text == "")
                {
                    this.tbyy6.Text = "0";
                }
                if (this.tbyy5.Text == "")
                {
                    this.tbyy5.Text = "0";
                }
                if (this.tbyy4.Text == "")
                {
                    this.tbyy4.Text = "0";
                }
                if (this.tbyy3.Text == "")
                {
                    this.tbyy3.Text = "0";
                }
                if (this.tbyy2.Text == "")
                {
                    this.tbyy2.Text = "0";
                }
                if (this.tbyy1.Text == "")
                {
                    this.tbyy1.Text = "0";
                }
                if (this.tbbhgsl.Text == "")
                {
                    this.tbbhgsl.Text = "0";
                }
                var allnum = int.Parse(this.tbyy1.Text) + int.Parse(this.tbyy2.Text) + int.Parse(this.tbyy3.Text) + int.Parse(this.tbyy4.Text) + int.Parse(this.tbyy5.Text) + int.Parse(this.tbyy6.Text) + int.Parse(this.tbyy7.Text) + int.Parse(this.tbyy8.Text) + int.Parse(this.tbyy9.Text) + int.Parse(this.tbyy10Sl.Text);
                if (this.tbbhgsl.Text != Convert.ToString(allnum))
                {
                    MessageBox.Show("不合格总数错误", "提示");
                    return;
                }

            //}
            //else if (yh.机构 == "LD耦合焊接")
            //{
                if (this.tbyy20sl.Text == "")
                {
                    this.tbyy20sl.Text = "0";
                }
                if (this.tbyy19.Text == "")
                {
                    this.tbyy19.Text = "0";
                }
                if (this.tbyy18.Text == "")
                {
                    this.tbyy18.Text = "0";
                }
                if (this.tbyy17.Text == "")
                {
                    this.tbyy17.Text = "0";
                }
                if (this.tbyy16.Text == "")
                {
                    this.tbyy16.Text = "0";
                }
                if (this.tbyy15.Text == "")
                {
                    this.tbyy15.Text = "0";
                }
                if (this.tbyy14.Text == "")
                {
                    this.tbyy14.Text = "0";
                }
                if (this.tbyy13.Text == "")
                {
                    this.tbyy13.Text = "0";
                }
                if (this.tbyy12.Text == "")
                {
                    this.tbyy12.Text = "0";
                }
                if (this.tbyy11.Text == "")
                {
                    this.tbyy11.Text = "0";
                }
                if (this.tbjzsl1.Text == "")
                {
                    this.tbjzsl1.Text = "0";
                }
                if (this.tbbhksl1.Text == "")
                {
                    this.tbbhksl1.Text = "0";
                }

                var allnum1 = int.Parse(this.tbyy11.Text) + int.Parse(this.tbyy12.Text) + int.Parse(this.tbyy13.Text) + int.Parse(this.tbyy14.Text) + int.Parse(this.tbyy15.Text) + int.Parse(this.tbyy16.Text) + int.Parse(this.tbyy17.Text) + int.Parse(this.tbyy18.Text) + int.Parse(this.tbyy19.Text) + int.Parse(this.tbyy20sl.Text);
                var num = int.Parse(this.tbbhksl1.Text) + int.Parse(this.tbjzsl1.Text);
                var all = num + int.Parse(this.tbxcsl1.Text);
                if (Convert.ToString(num) != Convert.ToString(allnum1))
                {
                    MessageBox.Show("不合格总数错误", "提示");
                    return;
                }
                else if (Convert.ToString(all) != this.tbsjsl1.Text)
                {
                    MessageBox.Show("数量与上接数量不符", "提示");
                    return;
                }
            //}
            //else if (yh.机构 == "PT耦合固化")
            //{
                if (this.tbyy30sl.Text == "")
                {
                    this.tbyy30sl.Text = "0";
                }
                if (this.tbyy29.Text == "")
                {
                    this.tbyy29.Text = "0";
                }
                if (this.tbyy28.Text == "")
                {
                    this.tbyy28.Text = "0";
                }
                if (this.tbyy27.Text == "")
                {
                    this.tbyy27.Text = "0";
                }
                if (this.tbyy26.Text == "")
                {
                    this.tbyy26.Text = "0";
                }
                if (this.tbyy25.Text == "")
                {
                    this.tbyy25.Text = "0";
                }
                if (this.tbyy24.Text == "")
                {
                    this.tbyy24.Text = "0";
                }
                if (this.tbyy23.Text == "")
                {
                    this.tbyy23.Text = "0";
                }
                if (this.tbyy22.Text == "")
                {
                    this.tbyy22.Text = "0";
                }
                if (this.tbyy21.Text == "")
                {
                    this.tbyy21.Text = "0";
                }
                if (this.textBox100.Text == "")
                {
                    this.textBox100.Text = "0";
                }
                var allnum2 = int.Parse(this.tbyy21.Text) + int.Parse(this.tbyy22.Text) + int.Parse(this.tbyy23.Text) + int.Parse(this.tbyy24.Text) + int.Parse(this.tbyy25.Text) + int.Parse(this.tbyy26.Text) + int.Parse(this.tbyy27.Text) + int.Parse(this.tbyy28.Text) + int.Parse(this.tbyy29.Text) + int.Parse(this.tbyy30sl.Text);
                var all1 = int.Parse(this.textBox100.Text) + int.Parse(this.tbxcsl2.Text);
                if (this.textBox100.Text != Convert.ToString(allnum2))
                {
                    MessageBox.Show("不合格总数错误", "提示");
                    return;
                }
                else if (Convert.ToString(all1) != this.tbsjsl2.Text)
                {
                    MessageBox.Show("数量与上接数量不符", "提示");
                    return;
                }
            //}
            //else if (yh.机构 == "测试")
            //{
                if (this.tbyy39sl.Text == "")
                {
                    this.tbyy39sl.Text = "0";
                }
                if (this.tbyy38.Text == "")
                {
                    this.tbyy38.Text = "0";
                }
                if (this.tbyy37.Text == "")
                {
                    this.tbyy37.Text = "0";
                }
                if (this.tbyy36.Text == "")
                {
                    this.tbyy36.Text = "0";
                }
                if (this.tbyy35.Text == "")
                {
                    this.tbyy35.Text = "0";
                }
                if (this.tbyy34.Text == "")
                {
                    this.tbyy34.Text = "0";
                }
                if (this.tbyy33.Text == "")
                {
                    this.tbyy33.Text = "0";
                }
                if (this.tbyy32.Text == "")
                {
                    this.tbyy32.Text = "0";
                }
                if (this.tbyy31.Text == "")
                {
                    this.tbyy31.Text = "0";
                }
                if (this.tbbhgsl2.Text == "")
                {
                    this.tbbhgsl2.Text = "0";
                }
                var allnum3 = int.Parse(this.tbyy31.Text) + int.Parse(this.tbyy32.Text) + int.Parse(this.tbyy33.Text) + int.Parse(this.tbyy34.Text) + int.Parse(this.tbyy35.Text) + int.Parse(this.tbyy36.Text) + int.Parse(this.tbyy37.Text) + int.Parse(this.tbyy38.Text) + int.Parse(this.tbyy39sl.Text);
                var all2 = int.Parse(this.tbbhgsl2.Text) + int.Parse(tbxcsl4.Text);
                if (this.tbbhgsl2.Text != Convert.ToString(allnum3))
                {
                    MessageBox.Show("不合格总数错误", "提示");
                    return;
                }
                else if (Convert.ToString(all2) != this.tbsjsl4.Text)
                {
                    MessageBox.Show("数量与上接数量不符", "提示");
                    return;
                }
            //}
            //else if (yh.机构 == "清洗")
            //{
                if (this.tbyy40.Text == "")
                {
                    this.tbyy40.Text = "0";
                }
                if (this.tbyy41sl.Text == "")
                {
                    this.tbyy41sl.Text = "0";
                }
                if (this.tbbhgsl3.Text == "")
                {
                    this.tbbhgsl3.Text = "0";
                }
                var allnum4 = int.Parse(this.tbyy40.Text) + int.Parse(this.tbyy41sl.Text);
                var all3 = int.Parse(this.tbbhgsl3.Text) + int.Parse(this.tbxcsl5.Text);
                if (this.tbbhgsl3.Text != Convert.ToString(allnum4))
                {
                    MessageBox.Show("不合格总数错误", "提示");
                    return;
                }
                else if (Convert.ToString(all3) != this.tbsjsl5.Text)
                {
                    MessageBox.Show("数量与上接数量不符", "提示");
                    return;
                }
            //}
            //else if (yh.机构 == "包装")
            //{

                if (this.tbyy42.Text == "")
                {
                    this.tbyy42.Text = "0";
                }
                if (this.tbyy43sl.Text == "")
                {
                    this.tbyy43sl.Text = "0";
                }
                if (this.tbbhgsl4.Text == "")
                {
                    this.tbbhgsl4.Text = "0";
                }
                var allnum5 = int.Parse(this.tbyy42.Text) + int.Parse(this.tbyy43sl.Text);
                var all4 =int.Parse(this.tbbhgsl4.Text)+ int.Parse(this.tbxcsl6.Text);
                if (this.tbbhgsl4.Text != Convert.ToString(allnum5))
                {
                    MessageBox.Show("不合格总数错误", "提示");
                    return;
                }
                else if (Convert.ToString(all4) != this.tbsjsl6.Text)
                {
                    MessageBox.Show("数量与上接数量不符", "提示");
                    return;
                }
            //}

            #endregion

            #region
            //if (yh.机构 == "全部")
            //{
                var time = this.dtpxcTime.Text;
                Match m1 = Regex.Match(dtpxcTime.Text, reg);
                Match m2 = Regex.Match(dtp1.Text, reg);
                Match m3 = Regex.Match(dtptime2.Text, reg);
                Match m4 = Regex.Match(dtpfrtime1.Text, regs);
                Match m5 = Regex.Match(dtpqcTime1.Text, regs);
                Match m6 = Regex.Match(dtpxtime3.Text, reg);
                Match m7 = Regex.Match(dtpxctime3.Text, reg);
                Match m8 = Regex.Match(dtpxctime4.Text, reg);
                if (m1.Success == false)
                {
                    MessageBox.Show("备料时间格式输入错误.如[2015-5-5]", "提示");
                    return;
                }
                else if (m2.Success == false)
                {
                    MessageBox.Show("LD耦合焊接时间格式输入错误.如[2015-5-5]", "提示");
                    return;
                }
                else if (m3.Success == false)
                {
                    MessageBox.Show("PT耦合固化时间格式输入错误.如[2015-5-5]", "提示");
                    return;
                }
                else if (m4.Success == false)
                {
                    MessageBox.Show("温循前时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                    return;
                }
                else if (m5.Success == false)
                {
                    MessageBox.Show("温循后时间格式输入错误.如[2015-5-5 00:00:00]", "提示");
                    return;
                }
                else if (m6.Success == false)
                {
                    MessageBox.Show("测试时间格式输入错误.如[2015-5-5]", "提示");
                    return;
                }
                else if (m7.Success == false)
                {
                    MessageBox.Show("清洗时间格式输入错误.如[2015-5-5]", "提示");
                    return;
                }
                else if (m8.Success == false)
                {
                    MessageBox.Show("包装时间格式输入错误.如[2015-5-5]", "提示");
                    return;
                }
                else
                {
                    BeiLiaoBind(bhd);
                    LDHanJieBind(bhd);
                    PTGuHuaBind(bhd);
                    WenXunQianBind(bhd);
                    WenXunHouBind(bhd);
                    CeShiBind(bhd);
                    QingXiBind(bhd);
                    BaoZhuangBind(bhd);
                }

            //}
            //else if (yh.机构 == "备料")
            //{
            //    var time = this.dtpxcTime.Text;
            //    Match m = Regex.Match(dtpxcTime.Text, reg);
            //    if (m.Success == false)
            //    {
            //        MessageBox.Show("备料时间格式输入错误.如[2015-5-5]", "提示");
            //        return;
            //    }
            //    else
            //    {
            //        BeiLiaoBind(bhd);
            //    }
            //}

            #endregion
            bhd.lsh1 = this.tbLSH1.Text;
            bhd.lsh2 = this.tbLSH2.Text;
            bhd.lsh3 = this.tbLSH3.Text;

            bhd.case1 = this.tbCASE1.Text;
            bhd.case2 = this.tbCASE2.Text;
            bhd.case3 = this.tbCASE3.Text;

            bhd.ld1 = this.tbLDP1.Text;
            bhd.ld2 = this.tbLDP2.Text;
            bhd.ld3 = this.tbLDP3.Text;

            bhd.pd1 = this.tbPDP1.Text;
            bhd.pd2 = this.tbPDP2.Text;
            bhd.pd3 = this.tbPDP3.Text;

            bhd.ldj1 = this.tbLDN1.Text;
            bhd.ldj2 = this.tbLDN2.Text;
            bhd.ldj3 = this.tbLDN3.Text;
            if (this.tbJC1.Text == "")
            {
                this.tbJC1.Text = "0";
            }
            if (this.tbJC2.Text == "")
            {
                this.tbJC2.Text = "0";
            }
            if (this.tbJC3.Text == "")
            {
                this.tbJC3.Text = "0";
            }
            bhd.jc1 = Convert.ToDecimal(this.tbJC1.Text);
            bhd.jc2 = Convert.ToDecimal(this.tbJC2.Text);
            bhd.jc3 = Convert.ToDecimal(this.tbJC3.Text);

            bhd.oxl1 = this.tbAXL1.Text;
            bhd.oxl2 = this.tbAXL2.Text;
            bhd.oxl3 = this.tbAXL3.Text;

            bhd.ldxp_xinpianjj = this.tbjj.Text;
            bhd.ldxp_jianyanry = this.tbjyry.Text;
            bhd.ldxp_jianyansb = this.tbjysb.Text;
            bhd.备注 = this.rtbremark.Text;
            bhd.LD_xh = this.textBox34.Text;
            bhd.LD_name = this.textBox35.Text;
            bhd.LD_sjdh = this.textBox36.Text;
            bhd.PT_xh = this.textBox39.Text;
            bhd.PT_name = this.textBox38.Text;
            bhd.PT_sjdh = this.textBox37.Text;
            bhd.KT_xh = this.textBox42.Text;
            bhd.KT_name = this.textBox41.Text;
            bhd.KT_sjdh = this.textBox40.Text;
            bhd.NBP_xh0 = this.textBox45.Text;
            bhd.NBP_name0 = this.textBox44.Text;
            bhd.NBP_sjdh0 = this.textBox43.Text;
            bhd.NBP_xh45 = this.textBox51.Text;
            bhd.NBP_name45 = this.textBox50.Text;
            bhd.NBP_sjdh45 = this.textBox49.Text;
            bhd.JK_xh = this.textBox48.Text;
            bhd.JK_name = this.textBox47.Text;
            bhd.JK_sjdh = this.textBox46.Text;
            bool result2 = false;
            result2 = txbll.Add(bhd);
            if (result2 == true)
            {
                MessageBox.Show("添加数据成功", "提示");
                this.btnSend.Enabled = false;
                this.btnSend.BackColor = Color.LightGray;
                this.btnOk.Enabled = false;
                this.btnOk.BackColor = Color.LightGray;
            }
            else
            {
                MessageBox.Show("添加数据失败", "提示");
            }
        }
Beispiel #12
0
        private void tbczy3_MouseUp(object sender, MouseEventArgs e)
        {
            tsuhan_sg_tx bhd = new tsuhan_sg_tx();
            string name = frmOne.txtUserName.Text;
            tsuhan_scgl_yh yh = yhbll.GetModel(name);
            //if (yh.工序名称 == "全部")
            //{
                if (this.tabControl1.SelectedTab == tabPage1)
                {
                    #region 备料
                    bhd.bl_czy3 = this.tbczy3.Text;
                    bool result3;
                    result3 = yhbll.Exist(this.tbczy3.Text);

                    if (this.tbczy3.Text == "")
                    {
                        this.tbczy3.Text = "0";
                    }
                    else if (result3 != true)
                    {
                        //rg.ShowDialog();
                        this.tbczName3.Text = "";
                        return;
                    }
                    else
                    {
                        var yh3 = yhbll.GetModel(this.tbczy3.Text);
                        this.tbczName3.Text = yh3.姓名;
                        bhd.bl_czyname3 = this.tbczName3.Text;

                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage2)
                {
                    #region LD耦合焊接
                    bhd.LD_czy3 = this.tbcz3.Text;
                    bool result3;
                    result3 = yhbll.Exist(this.tbcz3.Text);

                    if (this.tbcz3.Text == "")
                    {
                        this.tbcz3.Text = "0";
                    }
                    else if (result3 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname3.Text = "";
                        return;
                    }
                    else
                    {
                        var yh3 = yhbll.GetModel(this.tbcz3.Text);
                        this.tbname3.Text = yh3.姓名;
                        bhd.LD_czyname2 = this.tbname2.Text;

                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage3)
                {
                    #region PT耦合固化
                    bhd.PT_czy3 = this.tbcz7.Text;
                    bool result3;
                    result3 = yhbll.Exist(this.tbcz7.Text);

                    if (this.tbcz7.Text == "")
                    {
                        this.tbcz7.Text = "0";
                    }
                    else if (result3 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname7.Text = "";
                        return;
                    }
                    else
                    {
                        var yh3 = yhbll.GetModel(this.tbcz7.Text);
                        this.tbname7.Text = yh3.姓名;
                        bhd.PT_czyname3 = this.tbname7.Text;

                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage6)
                {
                    #region 测试
                    bhd.CS_czy3 = this.tbcz13.Text;
                    bool result3;
                    result3 = yhbll.Exist(this.tbcz13.Text);

                    if (this.tbcz13.Text == "")
                    {
                        this.tbcz13.Text = "0";
                    }
                    else if (result3 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname13.Text = "";
                        return;
                    }
                    else
                    {
                        var yh3 = yhbll.GetModel(this.tbcz13.Text);
                        this.tbname13.Text = yh3.姓名;
                        bhd.CS_czyname3 = this.tbname13.Text;
                    }

                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage7)
                {
                    #region 清洗
                    bhd.QX_czy3 = this.tbcz17.Text;
                    bool result3;
                    result3 = yhbll.Exist(this.tbcz17.Text);

                    if (this.tbcz17.Text == "")
                    {
                        this.tbcz17.Text = "0";
                    }
                    else if (result3 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname17.Text = "";
                        return;
                    }
                    else
                    {
                        var yh3 = yhbll.GetModel(this.tbcz17.Text);
                        this.tbname17.Text = yh3.姓名;
                        bhd.QX_czyname3 = this.tbname17.Text;
                    }
                    #endregion
                }
                else if (this.tabControl1.SelectedTab == tabPage8)
                {
                    #region 包装
                    bhd.BZ_czy2 = this.tbcz21.Text;
                    bool result2;
                    result2 = yhbll.Exist(this.tbcz21.Text);

                    if (this.tbcz21.Text == "")
                    {
                        this.tbcz21.Text = "0";
                    }
                    else if (result2 != true)
                    {
                        //rg.ShowDialog();
                        this.tbname21.Text = "";
                        return;
                    }
                    else
                    {
                        var yh2 = yhbll.GetModel(this.tbcz21.Text);
                        this.tbname21.Text = yh2.姓名;
                        bhd.BZ_czyname2 = this.tbname21.Text;
                    }
                    #endregion
                }
            //}
            //if (yh.工序名称 == "备料")
            //{
            //    #region 备料
            //    bhd.bl_czy3 = this.tbczy3.Text;
            //    bool result3;
            //    result3 = yhbll.Exist(this.tbczy3.Text);

            //    if (this.tbczy3.Text == "")
            //    {
            //        this.tbczy3.Text = "0";
            //    }
            //    else if (result3 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbczName3.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh3 = yhbll.GetModel(this.tbczy3.Text);
            //        this.tbczName3.Text = yh3.姓名;
            //        bhd.bl_czyname3 = this.tbczName3.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.工序名称 == "LD耦合焊接")
            //{
            //    #region LD耦合焊接
            //    bhd.LD_czy3 = this.tbcz3.Text;
            //    bool result3;
            //    result3 = yhbll.Exist(this.tbcz3.Text);

            //    if (this.tbcz3.Text == "")
            //    {
            //        this.tbcz3.Text = "0";
            //    }
            //    else if (result3 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname3.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh3 = yhbll.GetModel(this.tbcz3.Text);
            //        this.tbname3.Text = yh3.姓名;
            //        bhd.LD_czyname3 = this.tbname3.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.工序名称 == "PT耦合固化")
            //{
            //    #region PT耦合固化
            //    bhd.PT_czy3 = this.tbcz7.Text;
            //    bool result3;
            //    result3 = yhbll.Exist(this.tbcz7.Text);

            //    if (this.tbcz7.Text == "")
            //    {
            //        this.tbcz7.Text = "0";
            //    }
            //    else if (result3 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname7.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh3 = yhbll.GetModel(this.tbcz7.Text);
            //        this.tbname7.Text = yh3.姓名;
            //        bhd.PT_czyname3 = this.tbname7.Text;

            //    }
            //    #endregion
            //}
            //else if (yh.工序名称 == "测试")
            //{
            //    #region 测试
            //    bhd.CS_czy3 = this.tbcz13.Text;
            //    bool result3;
            //    result3 = yhbll.Exist(this.tbcz13.Text);

            //    if (this.tbcz13.Text == "")
            //    {
            //        this.tbcz13.Text = "0";
            //    }
            //    else if (result3 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname13.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh3 = yhbll.GetModel(this.tbcz13.Text);
            //        this.tbname13.Text = yh3.姓名;
            //        bhd.CS_czyname3 = this.tbname13.Text;
            //    }

            //    #endregion
            //}
            //else if (yh.工序名称 == "清洗")
            //{
            //    #region 清洗
            //    bhd.QX_czy3 = this.tbcz17.Text;
            //    bool result3;
            //    result3 = yhbll.Exist(this.tbcz17.Text);

            //    if (this.tbcz17.Text == "")
            //    {
            //        this.tbcz17.Text = "0";
            //    }
            //    else if (result3 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname17.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh3 = yhbll.GetModel(this.tbcz17.Text);
            //        this.tbname17.Text = yh3.姓名;
            //        bhd.QX_czyname3 = this.tbname17.Text;
            //    }
            //    #endregion
            //}
            //else if (yh.工序名称 == "包装")
            //{
            //    #region 包装
            //    bhd.BZ_czy3 = this.tbcz21.Text;
            //    bool result3;
            //    result3 = yhbll.Exist(this.tbcz21.Text);

            //    if (this.tbcz21.Text == "")
            //    {
            //        this.tbcz21.Text = "0";
            //    }
            //    else if (result3 != true)
            //    {
            //        rg.ShowDialog();
            //        this.tbname21.Text = "";
            //        return;
            //    }
            //    else
            //    {
            //        var yh3 = yhbll.GetModel(this.tbcz21.Text);
            //        this.tbname21.Text = yh3.姓名;
            //        bhd.BZ_czyname3 = this.tbname21.Text;
            //    }

            //    #endregion

            //}
        }
Beispiel #13
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="bhd"></param>
 /// <returns></returns>
 public bool Update(tsuhan_sg_tx bhd)
 {
     return dal.Update(bhd);
 }
Beispiel #14
0
 /// <summary>
 /// 温循后
 /// </summary>
 /// <param name="bhd"></param>
 private void WenXunHouBind(tsuhan_sg_tx bhd)
 {
     #region 温循后
     bhd.WXH_sbbh = this.tb10.Text;
     if (this.tbqcsl1.Text == "")
     {
         this.tbqcsl1.Text = "0";
     }
     bhd.WXH_qcsl = Convert.ToInt32(this.tbqcsl1.Text);
     if (this.tbxcsl3.Text == "")
     {
         this.tbxcsl3.Text = "0";
     }
     bhd.WXH_xcsl = Convert.ToInt32(this.tbxcsl3.Text);
     if (this.dtpqcTime1.Text == "")
     {
         this.dtpqcTime1.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
     }
     bhd.WXH_xctime = Convert.ToDateTime(this.dtpqcTime1.Text);
     bhd.WXH_wxsc = this.tbwxsc.Text;
     bhd.WXH_czy = this.tbcz10.Text;
     bhd.WXH_czyname = this.tbname10.Text;
     bhd.WX_Hlry = this.tblr4.Text;
     bhd.WXH_lryname = this.tblrname4.Text;
     bhd.WXH_remark = this.rtbremark3.Text;
     #endregion
 }
Beispiel #15
0
        /// <summary>
        /// PT耦合固化
        /// </summary>
        /// <param name="bhd"></param>
        private void PTGuHuaBind(tsuhan_sg_tx bhd)
        {
            #region PT耦合固化
            bhd.PT_sbbh1 = this.tb5.Text;
            bhd.PT_sbbh2 = this.tb6.Text;
            bhd.PT_sbbh3 = this.tb7.Text;
            bhd.PT_sbbh4 = this.tb8.Text;
            if (this.tbsjsl2.Text == "")
            {
                this.tbsjsl2.Text = "0";
            }
            bhd.PT_sjsl = Convert.ToInt32(this.tbsjsl2.Text);
            if (this.tbxcsl2.Text == "")
            {
                this.tbxcsl2.Text = "0";
            }
            bhd.PT_xcsl = Convert.ToInt32(this.tbxcsl2.Text);
            if (this.dtptime2.Text == "")
            {
                this.dtptime2.Text = DateTime.Now.ToString("yyyy-MM-dd");
            }
            bhd.PT_xctime = Convert.ToDateTime(this.dtptime2.Text);
            bhd.PT_czy1 = this.tbcz5.Text;
            bhd.PT_czy2 = this.tbcz6.Text;
            bhd.PT_czy3 = this.tbcz7.Text;
            bhd.PT_czy4 = this.tbcz8.Text;
            bhd.PT_czyname1 = this.tbname5.Text;
            bhd.PT_czyname2 = this.tbname6.Text;
            bhd.PT_czyname3 = this.tbname7.Text;
            bhd.PT_czyname4 = this.tbname8.Text;
            bhd.PT_lry = this.tblr2.Text;
            bhd.PT_lryname = this.tblrname2.Text;
            if (this.tbyy21.Text == "")
            {
                this.tbyy21.Text = "0";
            }
            bhd.ptng1 = Convert.ToInt32(this.tbyy21.Text);
            if (this.tbyy22.Text == "")
            {
                this.tbyy22.Text = "0";
            }
            bhd.ptng2 = Convert.ToInt32(this.tbyy22.Text);
            if (this.tbyy23.Text == "")
            {
                this.tbyy23.Text = "0";
            }
            bhd.ptng3 = Convert.ToInt32(this.tbyy23.Text);
            if (this.tbyy24.Text == "")
            {
                this.tbyy24.Text = "0";
            }
            bhd.ptng4 = Convert.ToInt32(this.tbyy24.Text);
            if (this.tbyy25.Text == "")
            {
                this.tbyy25.Text = "0";
            }
            bhd.ptng5 = Convert.ToInt32(this.tbyy25.Text);
            if (this.tbyy26.Text == "")
            {
                this.tbyy26.Text = "0";
            }
            bhd.ptng6 = Convert.ToInt32(this.tbyy26.Text);
            if (this.tbyy27.Text == "")
            {
                this.tbyy27.Text = "0";
            }
            bhd.ptng7 = Convert.ToInt32(this.tbyy27.Text);
            if (this.tbyy28.Text == "")
            {
                this.tbyy28.Text = "0";
            }
            bhd.ptng8 = Convert.ToInt32(this.tbyy28.Text);
            if (this.tbyy29.Text == "")
            {
                this.tbyy29.Text = "0";
            }
            bhd.ptng9 = Convert.ToInt32(this.tbyy29.Text);
            bhd.ptngoth = this.tbyy30.Text;
            if (this.tbyy30sl.Text == "")
            {
                this.tbyy30sl.Text = "0";
            }
            bhd.ptngothnum = Convert.ToInt32(this.tbyy30sl.Text);
            if (this.textBox100.Text == "")
            {
                this.textBox100.Text = "0";
            }
            bhd.PT_bhgallsl = Convert.ToInt32(this.textBox100.Text);

            #endregion
        }
Beispiel #16
0
 /// <summary>
 /// 温循前
 /// </summary>
 /// <param name="bhd"></param>
 private void WenXunQianBind(tsuhan_sg_tx bhd)
 {
     #region 温循前
     bhd.WXQ_sbbh = this.tb9.Text;
     if (this.tbsjsl3.Text == "")
     {
         this.tbsjsl3.Text = "0";
     }
     bhd.WXQ_sjsl = Convert.ToInt32(this.tbsjsl3.Text);
     if (this.tbfrsl1.Text == "")
     {
         this.tbfrsl1.Text = "0";
     }
     bhd.WXQ_frsl = Convert.ToInt32(this.tbfrsl1.Text);
     if (this.dtpfrtime1.Text == "" || this.dtpfrtime1.Text == string.Empty)
     {
         this.dtpfrtime1.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
     }
     bhd.WXQ_xctime = Convert.ToDateTime(this.dtpfrtime1.Text);
     bhd.WXQ_czy = this.tbcz9.Text;
     bhd.WXQ_czyname = this.tbname9.Text;
     bhd.WXQ_lry = this.tblr3.Text;
     bhd.WXQ_lryname = this.tblrname3.Text;
     bhd.WXQ_remark = this.rtbremark2.Text;
     #endregion
 }
Beispiel #17
0
        /// <summary>
        /// 清洗
        /// </summary>
        /// <param name="bhd"></param>
        private void QingXiBind(tsuhan_sg_tx bhd)
        {
            #region 清洗
            bhd.QX_sbbh1 = this.tb15.Text;
            bhd.QX_sbbh2 = this.tb16.Text;
            bhd.QX_sbbh3 = this.tb17.Text;
            bhd.QX_sbbh4 = this.tb18.Text;
            if (this.tbsjsl5.Text == "")
            {
                this.tbsjsl5.Text = "0";
            }
            bhd.QX_sjsl = Convert.ToInt32(this.tbsjsl5.Text);
            if (this.tbxcsl5.Text == "")
            {
                this.tbxcsl5.Text = "0";
            }
            bhd.QX_xcsl = Convert.ToInt32(this.tbxcsl5.Text);
            if (this.dtpxctime3.Text == "")
            {
                this.dtpxctime3.Text = DateTime.Now.ToString("yyyy-MM-dd");
            }
            bhd.QX_xctime = Convert.ToDateTime(this.dtpxctime3.Text);
            bhd.QX_czy1 = this.tbcz15.Text;
            bhd.QX_czy2 = this.tbcz16.Text;
            bhd.QX_czy3 = this.tbcz17.Text;
            bhd.QX_czy4 = this.tbcz18.Text;
            bhd.QX_czyname1 = this.tbname15.Text;
            bhd.QX_czyname2 = this.tbname16.Text;
            bhd.QX_czyname3 = this.tbname17.Text;
            bhd.QX_czyname4 = this.tbname18.Text;
            bhd.QX_lry = this.tblr6.Text;
            bhd.QX_lryname = this.tblrname6.Text;
            if (this.tbyy40.Text == "")
            {
                this.tbyy40.Text = "0";
            }
            bhd.qxng1 = Convert.ToInt32(this.tbyy40.Text);
            bhd.qxngoth = this.rtbyy41.Text;
            if (this.tbyy41sl.Text == "")
            {
                this.tbyy41sl.Text = "0";
            }
            bhd.qxngothnum = Convert.ToInt32(this.tbyy41sl.Text);
            if (this.tbbhgsl3.Text == "")
            {
                this.tbbhgsl3.Text = "0";
            }
            bhd.QX_bhgallsl = Convert.ToInt32(this.tbbhgsl3.Text);

            #endregion
        }
Beispiel #18
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="bhd"></param>
 /// <returns></returns>
 public bool Update(tsuhan_sg_tx bhd)
 {
     return(dal.Update(bhd));
 }
Beispiel #19
0
        /// <summary>
        /// 新增随工单
        /// </summary>
        /// <param name="bhd"></param>
        /// <returns></returns>
        public bool Add(tsuhan_sg_tx model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into tsuhan_sg_tx(");
            strSql.Append("随工单号,备料,bl_sbbh1,bl_sbbh2,bl_sbbh3,bl_sbbh4,bl_xcsl,bl_xctime,bl_czy1,bl_czy2,bl_czy3,bl_czy4,bl_czyname1,bl_czyname2,bl_czyname3,bl_czyname4,bl_lry,bl_lryname,bl_bhgallsl,blng1,blng2,blng3,blng4,blng5,blng6,blng7,blng8,blng9,blngoth,blngothnum,LD焊接,LD_sbbh1,LD_sbbh2,LD_sbbh3,LD_sbbh4,LD_sjsl,LD_xcsl,LD_xctime,LD_czy1,LD_czy2,LD_czy3,LD_czy4,LD_czyname1,LD_czyname2,LD_czyname3,LD_czyname4,LD_lry,LD_lryname,LD_bhgallsl,LD_jzsl,ldng1,ldng2,ldng3,ldng4,ldng5,ldng6,ldng7,ldng8,ldng9,ldngoth,ldngothnum,PT耦合固化,PT_sbbh1,PT_sbbh2,PT_sbbh3,PT_sbbh4,PT_sjsl,PT_xcsl,PT_xctime,PT_czy1,PT_czy2,PT_czy3,PT_czy4,PT_czyname1,PT_czyname2,PT_czyname3,PT_czyname4,PT_lry,PT_lryname,PT_bhgallsl,PT_bhgyy,ptng1,ptng2,ptng3,ptng4,ptng5,ptng6,ptng7,ptng8,ptng9,ptngoth,ptngothnum,温循前,WXQ_sbbh,WXQ_sjsl,WXQ_frsl,WXQ_xctime,WXQ_czy,WXQ_czyname,WXQ_lry,WXQ_lryname,WXQ_remark,温循后,WXH_sbbh,WXH_qcsl,WXH_xcsl,WXH_wxsc,WXH_xctime,WXH_czy,WXH_czyname,WX_Hlry,WXH_lryname,WXH_remark,测试,CS_sbbh1,CS_sbbh2,CS_sbbh3,CS_sbbh4,CS_sjsl,CS_xcsl,CS_xctime,CS_czy1,CS_czy2,CS_czy3,CS_czy4,CS_czyname1,CS_czyname2,CS_czyname3,CS_czyname4,CS_lry,CS_lryname,CS_bhgallsl,csng1,csng2,csng3,csng4,csng5,csng6,csng7,csng8,csng9,csngoth,csngothnum,清洗,QX_sbbh1,QX_sbbh2,QX_sbbh3,QX_sbbh4,QX_sjsl,QX_xcsl,QX_xctime,QX_czy1,QX_czy2,QX_czy3,QX_czy4,QX_czyname1,QX_czyname2,QX_czyname3,QX_czyname4,QX_lry,QX_lryname,QX_bhgallsl,qxng1,qxngoth,qxngothnum,包装,BZ_sbbh1,BZ_sbbh2,BZ_sbbh3,BZ_sbbh4,BZ_sjsl,BZ_xcsl,BZ_xctime,BZ_czy1,BZ_czy2,BZ_czy3,BZ_czy4,BZ_czyname1,BZ_czyname2,BZ_czyname3,BZ_czyname4,BZ_lry,BZ_lryname,BZ_bhgallsl,bzng1,bzngoth,bzngothnum,gcsj_liushuih,lsh1,lsh2,lsh3,gcsj_CASE,case1,case2,case3,gcsj_LDjia,ld1,ld2,ld3,gcsj_PDjia,pd1,pd2,pd3,gcsj_LDjian,ldj1,ldj2,ldj3,gcsj_jicha,jc1,jc2,jc3,gcsj_yatou,yt1,yt2,yt3,gcsj_oxianliang,oxl1,oxl2,oxl3,ldxp_xinpianjj,ldxp_jianyanry,ldxp_jianyansb,bggSum,备注,LD_lx,LD_xh,LD_name,LD_sjdh,LD_remark,PT_lx,PT_xh,PT_name,PT_sjdh,PT_remark,KT_lx,KT_xh,KT_name,KT_sjdh,KT_remark,NBP_lx0,NBP_xh0,NBP_name0,NBP_sjdh0,NBP_remark0,NBP_lx45,NBP_xh45,NBP_name45,NBP_sjdh45,NBP_remark45,JK_lx,JK_xh,JK_name,JK_sjdh,JK_remark)");
            strSql.Append(" values (");
            strSql.Append("@随工单号,@备料,@bl_sbbh1,@bl_sbbh2,@bl_sbbh3,@bl_sbbh4,@bl_xcsl,@bl_xctime,@bl_czy1,@bl_czy2,@bl_czy3,@bl_czy4,@bl_czyname1,@bl_czyname2,@bl_czyname3,@bl_czyname4,@bl_lry,@bl_lryname,@bl_bhgallsl,@blng1,@blng2,@blng3,@blng4,@blng5,@blng6,@blng7,@blng8,@blng9,@blngoth,@blngothnum,@LD焊接,@LD_sbbh1,@LD_sbbh2,@LD_sbbh3,@LD_sbbh4,@LD_sjsl,@LD_xcsl,@LD_xctime,@LD_czy1,@LD_czy2,@LD_czy3,@LD_czy4,@LD_czyname1,@LD_czyname2,@LD_czyname3,@LD_czyname4,@LD_lry,@LD_lryname,@LD_bhgallsl,@LD_jzsl,@ldng1,@ldng2,@ldng3,@ldng4,@ldng5,@ldng6,@ldng7,@ldng8,@ldng9,@ldngoth,@ldngothnum,@PT耦合固化,@PT_sbbh1,@PT_sbbh2,@PT_sbbh3,@PT_sbbh4,@PT_sjsl,@PT_xcsl,@PT_xctime,@PT_czy1,@PT_czy2,@PT_czy3,@PT_czy4,@PT_czyname1,@PT_czyname2,@PT_czyname3,@PT_czyname4,@PT_lry,@PT_lryname,@PT_bhgallsl,@PT_bhgyy,@ptng1,@ptng2,@ptng3,@ptng4,@ptng5,@ptng6,@ptng7,@ptng8,@ptng9,@ptngoth,@ptngothnum,@温循前,@WXQ_sbbh,@WXQ_sjsl,@WXQ_frsl,@WXQ_xctime,@WXQ_czy,@WXQ_czyname,@WXQ_lry,@WXQ_lryname,@WXQ_remark,@温循后,@WXH_sbbh,@WXH_qcsl,@WXH_xcsl,@WXH_wxsc,@WXH_xctime,@WXH_czy,@WXH_czyname,@WX_Hlry,@WXH_lryname,@WXH_remark,@测试,@CS_sbbh1,@CS_sbbh2,@CS_sbbh3,@CS_sbbh4,@CS_sjsl,@CS_xcsl,@CS_xctime,@CS_czy1,@CS_czy2,@CS_czy3,@CS_czy4,@CS_czyname1,@CS_czyname2,@CS_czyname3,@CS_czyname4,@CS_lry,@CS_lryname,@CS_bhgallsl,@csng1,@csng2,@csng3,@csng4,@csng5,@csng6,@csng7,@csng8,@csng9,@csngoth,@csngothnum,@清洗,@QX_sbbh1,@QX_sbbh2,@QX_sbbh3,@QX_sbbh4,@QX_sjsl,@QX_xcsl,@QX_xctime,@QX_czy1,@QX_czy2,@QX_czy3,@QX_czy4,@QX_czyname1,@QX_czyname2,@QX_czyname3,@QX_czyname4,@QX_lry,@QX_lryname,@QX_bhgallsl,@qxng1,@qxngoth,@qxngothnum,@包装,@BZ_sbbh1,@BZ_sbbh2,@BZ_sbbh3,@BZ_sbbh4,@BZ_sjsl,@BZ_xcsl,@BZ_xctime,@BZ_czy1,@BZ_czy2,@BZ_czy3,@BZ_czy4,@BZ_czyname1,@BZ_czyname2,@BZ_czyname3,@BZ_czyname4,@BZ_lry,@BZ_lryname,@BZ_bhgallsl,@bzng1,@bzngoth,@bzngothnum,@gcsj_liushuih,@lsh1,@lsh2,@lsh3,@gcsj_CASE,@case1,@case2,@case3,@gcsj_LDjia,@ld1,@ld2,@ld3,@gcsj_PDjia,@pd1,@pd2,@pd3,@gcsj_LDjian,@ldj1,@ldj2,@ldj3,@gcsj_jicha,@jc1,@jc2,@jc3,@gcsj_yatou,@yt1,@yt2,@yt3,@gcsj_oxianliang,@oxl1,@oxl2,@oxl3,@ldxp_xinpianjj,@ldxp_jianyanry,@ldxp_jianyansb,@bggSum,@备注,@LD_lx,@LD_xh,@LD_name,@LD_sjdh,@LD_remark,@PT_lx,@PT_xh,@PT_name,@PT_sjdh,@PT_remark,@KT_lx,@KT_xh,@KT_name,@KT_sjdh,@KT_remark,@NBP_lx0,@NBP_xh0,@NBP_name0,@NBP_sjdh0,@NBP_remark0,@NBP_lx45,@NBP_xh45,@NBP_name45,@NBP_sjdh45,@NBP_remark45,@JK_lx,@JK_xh,@JK_name,@JK_sjdh,@JK_remark)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@随工单号", SqlDbType.NVarChar,20),
                    new SqlParameter("@备料", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_sbbh1", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_sbbh2", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_sbbh3", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_sbbh4", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@bl_xctime", SqlDbType.DateTime),
                    new SqlParameter("@bl_czy1", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_czy2", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_czy3", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_czy4", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_czyname1", SqlDbType.NVarChar,20),
                    new SqlParameter("@bl_czyname2", SqlDbType.NVarChar,20),
                    new SqlParameter("@bl_czyname3", SqlDbType.NVarChar,20),
                    new SqlParameter("@bl_czyname4", SqlDbType.NVarChar,20),
                    new SqlParameter("@bl_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@bl_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@bl_bhgallsl", SqlDbType.Int,4),
                    new SqlParameter("@blng1", SqlDbType.Int,4),
                    new SqlParameter("@blng2", SqlDbType.Int,4),
                    new SqlParameter("@blng3", SqlDbType.Int,4),
                    new SqlParameter("@blng4", SqlDbType.Int,4),
                    new SqlParameter("@blng5", SqlDbType.Int,4),
                    new SqlParameter("@blng6", SqlDbType.Int,4),
                    new SqlParameter("@blng7", SqlDbType.Int,4),
                    new SqlParameter("@blng8", SqlDbType.Int,4),
                    new SqlParameter("@blng9", SqlDbType.Int,4),
                    new SqlParameter("@blngoth", SqlDbType.VarChar,50),
                    new SqlParameter("@blngothnum", SqlDbType.Int,4),
                    new SqlParameter("@LD焊接", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_sbbh1", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_sbbh2", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_sbbh3", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_sbbh4", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_sjsl", SqlDbType.Int,4),
                    new SqlParameter("@LD_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@LD_xctime", SqlDbType.DateTime),
                    new SqlParameter("@LD_czy1", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_czy2", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_czy3", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_czy4", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_czyname1", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_czyname2", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_czyname3", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_czyname4", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@LD_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_bhgallsl", SqlDbType.Int,4),
                    new SqlParameter("@LD_jzsl", SqlDbType.Int,4),
                    new SqlParameter("@ldng1", SqlDbType.Int,4),
                    new SqlParameter("@ldng2", SqlDbType.Int,4),
                    new SqlParameter("@ldng3", SqlDbType.Int,4),
                    new SqlParameter("@ldng4", SqlDbType.Int,4),
                    new SqlParameter("@ldng5", SqlDbType.Int,4),
                    new SqlParameter("@ldng6", SqlDbType.Int,4),
                    new SqlParameter("@ldng7", SqlDbType.Int,4),
                    new SqlParameter("@ldng8", SqlDbType.Int,4),
                    new SqlParameter("@ldng9", SqlDbType.Int,4),
                    new SqlParameter("@ldngoth", SqlDbType.VarChar,30),
                    new SqlParameter("@ldngothnum", SqlDbType.Int,4),
                    new SqlParameter("@PT耦合固化", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_sbbh1", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_sbbh2", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_sbbh3", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_sbbh4", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_sjsl", SqlDbType.Int,4),
                    new SqlParameter("@PT_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@PT_xctime", SqlDbType.DateTime),
                    new SqlParameter("@PT_czy1", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_czy2", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_czy3", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_czy4", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_czyname1", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_czyname2", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_czyname3", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_czyname4", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@PT_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_bhgallsl", SqlDbType.Int,4),
                    new SqlParameter("@PT_bhgyy", SqlDbType.NVarChar,200),
                    new SqlParameter("@ptng1", SqlDbType.Int,4),
                    new SqlParameter("@ptng2", SqlDbType.Int,4),
                    new SqlParameter("@ptng3", SqlDbType.Int,4),
                    new SqlParameter("@ptng4", SqlDbType.Int,4),
                    new SqlParameter("@ptng5", SqlDbType.Int,4),
                    new SqlParameter("@ptng6", SqlDbType.Int,4),
                    new SqlParameter("@ptng7", SqlDbType.Int,4),
                    new SqlParameter("@ptng8", SqlDbType.Int,4),
                    new SqlParameter("@ptng9", SqlDbType.Int,4),
                    new SqlParameter("@ptngoth", SqlDbType.VarChar,30),
                    new SqlParameter("@ptngothnum", SqlDbType.Int,4),
                    new SqlParameter("@温循前", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXQ_sbbh", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXQ_sjsl", SqlDbType.Int,4),
                    new SqlParameter("@WXQ_frsl", SqlDbType.Int,4),
                    new SqlParameter("@WXQ_xctime", SqlDbType.DateTime),
                    new SqlParameter("@WXQ_czy", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXQ_czyname", SqlDbType.NVarChar,20),
                    new SqlParameter("@WXQ_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXQ_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@WXQ_remark", SqlDbType.NVarChar,50),
                    new SqlParameter("@温循后", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXH_sbbh", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXH_qcsl", SqlDbType.Int,4),
                    new SqlParameter("@WXH_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@WXH_wxsc", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXH_xctime", SqlDbType.DateTime),
                    new SqlParameter("@WXH_czy", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXH_czyname", SqlDbType.NVarChar,20),
                    new SqlParameter("@WX_Hlry", SqlDbType.NVarChar,10),
                    new SqlParameter("@WXH_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@WXH_remark", SqlDbType.NVarChar,50),
                    new SqlParameter("@测试", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_sbbh1", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_sbbh2", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_sbbh3", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_sbbh4", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_sjsl", SqlDbType.Int,4),
                    new SqlParameter("@CS_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@CS_xctime", SqlDbType.DateTime),
                    new SqlParameter("@CS_czy1", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_czy2", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_czy3", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_czy4", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_czyname1", SqlDbType.NVarChar,20),
                    new SqlParameter("@CS_czyname2", SqlDbType.NVarChar,20),
                    new SqlParameter("@CS_czyname3", SqlDbType.NVarChar,20),
                    new SqlParameter("@CS_czyname4", SqlDbType.NVarChar,20),
                    new SqlParameter("@CS_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@CS_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@CS_bhgallsl", SqlDbType.Int,4),
                    new SqlParameter("@csng1", SqlDbType.Int,4),
                    new SqlParameter("@csng2", SqlDbType.Int,4),
                    new SqlParameter("@csng3", SqlDbType.Int,4),
                    new SqlParameter("@csng4", SqlDbType.Int,4),
                    new SqlParameter("@csng5", SqlDbType.Int,4),
                    new SqlParameter("@csng6", SqlDbType.Int,4),
                    new SqlParameter("@csng7", SqlDbType.Int,4),
                    new SqlParameter("@csng8", SqlDbType.Int,4),
                    new SqlParameter("@csng9", SqlDbType.Int,4),
                    new SqlParameter("@csngoth", SqlDbType.VarChar,30),
                    new SqlParameter("@csngothnum", SqlDbType.Int,4),
                    new SqlParameter("@清洗", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_sbbh1", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_sbbh2", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_sbbh3", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_sbbh4", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_sjsl", SqlDbType.Int,4),
                    new SqlParameter("@QX_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@QX_xctime", SqlDbType.DateTime),
                    new SqlParameter("@QX_czy1", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_czy2", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_czy3", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_czy4", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_czyname1", SqlDbType.NVarChar,20),
                    new SqlParameter("@QX_czyname2", SqlDbType.NVarChar,20),
                    new SqlParameter("@QX_czyname3", SqlDbType.NVarChar,20),
                    new SqlParameter("@QX_czyname4", SqlDbType.NVarChar,20),
                    new SqlParameter("@QX_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@QX_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@QX_bhgallsl", SqlDbType.Int,4),
                    new SqlParameter("@qxng1", SqlDbType.Int,4),
                    new SqlParameter("@qxngoth", SqlDbType.VarChar,30),
                    new SqlParameter("@qxngothnum", SqlDbType.Int,4),
                    new SqlParameter("@包装", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_sbbh1", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_sbbh2", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_sbbh3", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_sbbh4", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_sjsl", SqlDbType.Int,4),
                    new SqlParameter("@BZ_xcsl", SqlDbType.Int,4),
                    new SqlParameter("@BZ_xctime", SqlDbType.DateTime),
                    new SqlParameter("@BZ_czy1", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_czy2", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_czy3", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_czy4", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_czyname1", SqlDbType.NVarChar,20),
                    new SqlParameter("@BZ_czyname2", SqlDbType.NVarChar,20),
                    new SqlParameter("@BZ_czyname3", SqlDbType.NVarChar,20),
                    new SqlParameter("@BZ_czyname4", SqlDbType.NVarChar,20),
                    new SqlParameter("@BZ_lry", SqlDbType.NVarChar,10),
                    new SqlParameter("@BZ_lryname", SqlDbType.NVarChar,20),
                    new SqlParameter("@BZ_bhgallsl", SqlDbType.Int,4),
                    new SqlParameter("@bzng1", SqlDbType.Int,4),
                    new SqlParameter("@bzngoth", SqlDbType.VarChar,30),
                    new SqlParameter("@bzngothnum", SqlDbType.Int,4),
                    new SqlParameter("@gcsj_liushuih", SqlDbType.NVarChar,10),
                    new SqlParameter("@lsh1", SqlDbType.NVarChar,20),
                    new SqlParameter("@lsh2", SqlDbType.NVarChar,20),
                    new SqlParameter("@lsh3", SqlDbType.NVarChar,20),
                    new SqlParameter("@gcsj_CASE", SqlDbType.NVarChar,10),
                    new SqlParameter("@case1", SqlDbType.NVarChar,20),
                    new SqlParameter("@case2", SqlDbType.NVarChar,20),
                    new SqlParameter("@case3", SqlDbType.NVarChar,20),
                    new SqlParameter("@gcsj_LDjia", SqlDbType.NVarChar,10),
                    new SqlParameter("@ld1", SqlDbType.NVarChar,20),
                    new SqlParameter("@ld2", SqlDbType.NVarChar,20),
                    new SqlParameter("@ld3", SqlDbType.NVarChar,20),
                    new SqlParameter("@gcsj_PDjia", SqlDbType.NVarChar,10),
                    new SqlParameter("@pd1", SqlDbType.NVarChar,20),
                    new SqlParameter("@pd2", SqlDbType.NVarChar,20),
                    new SqlParameter("@pd3", SqlDbType.NVarChar,20),
                    new SqlParameter("@gcsj_LDjian", SqlDbType.NVarChar,10),
                    new SqlParameter("@ldj1", SqlDbType.NVarChar,20),
                    new SqlParameter("@ldj2", SqlDbType.NVarChar,20),
                    new SqlParameter("@ldj3", SqlDbType.NVarChar,20),
                    new SqlParameter("@gcsj_jicha", SqlDbType.NVarChar,10),
                    new SqlParameter("@jc1", SqlDbType.Float,8),
                    new SqlParameter("@jc2", SqlDbType.Float,8),
                    new SqlParameter("@jc3", SqlDbType.Float,8),
                    new SqlParameter("@gcsj_yatou", SqlDbType.NVarChar,10),
                    new SqlParameter("@yt1", SqlDbType.NVarChar,20),
                    new SqlParameter("@yt2", SqlDbType.NVarChar,20),
                    new SqlParameter("@yt3", SqlDbType.NVarChar,20),
                    new SqlParameter("@gcsj_oxianliang", SqlDbType.NVarChar,10),
                    new SqlParameter("@oxl1", SqlDbType.NVarChar,20),
                    new SqlParameter("@oxl2", SqlDbType.NVarChar,20),
                    new SqlParameter("@oxl3", SqlDbType.NVarChar,20),
                    new SqlParameter("@ldxp_xinpianjj", SqlDbType.NVarChar,10),
                    new SqlParameter("@ldxp_jianyanry", SqlDbType.NVarChar,10),
                    new SqlParameter("@ldxp_jianyansb", SqlDbType.NVarChar,20),
                    new SqlParameter("@bggSum", SqlDbType.Int,4),
                    new SqlParameter("@备注", SqlDbType.NVarChar,100),
                    new SqlParameter("@LD_lx", SqlDbType.NVarChar,30),
                    new SqlParameter("@LD_xh", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_name", SqlDbType.NVarChar,30),
                    new SqlParameter("@LD_sjdh", SqlDbType.NVarChar,20),
                    new SqlParameter("@LD_remark", SqlDbType.NVarChar,50),
                    new SqlParameter("@PT_lx", SqlDbType.NVarChar,30),
                    new SqlParameter("@PT_xh", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_name", SqlDbType.NVarChar,30),
                    new SqlParameter("@PT_sjdh", SqlDbType.NVarChar,20),
                    new SqlParameter("@PT_remark", SqlDbType.NVarChar,50),
                    new SqlParameter("@KT_lx", SqlDbType.NVarChar,30),
                    new SqlParameter("@KT_xh", SqlDbType.NVarChar,20),
                    new SqlParameter("@KT_name", SqlDbType.NVarChar,30),
                    new SqlParameter("@KT_sjdh", SqlDbType.NVarChar,20),
                    new SqlParameter("@KT_remark", SqlDbType.NVarChar,50),
                    new SqlParameter("@NBP_lx0", SqlDbType.NVarChar,30),
                    new SqlParameter("@NBP_xh0", SqlDbType.NVarChar,20),
                    new SqlParameter("@NBP_name0", SqlDbType.NVarChar,30),
                    new SqlParameter("@NBP_sjdh0", SqlDbType.NVarChar,20),
                    new SqlParameter("@NBP_remark0", SqlDbType.NVarChar,50),
                    new SqlParameter("@NBP_lx45", SqlDbType.NVarChar,30),
                    new SqlParameter("@NBP_xh45", SqlDbType.NVarChar,20),
                    new SqlParameter("@NBP_name45", SqlDbType.NVarChar,30),
                    new SqlParameter("@NBP_sjdh45", SqlDbType.NVarChar,20),
                    new SqlParameter("@NBP_remark45", SqlDbType.NVarChar,50),
                    new SqlParameter("@JK_lx", SqlDbType.NVarChar,30),
                    new SqlParameter("@JK_xh", SqlDbType.NVarChar,20),
                    new SqlParameter("@JK_name", SqlDbType.NVarChar,30),
                    new SqlParameter("@JK_sjdh", SqlDbType.NVarChar,20),
                    new SqlParameter("@JK_remark", SqlDbType.NVarChar,50)};
            parameters[0].Value = model.随工单号;
            parameters[1].Value = model.备料;
            parameters[2].Value = model.bl_sbbh1;
            parameters[3].Value = model.bl_sbbh2;
            parameters[4].Value = model.bl_sbbh3;
            parameters[5].Value = model.bl_sbbh4;
            parameters[6].Value = model.bl_xcsl;
            parameters[7].Value = model.bl_xctime;
            parameters[8].Value = model.bl_czy1;
            parameters[9].Value = model.bl_czy2;
            parameters[10].Value = model.bl_czy3;
            parameters[11].Value = model.bl_czy4;
            parameters[12].Value = model.bl_czyname1;
            parameters[13].Value = model.bl_czyname2;
            parameters[14].Value = model.bl_czyname3;
            parameters[15].Value = model.bl_czyname4;
            parameters[16].Value = model.bl_lry;
            parameters[17].Value = model.bl_lryname;
            parameters[18].Value = model.bl_bhgallsl;
            parameters[19].Value = model.blng1;
            parameters[20].Value = model.blng2;
            parameters[21].Value = model.blng3;
            parameters[22].Value = model.blng4;
            parameters[23].Value = model.blng5;
            parameters[24].Value = model.blng6;
            parameters[25].Value = model.blng7;
            parameters[26].Value = model.blng8;
            parameters[27].Value = model.blng9;
            parameters[28].Value = model.blngoth;
            parameters[29].Value = model.blngothnum;
            parameters[30].Value = model.LD焊接;
            parameters[31].Value = model.LD_sbbh1;
            parameters[32].Value = model.LD_sbbh2;
            parameters[33].Value = model.LD_sbbh3;
            parameters[34].Value = model.LD_sbbh4;
            parameters[35].Value = model.LD_sjsl;
            parameters[36].Value = model.LD_xcsl;
            parameters[37].Value = model.LD_xctime;
            parameters[38].Value = model.LD_czy1;
            parameters[39].Value = model.LD_czy2;
            parameters[40].Value = model.LD_czy3;
            parameters[41].Value = model.LD_czy4;
            parameters[42].Value = model.LD_czyname1;
            parameters[43].Value = model.LD_czyname2;
            parameters[44].Value = model.LD_czyname3;
            parameters[45].Value = model.LD_czyname4;
            parameters[46].Value = model.LD_lry;
            parameters[47].Value = model.LD_lryname;
            parameters[48].Value = model.LD_bhgallsl;
            parameters[49].Value = model.LD_jzsl;
            parameters[50].Value = model.ldng1;
            parameters[51].Value = model.ldng2;
            parameters[52].Value = model.ldng3;
            parameters[53].Value = model.ldng4;
            parameters[54].Value = model.ldng5;
            parameters[55].Value = model.ldng6;
            parameters[56].Value = model.ldng7;
            parameters[57].Value = model.ldng8;
            parameters[58].Value = model.ldng9;
            parameters[59].Value = model.ldngoth;
            parameters[60].Value = model.ldngothnum;
            parameters[61].Value = model.PT耦合固化;
            parameters[62].Value = model.PT_sbbh1;
            parameters[63].Value = model.PT_sbbh2;
            parameters[64].Value = model.PT_sbbh3;
            parameters[65].Value = model.PT_sbbh4;
            parameters[66].Value = model.PT_sjsl;
            parameters[67].Value = model.PT_xcsl;
            parameters[68].Value = model.PT_xctime;
            parameters[69].Value = model.PT_czy1;
            parameters[70].Value = model.PT_czy2;
            parameters[71].Value = model.PT_czy3;
            parameters[72].Value = model.PT_czy4;
            parameters[73].Value = model.PT_czyname1;
            parameters[74].Value = model.PT_czyname2;
            parameters[75].Value = model.PT_czyname3;
            parameters[76].Value = model.PT_czyname4;
            parameters[77].Value = model.PT_lry;
            parameters[78].Value = model.PT_lryname;
            parameters[79].Value = model.PT_bhgallsl;
            parameters[80].Value = model.PT_bhgyy;
            parameters[81].Value = model.ptng1;
            parameters[82].Value = model.ptng2;
            parameters[83].Value = model.ptng3;
            parameters[84].Value = model.ptng4;
            parameters[85].Value = model.ptng5;
            parameters[86].Value = model.ptng6;
            parameters[87].Value = model.ptng7;
            parameters[88].Value = model.ptng8;
            parameters[89].Value = model.ptng9;
            parameters[90].Value = model.ptngoth;
            parameters[91].Value = model.ptngothnum;
            parameters[92].Value = model.温循前;
            parameters[93].Value = model.WXQ_sbbh;
            parameters[94].Value = model.WXQ_sjsl;
            parameters[95].Value = model.WXQ_frsl;
            parameters[96].Value = model.WXQ_xctime;
            parameters[97].Value = model.WXQ_czy;
            parameters[98].Value = model.WXQ_czyname;
            parameters[99].Value = model.WXQ_lry;
            parameters[100].Value = model.WXQ_lryname;
            parameters[101].Value = model.WXQ_remark;
            parameters[102].Value = model.温循后;
            parameters[103].Value = model.WXH_sbbh;
            parameters[104].Value = model.WXH_qcsl;
            parameters[105].Value = model.WXH_xcsl;
            parameters[106].Value = model.WXH_wxsc;
            parameters[107].Value = model.WXH_xctime;
            parameters[108].Value = model.WXH_czy;
            parameters[109].Value = model.WXH_czyname;
            parameters[110].Value = model.WX_Hlry;
            parameters[111].Value = model.WXH_lryname;
            parameters[112].Value = model.WXH_remark;
            parameters[113].Value = model.测试;
            parameters[114].Value = model.CS_sbbh1;
            parameters[115].Value = model.CS_sbbh2;
            parameters[116].Value = model.CS_sbbh3;
            parameters[117].Value = model.CS_sbbh4;
            parameters[118].Value = model.CS_sjsl;
            parameters[119].Value = model.CS_xcsl;
            parameters[120].Value = model.CS_xctime;
            parameters[121].Value = model.CS_czy1;
            parameters[122].Value = model.CS_czy2;
            parameters[123].Value = model.CS_czy3;
            parameters[124].Value = model.CS_czy4;
            parameters[125].Value = model.CS_czyname1;
            parameters[126].Value = model.CS_czyname2;
            parameters[127].Value = model.CS_czyname3;
            parameters[128].Value = model.CS_czyname4;
            parameters[129].Value = model.CS_lry;
            parameters[130].Value = model.CS_lryname;
            parameters[131].Value = model.CS_bhgallsl;
            parameters[132].Value = model.csng1;
            parameters[133].Value = model.csng2;
            parameters[134].Value = model.csng3;
            parameters[135].Value = model.csng4;
            parameters[136].Value = model.csng5;
            parameters[137].Value = model.csng6;
            parameters[138].Value = model.csng7;
            parameters[139].Value = model.csng8;
            parameters[140].Value = model.csng9;
            parameters[141].Value = model.csngoth;
            parameters[142].Value = model.csngothnum;
            parameters[143].Value = model.清洗;
            parameters[144].Value = model.QX_sbbh1;
            parameters[145].Value = model.QX_sbbh2;
            parameters[146].Value = model.QX_sbbh3;
            parameters[147].Value = model.QX_sbbh4;
            parameters[148].Value = model.QX_sjsl;
            parameters[149].Value = model.QX_xcsl;
            parameters[150].Value = model.QX_xctime;
            parameters[151].Value = model.QX_czy1;
            parameters[152].Value = model.QX_czy2;
            parameters[153].Value = model.QX_czy3;
            parameters[154].Value = model.QX_czy4;
            parameters[155].Value = model.QX_czyname1;
            parameters[156].Value = model.QX_czyname2;
            parameters[157].Value = model.QX_czyname3;
            parameters[158].Value = model.QX_czyname4;
            parameters[159].Value = model.QX_lry;
            parameters[160].Value = model.QX_lryname;
            parameters[161].Value = model.QX_bhgallsl;
            parameters[162].Value = model.qxng1;
            parameters[163].Value = model.qxngoth;
            parameters[164].Value = model.qxngothnum;
            parameters[165].Value = model.包装;
            parameters[166].Value = model.BZ_sbbh1;
            parameters[167].Value = model.BZ_sbbh2;
            parameters[168].Value = model.BZ_sbbh3;
            parameters[169].Value = model.BZ_sbbh4;
            parameters[170].Value = model.BZ_sjsl;
            parameters[171].Value = model.BZ_xcsl;
            parameters[172].Value = model.BZ_xctime;
            parameters[173].Value = model.BZ_czy1;
            parameters[174].Value = model.BZ_czy2;
            parameters[175].Value = model.BZ_czy3;
            parameters[176].Value = model.BZ_czy4;
            parameters[177].Value = model.BZ_czyname1;
            parameters[178].Value = model.BZ_czyname2;
            parameters[179].Value = model.BZ_czyname3;
            parameters[180].Value = model.BZ_czyname4;
            parameters[181].Value = model.BZ_lry;
            parameters[182].Value = model.BZ_lryname;
            parameters[183].Value = model.BZ_bhgallsl;
            parameters[184].Value = model.bzng1;
            parameters[185].Value = model.bzngoth;
            parameters[186].Value = model.bzngothnum;
            parameters[187].Value = model.gcsj_liushuih;
            parameters[188].Value = model.lsh1;
            parameters[189].Value = model.lsh2;
            parameters[190].Value = model.lsh3;
            parameters[191].Value = model.gcsj_CASE;
            parameters[192].Value = model.case1;
            parameters[193].Value = model.case2;
            parameters[194].Value = model.case3;
            parameters[195].Value = model.gcsj_LDjia;
            parameters[196].Value = model.ld1;
            parameters[197].Value = model.ld2;
            parameters[198].Value = model.ld3;
            parameters[199].Value = model.gcsj_PDjia;
            parameters[200].Value = model.pd1;
            parameters[201].Value = model.pd2;
            parameters[202].Value = model.pd3;
            parameters[203].Value = model.gcsj_LDjian;
            parameters[204].Value = model.ldj1;
            parameters[205].Value = model.ldj2;
            parameters[206].Value = model.ldj3;
            parameters[207].Value = model.gcsj_jicha;
            parameters[208].Value = model.jc1;
            parameters[209].Value = model.jc2;
            parameters[210].Value = model.jc3;
            parameters[211].Value = model.gcsj_yatou;
            parameters[212].Value = model.yt1;
            parameters[213].Value = model.yt2;
            parameters[214].Value = model.yt3;
            parameters[215].Value = model.gcsj_oxianliang;
            parameters[216].Value = model.oxl1;
            parameters[217].Value = model.oxl2;
            parameters[218].Value = model.oxl3;
            parameters[219].Value = model.ldxp_xinpianjj;
            parameters[220].Value = model.ldxp_jianyanry;
            parameters[221].Value = model.ldxp_jianyansb;
            parameters[222].Value = model.bggSum;
            parameters[223].Value = model.备注;
            parameters[224].Value = model.LD_lx;
            parameters[225].Value = model.LD_xh;
            parameters[226].Value = model.LD_name;
            parameters[227].Value = model.LD_sjdh;
            parameters[228].Value = model.LD_remark;
            parameters[229].Value = model.PT_lx;
            parameters[230].Value = model.PT_xh;
            parameters[231].Value = model.PT_name;
            parameters[232].Value = model.PT_sjdh;
            parameters[233].Value = model.PT_remark;
            parameters[234].Value = model.KT_lx;
            parameters[235].Value = model.KT_xh;
            parameters[236].Value = model.KT_name;
            parameters[237].Value = model.KT_sjdh;
            parameters[238].Value = model.KT_remark;
            parameters[239].Value = model.NBP_lx0;
            parameters[240].Value = model.NBP_xh0;
            parameters[241].Value = model.NBP_name0;
            parameters[242].Value = model.NBP_sjdh0;
            parameters[243].Value = model.NBP_remark0;
            parameters[244].Value = model.NBP_lx45;
            parameters[245].Value = model.NBP_xh45;
            parameters[246].Value = model.NBP_name45;
            parameters[247].Value = model.NBP_sjdh45;
            parameters[248].Value = model.NBP_remark45;
            parameters[249].Value = model.JK_lx;
            parameters[250].Value = model.JK_xh;
            parameters[251].Value = model.JK_name;
            parameters[252].Value = model.JK_sjdh;
            parameters[253].Value = model.JK_remark;

            int rows = dbhelper1.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }