Exemplo n.º 1
0
        public static void InsertRow(SQLiteCommand command, DwgFileModel model)
        {
            string relPath = model.relativePath;

            List <List <object> > items = new List <List <object> >
            {
                new List <object> {
                    DBDwgFileName.ISP_NOTES, DBDwgFileName_AT.iNote, model.isP_Notes
                },
                new List <object> {
                    DBDwgFileName.MODIFIEDDATE, DBDwgFileName_AT.modDate, model.modifieddate
                },
                new List <object> {
                    DBDwgFileName.RELATIVE_PATH, DBDwgFileName_AT.relPath, relPath
                }
            };

            List <string> variables = new List <string>();
            Dictionary <string, object> paraDict = new Dictionary <string, object>();

            foreach (List <object> item in items)
            {
                variables.Add((string)item[0]);
                paraDict.Add((string)item[1], item[2]);
            }

            DBCommand.InsertCommand(DBDwgFileName.name, variables, paraDict, command);
        }
Exemplo n.º 2
0
        public static void Insert(SQLiteCommand command, Matrix3dModel model)
        {
            List <List <object> >       items     = getItems(model);
            List <string>               variables = new List <string>();
            Dictionary <string, object> paraDict  = new Dictionary <string, object>();

            foreach (List <object> item in items)
            {
                variables.Add((string)item[0]);
                paraDict.Add((string)item[1], item[2]);
            }

            DBCommand.InsertCommand(DBMatrixName.name, variables, paraDict, command);
        }
Exemplo n.º 3
0
        public static void Insert(SQLiteCommand command, Point3dModel model)
        {
            //"INSERT INTO POINT3D ('X', 'Y', 'Z') VALUES (034.34, 233, 0);"
            List <string> variables = new List <string> {
                DBPoint3DName.X, DBPoint3DName.Y, DBPoint3DName.Z
            };
            Dictionary <string, object> paraDict = new Dictionary <string, object> {
                { DBPoint3D_AT.x, model.X },
                { DBPoint3D_AT.y, model.Y },
                { DBPoint3D_AT.z, model.Z }
            };

            DBCommand.InsertCommand(DBPoint3DName.tableName, variables, paraDict, command);
        }
        public static void InsertRow(FixtureDetailsModel model, SQLiteCommand command)
        {
            List <List <object> > items = getListItems(model);

            List <string> variables = new List <string>();
            Dictionary <string, object> paraDict = new Dictionary <string, object>();

            foreach (List <object> item in items)
            {
                variables.Add((string)item[0]);
                paraDict.Add((string)item[1], item[2]);
            }

            DBCommand.InsertCommand(DBFixtureDetailsNames.name, variables, paraDict, command);
        }