Beispiel #1
0
        private HashSet <int> Create_dvdIndex_hs()
        {
            this.statusInfo.status = "Create dvdIndex_hs from DTC_Position";

            HashSet <int> dvdIndex_hs = new HashSet <int>();
            DB_select     selt        = new DB_select(BD_DTC_Position.Get_cmdTP());
            DB_reader     reader      = new DB_reader(selt, Utility.Get_DRWIN_hDB());

            while (reader.Read())
            {
                BD_DTC_Position bdp = new BD_DTC_Position();
                bdp.Init_from_reader(reader);

                dvdIndex_hs.Add(bdp.DividendIndex);

                DTC_Participants dp = DTC_Participants_master.Get_DTC_Participants_DTCnum(bdp.DTC_Number);
                bdp.dtcParti = dp;

                this.dtcPos_list.Add(bdp);
                ++this.statusInfo.recordNum;
            }
            reader.Close();

            return(dvdIndex_hs);
        }
Beispiel #2
0
        private void Cal_ClaimShares_ADRS_SUM(Dictionary <int, BD_Dividend> dic)
        {
            this.statusInfo.status = "Calculate ClaimShares_ADRS_SUM";

            DB_select     selt  = new DB_select(BD_detailSum.Get_cmdTP());
            SQL_relation  rela0 = new SQL_relation("Status", RelationalOperator.NotEqual, "REJECTED");
            SQL_relation  rela1 = new SQL_relation("ReceivedDate", RelationalOperator.GreaterThan, "1900-1-1");
            SQL_condition cond0 = new SQL_condition(rela0, ConditionalOperator.And, rela1);
            SQL_relation  rela2 = new SQL_relation("RecordDatePosition", RelationalOperator.GreaterThan, 0);

            selt.SetCondition(new SQL_condition(cond0, ConditionalOperator.And, rela2));

            DB_reader reader = new DB_reader(selt, Utility.Get_DRWIN_hDB());

            int count = 0;

            while (reader.Read())
            {
                BD_detailSum detail = new BD_detailSum();
                detail.Init_from_reader(reader);

                if (!dic.ContainsKey(detail.DividendIndex))
                {
                    continue;
                }

                BD_Dividend dvd = this.dvd_dic[detail.DividendIndex];
                if (!dvd.bdp_dic.ContainsKey(detail.DTC_Number))
                {
                    continue;
                }

                BD_DTC_Position bdp = dvd.bdp_dic[detail.DTC_Number];
                bdp.ClaimShares_ADRS_SUM = detail.ClaimShares_ADRS_SUM;

                ++count;
                ++this.statusInfo.recordNum;
            }
            reader.Close();

            this.statusInfo.additional_info_list.Add("Total BD_detailSum count=" + count);
        }