using OTSModelSharp.DTLBase; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OTSModelSharp { public class CFieldDB : CSQLiteDB { public CFieldDB(IDBStoreBase _conStr, CSQLiteTable _table) : base(_conStr, _table) { } public void SaveAField(int fieldId,System.Drawing.Point fldPos,System.Drawing.Point OTSPos) { var tableInfoPtr = GetTableInfo(); if (tableInfoPtr == null) { return ; } var datastorePtr = GetDatastore(); string sInsertFormat = tableInfoPtr.GetInsertCommandFormatString(true); string sSQLCommand; sSQLCommand = string.Format(sInsertFormat, fieldId, fldPos.X, fldPos.Y,OTSPos.X,OTSPos.Y); if (!datastorePtr.RunCommand(sSQLCommand)) { return ; } return ; } public string GetSavingAFieldcmd(int fieldId, System.Drawing.Point OTSPos,System.Drawing.Point SemPos) { var tableInfoPtr = GetTableInfo(); if (tableInfoPtr == null) { return ""; } var datastorePtr = GetDatastore(); string sInsertFormat = tableInfoPtr.GetInsertCommandFormatString(true); string sSQLCommand; sSQLCommand = string.Format(sInsertFormat, fieldId, OTSPos.X, OTSPos.Y,SemPos.X,SemPos.Y); return sSQLCommand; } } }