public void Save(DCBatch dcvdr) { CompanyBiz cbiz = new CompanyBiz(); BatchRecordBiz brbiz = new BatchRecordBiz(); try { BatchDetail detvdr = new BatchDetail(); GMUtilities.GMReflectionUtils.Copy(dcvdr, detvdr); detvdr.CreatedDate = DateTime.Now; DataTable dt = m_biz.Save(detvdr, cbiz.Get(dcvdr.CompanyID), dcvdr.BatchFilePath, m_optbiz.GetCounties()); //Save Records dcvdr.Messages = m_biz.Messages; brbiz.Save(dt, detvdr, dcvdr.SessionID); dcvdr.ID = detvdr.ID; dcvdr.Messages.AddRange(brbiz.Messages); //Update the Total, Pass and Fail count. m_biz.Save(detvdr); } catch (Exception exp) { throw exp; } finally { cbiz.Dispose(); brbiz.Dispose(); } }
public override void Dispose() { base.Dispose(); m_biz.Dispose(); }