Esempio n. 1
0
        public void AddSpecialty(Specialty newSpecialty)
        {
            string        columns    = "speciltyId,stylistId";
            List <string> valueNames = new List <string>()
            {
                "@SpecialtyId,@StylistId"
            };
            List <Object> values = new List <Object>()
            {
                newSpecialty.GetId(), _id
            };

            DB.OpenConnection();
            DB.SaveToTable(_tableName, columns, valueNames, values);
            DB.CloseConnection();
        }
Esempio n. 2
0
        public void Save()
        {
            string        columns    = "name";
            List <string> valueNames = new List <string>()
            {
                "@Name"
            };
            List <Object> values = new List <Object>()
            {
                _name
            };

            DB.OpenConnection();
            DB.SaveToTable(_tableName, columns, valueNames, values);
            _id = DB.LastInsertId();
            DB.CloseConnection();
        }