예제 #1
0
        public void Save(DCBatchRecord dcbr)
        {
            RecordHistory rh = new RecordHistory();

            try
            {
                BatchRecordDetail detbr = HasID(dcbr.ID)? m_biz.Get(dcbr.ID) : new BatchRecordDetail();
                bool hasrh = (detbr.RecordStatusID != dcbr.RecordStatusID);
                GMUtilities.GMReflectionUtils.Copy(dcbr, detbr);
                m_biz.Save(detbr);
                dcbr.ID = detbr.ID;
                if (hasrh)
                {
                    rh.Save(detbr.ID.Value, detbr.RecordStatusID.Value, dcbr.SessionID);
                }
            }
            catch (Exception exp)
            { throw exp; }
            finally { rh.Dispose(); }
        }
예제 #2
0
파일: Batch.cs 프로젝트: sravan202/Releases
        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(); }
        }