예제 #1
0
        public string PutArtist(clsBrand prArtist)

        { // update
            try

            {
                int lcRecCount = clsDbConnection.Execute(
                    "UPDATE Brand SET brand_description = @brandDescription WHERE brand_name = @brandName",
                    prepareArtistParameters(prArtist));
                if (lcRecCount == 1)
                {
                    return("One brand updated");
                }

                else
                {
                    return("Unexpected brand update count: " + lcRecCount);
                }
            }

            catch (Exception ex)

            {
                return(ex.GetBaseException().Message);
            }
        }
예제 #2
0
        private Dictionary <string, object> prepareArtistParameters(clsBrand prArtist)

        {
            Dictionary <string, object> par = new Dictionary <string, object>(3);

            par.Add("brandName", prArtist.BrandName);
            par.Add("brandDescription", prArtist.BrandDescription);
            //par.Add("Phone", prArtist.Phone);
            return(par);
        }