Ejemplo n.º 1
0
        /// <summary>
        /// Duplicate details for Upfront Fees (DRWIN-38)
        /// </summary>
        public static int Add_UfFess_claim(HashSet <int> detailID_hs)
        {
            List <Dividend_Detail_full> ddf_list = DividendDetail_master.Get_ddf_list(detailID_hs);

            Bulk_DBcmd bkc = new Bulk_DBcmd();

            foreach (Dividend_Detail_full ddf in ddf_list)
            {
                if (!ddf.Status.Value.StartsWith("Received", StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }

                ddf.LastModifiedBy.Value   = Utility.CurrentUser;
                ddf.ModifiedDateTime.Value = DateTime.Now;

                long   new_ClaimID       = DividendDetail_master.GetNewClaimID(ddf.ClaimID.Value, 6);
                long   old_ClaimID       = ddf.ClaimID.Value;
                string old_BO_EntityType = ddf.BO_EntityType.Value;

                ddf.ClaimID.Value       = new_ClaimID;
                ddf.BO_EntityType.Value = "Pen1";
                bkc.Add_DBcmd(ddf.Get_DBinsert());

                //update old [Dividend_Detail]
                ddf.ClaimID.Value                 = old_ClaimID;
                ddf.BO_EntityType.Value           = old_BO_EntityType;
                ddf.Override_Fees.Value           = 0; //set depositary_fee to 0
                ddf.Override_Custodial_Fees.Value = 0; //set custodian_fee to 0
                bkc.Add_DBcmd(ddf.Get_DBupdate());
            }
            int count = bkc.SaveToDB(Utility.Get_DRWIN_hDB());

            if (count > 0)
            {
                MessageBox.Show("Add UpFees Finished " + count);
            }
            else
            {
                MessageBox.Show("UpFees: Nothing was added...");
            }

            return(count);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Duplicate details for Return of Founds (DRWIN-38)
        /// </summary>
        public static int Add_RoF_claims(HashSet <int> detailID_hs)
        {
            List <Dividend_Detail_full> ddf_list = DividendDetail_master.Get_ddf_list(detailID_hs);

            Bulk_DBcmd bkc = new Bulk_DBcmd();

            foreach (Dividend_Detail_full ddf in ddf_list)
            {
                if (!ddf.Status.Value.StartsWith("Paid", StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }

                long newClaimID = DividendDetail_master.GetNewClaimID(ddf.ClaimID.Value, 5);
                ddf.ClaimID.Value = newClaimID;

                ddf.Override_Custodial_Fees.Value = 0;
                ddf.Override_Fees.Value           = 0;
                ddf.RecordDatePosition.Value      = -ddf.RecordDatePosition.Value;

                ddf.Status.Value = "RECEIVED";
                ddf.Dividend_FilingID.IsNull_flag = true;
                ddf.Dividend_PayID.IsNull_flag    = true;
                ddf.AuditStatus.Value             = "Return of Funds";

                ddf.LastModifiedBy.Value   = Utility.CurrentUser;
                ddf.ModifiedDateTime.Value = DateTime.Now;

                bkc.Add_DBcmd(ddf.Get_DBinsert());
            }
            int count = bkc.SaveToDB(Utility.Get_DRWIN_hDB());

            if (count > 0)
            {
                MessageBox.Show("Add RoF Finished " + count);
            }
            else
            {
                MessageBox.Show("RoF: Nothing was added...");
            }

            return(count);
        }