Пример #1
0
        public string CreateLibro(Libros objLibr)
        {
            try
            {
                ILibroRepository InsLibr = new ILibroRepository();
                Int32            message = 0;

                if ((objLibr.Nombre != null) && (objLibr.FechaEscritura != null) && (objLibr.Costo != null) && (objLibr.Id_Autor != null))
                {
                    message = InsLibr.InsertLibros(objLibr);
                }
                else
                {
                    message = -1;
                }
                return(message.ToString());
            }
            catch
            {
                throw;
            }
        }