Esempio n. 1
0
        /// <summary>
        /// Method to add a new Security to the DB
        /// </summary>
        /// <param name="sec"></param>
        internal void addSecurity(ControllersLayer.Security sec)
        {
            string selectString = "INSERT into Securities(SecurityID, SecurityName, SecurityPrice)" +
            "VALUES (" + sec.securityID + ", '" + sec.securityName + "', '" + sec.securityPrice + "')";

            UpdateDataSource(new SqlCommand(selectString, cnMain));
        }
Esempio n. 2
0
        /// <summary>
        /// Method to add a new model to the database
        /// </summary>
        /// <param name="model">Model to be added</param>
        internal void addModel(ControllersLayer.Model model)
        {
            string selectString = "INSERT into Models(ModelID, ModelName, ModelDescription)" +
            "VALUES (" + model.modelID + ", '" + model.modelName + "', '" + model.modelDesc + "')";

            UpdateDataSource(new SqlCommand(selectString, cnMain));
        }