Esempio n. 1
0
        public object AddNewBook(params object[] args)
        {
            object ob = bd.SelectBookISBN(args[4].ToString());

            if (ob == null)
            {
                return(null);
            }
            else
            {
                string obst = ob.ToString();
                if (int.Parse(obst) != 0)
                {
                    return(2);//isbn已存在
                }
                else
                {
                    return(bd.AddNewBook(args));
                }
            }
        }