Example #1
0
        internal DaoErrMsg DeletePN(DaoPartNumber CarPN)
        {
            string strSchema = string.Format("DELETE FROM 車型資料 WHERE 件號 = '{0}' ", CarPN.件號);

            return(m_SQL.ExecuteNonQuery(strSchema));
        }
Example #2
0
        /// <summary>
        /// 儲存測試結果資訊
        /// </summary>
        /// <param name="Serial"></param>
        /// <param name="Machine"></param>
        /// <param name="User"></param>
        /// <param name="PN"></param>
        /// <param name="Result"></param>
        /// <param name="TestTime"></param>
        /// <returns></returns>
        internal DaoErrMsg SaveTestResult(string Serial, DaoMachine Machine, DaoUser User, DaoPartNumber PN, string Result, DateTime TestTime)
        {
            string ResultSerial = string.Format("{0}{1}{2}", Machine.機台代碼, PN.簡碼, Serial);

            string strSchema = string.Format(@"INSERT INTO 測試結果(流水號, 件號, 車型名稱, 生產日期, 生產時間, 測試結果, 作業員代碼)
                                                            VALUES('{0}','{1}','{2}','{3}','{3}','{4}','{5}');",
                                             ResultSerial,
                                             PN.件號,
                                             PN.車型,
                                             TestTime.ToString("yyyy-MM-dd HH:mm:ss"),
                                             Result,
                                             User.代碼);

            return(m_SQL.ExecuteNonQuery(strSchema));
        }