Пример #1
0
        /*----------------------------------------------------------------------------
        *       %%Function: CreateBook
        *       %%Qualified: UniversalUpc.UpcInvCore.CreateBook
        *       %%Contact: rlittle
        *
        *   Create a Book with the given scan code and title.
        *  ----------------------------------------------------------------------------*/
        public async Task <bool> CreateBook(string sScanCode, string sTitle, string sLocation, Guid crids)
        {
            EnsureServiceConnection();
            USR usr;

            try
            {
                usr = await m_api.CreateBook(sScanCode, sTitle, sLocation);
            }
            catch (Exception exc)
            {
                usr = USR.Failed(exc);
            }

            if (usr.Result)
            {
                m_lp.LogEvent(crids, EventType.Verbose, "Successfully added title for {0}", sScanCode);
            }
            else
            {
                m_lp.LogEvent(crids, EventType.Error, "Failed to add title for {0}", sScanCode);
            }

            return(usr.Result);
        }