예제 #1
0
        public bool addList(List <RecordDetail> list)
        {
            string query_string  = "insert into `t_record_detail` (`id`, `recordId`, `index`, `testValue`, `torqueValue`, `difference`, `percent`, `result`, `standard`, `upper`, `lower`,`manualwritevalue`) VALUES ";
            string query_string1 = "";

            for (int i = 0; i < list.Count; i++)
            {
                string uuid = Guid.NewGuid().ToString("N");
                query_string1 = query_string + "('" + uuid
                                + "','" + list[i].RecordId
                                + "','" + list[i].Index.ToString()
                                + "','" + list[i].TestValue.ToString()
                                + "','" + list[i].TorqueValue.ToString()
                                + "','" + list[i].Difference.ToString()
                                + "','" + list[i].Percent.ToString()
                                + "','" + list[i].Result.ToString()
                                + "','" + list[i].Standard.ToString()
                                + "','" + list[i].Upper.ToString()
                                + "','" + list[i].Lower.ToString()
                                + "','" + list[i].ManualWriteValue.ToString() + "')"
                                + ";";
                MysqlTool.addData(query_string1);
            }
            //query_string = query_string.Remove(query_string.Length - 1);

            return(true);//;MysqlTool.addData(query_string);
        }
예제 #2
0
        public bool addOne(BorrowRecord one)
        {
            string query_string = "INSERT INTO `t_borrow` (`id`, `seriesNum`, `operator`, `status`) VALUES (@id, @seriesNum, @operator, @status)";

            return(MysqlTool.addData(query_string, new MySqlParameter[] {
                new MySqlParameter("@id", one.Id),
                new MySqlParameter("@seriesNum", one.SeriesNum),
                new MySqlParameter("@operator", one.Operator),
                new MySqlParameter("@status", one.Status)
            }));
        }
        public bool addOne(Technology one)
        {
            string query_string = "INSERT INTO `t_technology` (`id`, `mode`, `version`, `proId`) VALUES (@id, @mode, @version, @proId)";

            return(MysqlTool.addData(query_string, new MySqlParameter[] {
                new MySqlParameter("@id", one.Id),
                new MySqlParameter("@mode", one.Mode),
                new MySqlParameter("@version", one.Version),
                new MySqlParameter("@proId", one.ProId)
            }));
        }
예제 #4
0
        public bool addOne(Record one)
        {
            string query_string = "INSERT INTO `t_record` (`id`, `seriesNum`, `proName`, `mode`, `result`, `operator`) VALUES (@id, @seriesNum, @proName, @mode, @result, @operator)";

            return(MysqlTool.addData(query_string, new MySqlParameter[] {
                new MySqlParameter("@id", one.Id),
                new MySqlParameter("@seriesNum", one.SeriesNum),
                new MySqlParameter("@proName", one.ProName),
                new MySqlParameter("@mode", one.Mode),
                new MySqlParameter("@result", one.Result),
                new MySqlParameter("@operator", one.Operator)
            }));
        }