Пример #1
0
            /// <summary>
            /// 保存实时漏率
            /// </summary>
            private void SaveTmp()
            {
                if (barCode == "")
                {
                    if (!frmMain.mMain.AllMeterData.AllCommunite[30].Sons[0].Read <string>(out barCode, 40))
                    {
                        if (!frmMain.mMain.AllMeterData.AllCommunite[30].Sons[0].Read <string>(out barCode, 40))
                        {
                            return;
                        }
                    }
                    if (barCode == "")
                    {
                        return;
                    }
                }
                All.Class.Sqlce sql = new All.Class.Sqlce();

                if (!sql.Login(CheckTestResultFile.CheckLenNingFile(barCode), "AllLenNingValue.sdf", "", ""))
                {
                    return;
                }

                sql.Write(string.Format("insert into TestLouLv (LouLv) Values ({0:F10})",
                                        ShiShiLouLv));
                sql.Close();
            }
            public void Save()
            {
                if (BarCode == "")
                {
                    return;
                }
                if (frmMain.mMain.FlushUserLogin.InfoLineStation.Count >= this.WorkStation)
                {
                    this.UserName = frmMain.mMain.FlushUserLogin.InfoLineStation[this.WorkStation - 1].UserName;
                }
                All.Class.Sqlce sql = new All.Class.Sqlce();
                switch (WorkStation)
                {
                case 11:
                    if (!sql.Login(CheckTestResultFile.CheckLenNingFile(BarCode), "AllLenNingValue.sdf", "", ""))
                    {
                        return;
                    }
                    break;

                default:
                    if (!sql.Login(CheckTestResultFile.CheckTestFile(BarCode), "AllTestValue.sdf", "", ""))
                    {
                        return;
                    }
                    break;
                }
                sql.Write(string.Format("insert into TestAnZhuang Values({0},'{1}','{2}','{3:yyyy-MM-dd HH:mm:ss}')",
                                        WorkStation, StationName, UserName, TestTime));
                sql.Close();
            }
Пример #3
0
            /// <summary>
            /// 保存检测结果
            /// </summary>
            private void Save()
            {
                //记录状态为1时,记录数据,读到此状态后,将此状态复位
                frmMain.mMain.AllMeterData.AllCommunite[30].Sons[0].Write <ushort>(0, 2);

                string tmpBarCode = "";

                if (!frmMain.mMain.AllMeterData.AllCommunite[30].Sons[0].Read <string>(out tmpBarCode, 40))
                {
                    if (!frmMain.mMain.AllMeterData.AllCommunite[30].Sons[0].Read <string>(out tmpBarCode, 40))
                    {
                        return;
                    }
                }
                if (tmpBarCode == "")
                {
                    return;
                }
                All.Class.Sqlce sql = new All.Class.Sqlce();

                if (!sql.Login(CheckTestResultFile.CheckLenNingFile(tmpBarCode), "AllLenNingValue.sdf", "", ""))
                {
                    return;
                }

                sql.Write(string.Format("insert into TestJianLou Values ('{0}',{1},{2},{3},{4},{5})",
                                        JieGuo, HaiJianShiJian, ZongJiePai, XuLieHao, ZhenKongDu, LouLv));
                sql.Close();
            }