Пример #1
0
        ///<summary></summary>
        private static Etrans835Attach Insert835Attach(long etransNum, long claimNum, int clpSegmentIndex, DateTime dateTimeTrans)
        {
            Etrans835Attach attach = new Etrans835Attach()
            {
                EtransNum       = etransNum,
                ClaimNum        = claimNum,
                ClpSegmentIndex = clpSegmentIndex
            };

            Etrans835Attaches.Insert(attach);
            attach.DateTimeTrans = dateTimeTrans;
            return(attach);
        }
Пример #2
0
        ///<summary>Inserts new Etrans835Attach for given claimPaid and claim.
        ///Deletes any existing Etrans835Attach prior to inserting new one.
        ///Sets claimPaid.ClaimNum and claimPaid.IsAttachedToClaim.</summary>
        private void CreateAttachForClaim(Hx835_Claim claimPaid, long claimNum, bool isNewAttachNeeded)
        {
            if (!isNewAttachNeeded &&
                _listAttaches.Exists(
                    x => x.ClaimNum == claimNum &&
                    x.EtransNum == _x835.EtransSource.EtransNum &&
                    x.ClpSegmentIndex == claimPaid.ClpSegmentIndex)
                )
            {
                //Not forcing a new attach and one already exists.
                return;
            }
            //Create a hard link between the selected claim and the claim info on the 835.
            Etrans835Attaches.DeleteMany(claimPaid.ClpSegmentIndex, EtransCur.EtransNum);           //Detach existing if any.
            Etrans835Attach attach = new Etrans835Attach();

            attach.EtransNum       = EtransCur.EtransNum;
            attach.ClaimNum        = claimNum;
            attach.ClpSegmentIndex = claimPaid.ClpSegmentIndex;
            Etrans835Attaches.Insert(attach);
            claimPaid.ClaimNum          = claimNum;
            claimPaid.IsAttachedToClaim = true;
        }