Exemplo n.º 1
0
        public static void UpdateRow(SQLiteCommand command, InsertPointModel model)
        {
            DBPoint3D.UpdateRow(model.position, command.Connection);
            DBMatrix3d.Update(command.Connection, model.matrixTransform);

            List <List <object> > items = GetItemsList(model);

            Dictionary <string, string> variables  = new Dictionary <string, string>();
            Dictionary <string, string> conditions = new Dictionary <string, string> {
                { DBInsertPointName.ID, DBInsertPointName_AT.id }
            };
            Dictionary <string, object> paraDict = new Dictionary <string, object>();

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

            paraDict.Add(DBBlockName_AT.id, model.ID);
            DBCommand.UpdateRow(DBInsertPointName.name, variables, conditions, paraDict, command);
        }
        public static void UpdateRow(FixtureDetailsModel model, SQLiteCommand command)
        {
            DBPoint3D.UpdateRow(model.position, command.Connection);
            DBMatrix3d.Update(command.Connection, model.matrixTransform);

            List <List <object> > items = getListItems(model);

            Dictionary <string, string> variables = new Dictionary <string, string>();
            Dictionary <string, string> conDict   = new Dictionary <string, string> {
                { DBFixtureDetailsNames.ID, DBFixtureDetailsNames_AT.id }
            };
            Dictionary <string, object> paraDict = new Dictionary <string, object>();

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

            paraDict.Add(DBFixtureDetailsNames_AT.id, model.ID);

            DBCommand.UpdateRow(DBFixtureDetailsNames.name, variables, conDict, paraDict, command);
        }
Exemplo n.º 3
0
        public static void UpdateRow(SQLiteCommand command, FixtureBeingUsedAreaModel model)
        {
            DBPoint3D.UpdateRow(model.pointTop, command.Connection);
            DBPoint3D.UpdateRow(model.pointBottom, command.Connection);
            DBPoint3D.UpdateRow(model.origin, command.Connection);
            DBPoint3D.UpdateRow(model.position, command.Connection);
            DBMatrix3d.Update(command.Connection, model.matrixTransform);

            List <List <object> > items = GetItems(model);

            Dictionary <string, string> variables = new Dictionary <string, string>();
            Dictionary <string, string> conDict   = new Dictionary <string, string> {
                { DBFixtureBeingUsedAreaName.ID, DBFixtureBeingUsedAreaName_AT.id }
            };
            Dictionary <string, object> paraDict = new Dictionary <string, object>();

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

            DBCommand.UpdateRow(DBFixtureBeingUsedAreaName.name, variables, conDict, paraDict, command);
        }