public void SaveBoardSpec(string boardName, string DESC, string imageFile, float boardThickness, float boardWidth, float boardLength, float fixtureThickness, List <int> rowList, List <float> xList, List <float> yList, List <float> angleList, List <string> connectorList, List <string> commentsList, string byWho, out string resCode, out string resDesc) { try { Log.AppendText("กำลังบันทึกข้อมูล Board spec. {" + boardName + ", " + DESC + ", " + boardThickness.ToString() + ", " + boardWidth.ToString() + ", " + boardLength.ToString() + ", " + fixtureThickness.ToString() + ", Connector count = " + rowList.Count.ToString() + "} by " + byWho); ManageBiz ms = new ManageBiz(); DataTable dt; dt = ms.GetBoardBy(boardName); if (dt.Rows.Count == 0) { Log.AppendText("ตรวจสอบ Board spec. เรียบร้อย"); ms.AddNewBoardSpec(boardName, DESC, imageFile, boardWidth, boardLength, boardThickness, fixtureThickness, rowList, xList, yList, angleList, connectorList, commentsList); resCode = "00"; resDesc = ""; } else { Log.AppendText("WARNING! : Board spec. ซ้ำ"); Log.AppendText("เริ่มต้น Update Board spec...."); ms.UpdateBoardSpec(boardName, DESC, imageFile, boardWidth, boardLength, boardThickness, fixtureThickness, rowList, xList, yList, angleList, connectorList, commentsList); resCode = "01"; resDesc = ""; } } catch (Exception ex) { resCode = "EX"; resDesc = ex.Message; Log.AppendText(ex.Message); } }