/*---------------------------------------------------------------------------- * %%Function: UpdateScanDate * %%Qualified: UniversalUpc.UpcInvCore.UpdateScanDate * %%Contact: rlittle * * Get scan information for this scan code (this works for any item type) * ----------------------------------------------------------------------------*/ public async Task <bool> UpdateScanDate(string sScanCode, string sTitle) { EnsureServiceConnection(); USR usr = await m_api.UpdateUpcLastScanDate(sScanCode, sTitle); return(usr.Result); }
/*---------------------------------------------------------------------------- * %%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); }
public static USR Failed(Exception e) { USR sr = new USR(); sr.Result = false; sr.Reason = e.Message; sr.CorrelationID = Guid.Empty; return(sr); }
public static USR FailedCorrelate(Exception e, Guid crids) { USR sr = new USR(); sr.Result = false; sr.Reason = e.Message; sr.CorrelationID = crids; return(sr); }
public static USR Success() { USR sr = new USR(); sr.Result = true; sr.Reason = null; sr.CorrelationID = Guid.Empty; return(sr); }
public static USR FromSRCorrelate(TCore.SR sr, Guid crids) { USR usr = new USR(); usr.Result = sr.Result; usr.Reason = sr.Reason; usr.CorrelationID = crids; return(usr); }
public static USR FromSR(TCore.SR sr) { USR usr = new USR(); usr.Result = sr.Result; usr.Reason = sr.Reason; usr.CorrelationID = sr.CorrelationID; return(usr); }
public static USR_DiagnosticResult FromTCSR(USR usr) { USR_DiagnosticResult usrd = new USR_DiagnosticResult(); usrd.Reason = usr.Reason; usrd.Result = usr.Result; usrd.CorrelationID = usr.CorrelationID; return(usrd); }
public static USR_BookInfoList FromTCSR(USR usr) { USR_BookInfoList usrs = new USR_BookInfoList(); usrs.Reason = usr.Reason; usrs.Result = usr.Result; usrs.CorrelationID = usr.CorrelationID; return(usrs); }
public static USR_DvdInfoEx FromTCSR(USR usr) { USR_DvdInfoEx usrs = new USR_DvdInfoEx(); usrs.Reason = usr.Reason; usrs.Result = usr.Result; usrs.CorrelationID = usr.CorrelationID; return(usrs); }
public static USR_String FromTCSR(USR usr) { USR_String usrs = new USR_String(); usrs.Reason = usr.Reason; usrs.Result = usr.Result; usrs.CorrelationID = usr.CorrelationID; return(usrs); }
public static USR ToTcsr(TUSR <T> sr) { USR usr = new USR(); usr.Reason = sr.Reason; usr.Result = sr.Result; usr.CorrelationID = sr.CorrelationID; return(usr); }
public static USR FailedCorrelate(string sReason, Guid crids) { USR sr = new USR(); sr.Result = false; sr.Reason = sReason; sr.CorrelationID = crids; return(sr); }
public static USR Failed(string sReason) { USR sr = new USR(); sr.Result = false; sr.Reason = sReason; sr.CorrelationID = Guid.Empty; return(sr); }
public static USR_WineInfo FromTCSR(USR usr) { USR_WineInfo usrw = new USR_WineInfo(); usrw.Reason = usr.Reason; usrw.Result = usr.Result; usrw.CorrelationID = usr.CorrelationID; return(usrw); }
public static USR SuccessCorrelate(Guid crids) { USR sr = new USR(); sr.Result = true; sr.Reason = null; sr.CorrelationID = crids; return(sr); }
/*---------------------------------------------------------------------------- * %%Function: CreateBook * %%Qualified: UniversalUpc.UpcInvCore.CreateBook * %%Contact: rlittle * * Create a Book with the given scan code and title. * ----------------------------------------------------------------------------*/ public async Task <bool> UpdateBookScan(string sScanCode, string sTitle, string sLocation, Guid crids) { EnsureServiceConnection(); USR usr = await m_api.UpdateBookScan(sScanCode, sTitle, sLocation); if (usr.Result) { m_lp.LogEvent(crids, EventType.Verbose, "Successfully update title for {0}", sScanCode); } else { m_lp.LogEvent(crids, EventType.Error, "Failed to update title for {0}", sScanCode); } return(usr.Result); }
/*---------------------------------------------------------------------------- * %%Function: CreateDvd * %%Qualified: UniversalUpc.UpcInvCore.CreateDvd * %%Contact: rlittle * * Create a DVD with the given scan code and title. * ----------------------------------------------------------------------------*/ public async Task <bool> CreateDvd(string sScanCode, string sTitle, Guid crids) { EnsureServiceConnection(); USR usr = await m_api.CreateDvd(sScanCode, sTitle); 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); }