Beispiel #1
0
        private void createNewTask(String name, String countParams, String countSelections)
        {
            sqlManager.StartTransaction();
            String sqlReqStr = "INSERT INTO TASK (NAME, PARAM_COUNT, SELECTION_COUNT) " +
                               "VALUES('" + name + "','" + countParams + "','" + countSelections + "');";
            int state = sqlManager.SendInsertRequest(sqlReqStr);

            if (state == 0)
            {
                Console.WriteLine("error");
            }
            curTaskID = state;
        }
Beispiel #2
0
        private void createNewSelection(String name, String countRows)
        {
            String sqlReqStr = "INSERT INTO SELECTION (TASK_ID, NAME, COUNT_ROWS) " +
                               "VALUES('" + TaskID + "','" + name + "','" + countRows + "');";
            int state = sqlManager.SendInsertRequest(sqlReqStr);

            if (state == 0)
            {
                Console.WriteLine("error");
            }
        }
Beispiel #3
0
        private void createNewParam(String name, TypeParametr type, String range, String index)
        {
            String sqlReqStr = "INSERT INTO PARAM (TASK_ID, NAME, TYPE, RANGE, NUMBER) " +
                               "VALUES('" + TaskID + "','" + name + "','" + ((int)type).ToString() + "','" + range + "','" + index + "');";
            int state = sqlManager.SendInsertRequest(sqlReqStr);

            if (state == 0)
            {
                Console.WriteLine("error");
            }
        }
Beispiel #4
0
        private void AddValuesToDB()
        {
            SQLManager sqlManager = SQLManager.MainSQLManager;
            String     sqlReqStr;

            foreach (ValueParametr value in ArrValueParameters)
            {
                sqlReqStr = "INSERT INTO VALUE_PARAM (PARAM_ID, SELECTION_ID, VALUE, ROW_INDEX) " +
                            "VALUES('" + value.ParametrID + "','" + value.SelectionID + "','" + value.Value + "','" + value.RowIndex + "');";
                int state = sqlManager.SendInsertRequest(sqlReqStr);
                value.ID = state;
            }
        }