//********************************************************************* /// /// <summary> /// /// </summary> /// <param name="transferRequest"></param> /// <param name="db"></param> /// //********************************************************************* public void InsertTransferRequest(Models.Request transferRequest, Models.AzureFileTransferContext db) { try { db.Database.Connection.ConnectionString = _ConnectionString; db.Requests.Add(transferRequest); db.SaveChanges(); } catch (Exception ex) { throw new Exception("Exception in AftsDb.InsertTransferRequest() : " + Utilities.UnwindExceptionMessages(ex)); } }
//********************************************************************* /// /// <summary> /// /// </summary> /// <param name="transferRequest"></param> /// <param name="db"></param> /// //********************************************************************* public void ResubmitTransferRequest(Models.Request transferRequest, Models.AzureFileTransferContext db) { try { db.Database.Connection.ConnectionString = _ConnectionString; var foundReq = (from rb in db.Requests where rb.RequestID == transferRequest.RequestID select rb).First(); foundReq.ResultStatusCode = "Submitted"; foundReq.AgentName = null; db.SaveChanges(); } catch (Exception ex) { throw new Exception("Exception in AftsDb.ResubmitTransferRequest() : " + Utilities.UnwindExceptionMessages(ex)); } }