12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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;
- }
- }
- }
|