Exemplo n.º 1
0
        internal HssUtility.SQLserver.DB_insert Get_DBinsert()
        {
            HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(DividendCustodian.Get_cmdTP());

            dbIns.AddValue("Custodian_Number", this.Custodian_Number);/*Optional 2*/
            dbIns.AddValue("DividendIndex", this.DividendIndex.Value);
            dbIns.AddValue("Custodian", this.Custodian.Value);
            dbIns.AddValue("Custodian_Reported", this.Custodian_Reported);                   /*Optional 5*/
            dbIns.AddValue("Custodian_Paid", this.Custodian_Paid);                           /*Optional 6*/
            dbIns.AddValue("FavAtSourceADRs", this.FavAtSourceADRs);                         /*Optional 7*/
            dbIns.AddValue("ExemptAtSourceADRs", this.ExemptAtSourceADRs);                   /*Optional 8*/
            dbIns.AddValue("FavTransparentEntityADRs", this.FavTransparentEntityADRs);       /*Optional 9*/
            dbIns.AddValue("Custodian_Chargeback", this.Custodian_Chargeback);               /*Optional 10*/
            dbIns.AddValue("SafeKeeping_AccountNum", this.SafeKeeping_AccountNum);           /*Optional 11*/
            dbIns.AddValue("Cash_Account_Number", this.Cash_Account_Number);                 /*Optional 12*/
            dbIns.AddValue("Custodial_Fees", this.Custodial_Fees);                           /*Optional 13*/
            dbIns.AddValue("AtSourceFeePerShare", this.AtSourceFeePerShare.Value);
            dbIns.AddValue("Custodian_Type", this.Custodian_Type);                           /*Optional 15*/
            dbIns.AddValue("Depositary", this.Depositary);                                   /*Optional 16*/
            dbIns.AddValue("Currency", this.Currency);                                       /*Optional 17*/
            dbIns.AddValue("Base", this.Base);                                               /*Optional 18*/
            dbIns.AddValue("Custodial_Percent", this.Custodial_Percent);                     /*Optional 19*/
            dbIns.AddValue("Maximum_Fees", this.Maximum_Fees);                               /*Optional 20*/
            dbIns.AddValue("Minimum_Fees", this.Minimum_Fees);                               /*Optional 21*/
            dbIns.AddValue("Contact_Name", this.Contact_Name);                               /*Optional 22*/
            dbIns.AddValue("Reference_Number", this.Reference_Number);                       /*Optional 23*/
            dbIns.AddValue("Address1", this.Address1);                                       /*Optional 24*/
            dbIns.AddValue("Address2", this.Address2);                                       /*Optional 25*/
            dbIns.AddValue("State", this.State);                                             /*Optional 26*/
            dbIns.AddValue("City", this.City);                                               /*Optional 27*/
            dbIns.AddValue("Zip", this.Zip);                                                 /*Optional 28*/
            dbIns.AddValue("Comments", this.Comments);                                       /*Optional 29*/
            dbIns.AddValue("Email", this.Email);                                             /*Optional 30*/
            dbIns.AddValue("Fax", this.Fax);                                                 /*Optional 31*/
            dbIns.AddValue("Phone", this.Phone);                                             /*Optional 32*/
            dbIns.AddValue("Country", this.Country);                                         /*Optional 33*/
            dbIns.AddValue("Primary_Contact", this.Primary_Contact);                         /*Optional 34*/
            dbIns.AddValue("MasterFile", this.MasterFile);                                   /*Optional 35*/
            dbIns.AddValue("PDFFile", this.PDFFile);                                         /*Optional 36*/
            dbIns.AddValue("Paid_And_Locked", this.Paid_And_Locked.Value);
            dbIns.AddValue("Paid_And_Locked_DateTime", this.Paid_And_Locked_DateTime);       /*Optional 38*/
            dbIns.AddValue("LastModifiedBy", this.LastModifiedBy);                           /*Optional 39*/
            dbIns.AddValue("Billed_Date", this.Billed_Date);                                 /*Optional 40*/
            dbIns.AddValue("Paid_Date_Actual", this.Paid_Date_Actual);                       /*Optional 41*/
            dbIns.AddValue("JPResidenceAtSourceADRs", this.JPResidenceAtSourceADRs);         /*Optional 42*/
            dbIns.AddValue("PSAFE", this.PSAFE);                                             /*Optional 43*/
            dbIns.AddValue("Election_Version", this.Election_Version);                       /*Optional 44*/
            dbIns.AddValue("FavAtSourceADRs_RSH_Exclude", this.FavAtSourceADRs_RSH_Exclude); /*Optional 45*/
            dbIns.AddValue("WriteOff", this.WriteOff);                                       /*Optional 46*/
            dbIns.AddValue("AffiliateRebate", this.AffiliateRebate);                         /*Optional 47*/
            dbIns.AddValue("ModifiedDateTime", this.ModifiedDateTime);                       /*Optional 48*/
            dbIns.AddValue("Custodial_FeeID", this.Custodial_FeeID);                         /*Optional 49*/
            dbIns.AddValue("FeeType", this.FeeType);                                         /*Optional 50*/
            dbIns.AddValue("FavAtSourceADRs_Detail", this.FavAtSourceADRs_Detail);           /*Optional 51*/
            dbIns.AddValue("RSH_Email_TimeStamp", this.RSH_Email_TimeStamp);                 /*Optional 52*/
            dbIns.AddValue("Bal_Email_TimeStamp", this.Bal_Email_TimeStamp);                 /*Optional 53*/
            dbIns.AddValue("CreatedDateTime", this.CreatedDateTime);                         /*Optional 54*/
            dbIns.AddValue("XBRL_ReferenceNumber", this.XBRL_ReferenceNumber);               /*Optional 55*/

            return(dbIns);
        }
Exemplo n.º 2
0
        internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(DividendCustodian.Get_cmdTP());
            if (this.Custodian_Number.ValueChanged)
            {
                upd.AddValue("Custodian_Number", this.Custodian_Number);
            }
            if (this.DividendIndex.ValueChanged)
            {
                upd.AddValue("DividendIndex", this.DividendIndex);
            }
            if (this.Custodian.ValueChanged)
            {
                upd.AddValue("Custodian", this.Custodian);
            }
            if (this.Custodian_Reported.ValueChanged)
            {
                upd.AddValue("Custodian_Reported", this.Custodian_Reported);
            }
            if (this.Custodian_Paid.ValueChanged)
            {
                upd.AddValue("Custodian_Paid", this.Custodian_Paid);
            }
            if (this.FavAtSourceADRs.ValueChanged)
            {
                upd.AddValue("FavAtSourceADRs", this.FavAtSourceADRs);
            }
            if (this.ExemptAtSourceADRs.ValueChanged)
            {
                upd.AddValue("ExemptAtSourceADRs", this.ExemptAtSourceADRs);
            }
            if (this.FavTransparentEntityADRs.ValueChanged)
            {
                upd.AddValue("FavTransparentEntityADRs", this.FavTransparentEntityADRs);
            }
            if (this.Custodian_Chargeback.ValueChanged)
            {
                upd.AddValue("Custodian_Chargeback", this.Custodian_Chargeback);
            }
            if (this.SafeKeeping_AccountNum.ValueChanged)
            {
                upd.AddValue("SafeKeeping_AccountNum", this.SafeKeeping_AccountNum);
            }
            if (this.Cash_Account_Number.ValueChanged)
            {
                upd.AddValue("Cash_Account_Number", this.Cash_Account_Number);
            }
            if (this.Custodial_Fees.ValueChanged)
            {
                upd.AddValue("Custodial_Fees", this.Custodial_Fees);
            }
            if (this.AtSourceFeePerShare.ValueChanged)
            {
                upd.AddValue("AtSourceFeePerShare", this.AtSourceFeePerShare);
            }
            if (this.Custodian_Type.ValueChanged)
            {
                upd.AddValue("Custodian_Type", this.Custodian_Type);
            }
            if (this.Depositary.ValueChanged)
            {
                upd.AddValue("Depositary", this.Depositary);
            }
            if (this.Currency.ValueChanged)
            {
                upd.AddValue("Currency", this.Currency);
            }
            if (this.Base.ValueChanged)
            {
                upd.AddValue("Base", this.Base);
            }
            if (this.Custodial_Percent.ValueChanged)
            {
                upd.AddValue("Custodial_Percent", this.Custodial_Percent);
            }
            if (this.Maximum_Fees.ValueChanged)
            {
                upd.AddValue("Maximum_Fees", this.Maximum_Fees);
            }
            if (this.Minimum_Fees.ValueChanged)
            {
                upd.AddValue("Minimum_Fees", this.Minimum_Fees);
            }
            if (this.Contact_Name.ValueChanged)
            {
                upd.AddValue("Contact_Name", this.Contact_Name);
            }
            if (this.Reference_Number.ValueChanged)
            {
                upd.AddValue("Reference_Number", this.Reference_Number);
            }
            if (this.Address1.ValueChanged)
            {
                upd.AddValue("Address1", this.Address1);
            }
            if (this.Address2.ValueChanged)
            {
                upd.AddValue("Address2", this.Address2);
            }
            if (this.State.ValueChanged)
            {
                upd.AddValue("State", this.State);
            }
            if (this.City.ValueChanged)
            {
                upd.AddValue("City", this.City);
            }
            if (this.Zip.ValueChanged)
            {
                upd.AddValue("Zip", this.Zip);
            }
            if (this.Comments.ValueChanged)
            {
                upd.AddValue("Comments", this.Comments);
            }
            if (this.Email.ValueChanged)
            {
                upd.AddValue("Email", this.Email);
            }
            if (this.Fax.ValueChanged)
            {
                upd.AddValue("Fax", this.Fax);
            }
            if (this.Phone.ValueChanged)
            {
                upd.AddValue("Phone", this.Phone);
            }
            if (this.Country.ValueChanged)
            {
                upd.AddValue("Country", this.Country);
            }
            if (this.Primary_Contact.ValueChanged)
            {
                upd.AddValue("Primary_Contact", this.Primary_Contact);
            }
            if (this.MasterFile.ValueChanged)
            {
                upd.AddValue("MasterFile", this.MasterFile);
            }
            if (this.PDFFile.ValueChanged)
            {
                upd.AddValue("PDFFile", this.PDFFile);
            }
            if (this.Paid_And_Locked.ValueChanged)
            {
                upd.AddValue("Paid_And_Locked", this.Paid_And_Locked);
            }
            if (this.Paid_And_Locked_DateTime.ValueChanged)
            {
                upd.AddValue("Paid_And_Locked_DateTime", this.Paid_And_Locked_DateTime);
            }
            if (this.LastModifiedBy.ValueChanged)
            {
                upd.AddValue("LastModifiedBy", this.LastModifiedBy);
            }
            if (this.Billed_Date.ValueChanged)
            {
                upd.AddValue("Billed_Date", this.Billed_Date);
            }
            if (this.Paid_Date_Actual.ValueChanged)
            {
                upd.AddValue("Paid_Date_Actual", this.Paid_Date_Actual);
            }
            if (this.JPResidenceAtSourceADRs.ValueChanged)
            {
                upd.AddValue("JPResidenceAtSourceADRs", this.JPResidenceAtSourceADRs);
            }
            if (this.PSAFE.ValueChanged)
            {
                upd.AddValue("PSAFE", this.PSAFE);
            }
            if (this.Election_Version.ValueChanged)
            {
                upd.AddValue("Election_Version", this.Election_Version);
            }
            if (this.FavAtSourceADRs_RSH_Exclude.ValueChanged)
            {
                upd.AddValue("FavAtSourceADRs_RSH_Exclude", this.FavAtSourceADRs_RSH_Exclude);
            }
            if (this.WriteOff.ValueChanged)
            {
                upd.AddValue("WriteOff", this.WriteOff);
            }
            if (this.AffiliateRebate.ValueChanged)
            {
                upd.AddValue("AffiliateRebate", this.AffiliateRebate);
            }
            if (this.ModifiedDateTime.ValueChanged)
            {
                upd.AddValue("ModifiedDateTime", this.ModifiedDateTime);
            }
            if (this.Custodial_FeeID.ValueChanged)
            {
                upd.AddValue("Custodial_FeeID", this.Custodial_FeeID);
            }
            if (this.FeeType.ValueChanged)
            {
                upd.AddValue("FeeType", this.FeeType);
            }
            if (this.FavAtSourceADRs_Detail.ValueChanged)
            {
                upd.AddValue("FavAtSourceADRs_Detail", this.FavAtSourceADRs_Detail);
            }
            if (this.RSH_Email_TimeStamp.ValueChanged)
            {
                upd.AddValue("RSH_Email_TimeStamp", this.RSH_Email_TimeStamp);
            }
            if (this.Bal_Email_TimeStamp.ValueChanged)
            {
                upd.AddValue("Bal_Email_TimeStamp", this.Bal_Email_TimeStamp);
            }
            if (this.CreatedDateTime.ValueChanged)
            {
                upd.AddValue("CreatedDateTime", this.CreatedDateTime);
            }
            if (this.XBRL_ReferenceNumber.ValueChanged)
            {
                upd.AddValue("XBRL_ReferenceNumber", this.XBRL_ReferenceNumber);
            }

            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("CustodianID", HssUtility.General.RelationalOperator.Equals, this.pk_ID);
            upd.SetCondition(rela);

            return(upd);
        }
Exemplo n.º 3
0
        public bool Init_from_DB()
        {
            if (this.CustodianID < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(DividendCustodian.Get_cmdTP());
            db_sel.tableName = "Dividend_Custodian";
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("CustodianID", HssUtility.General.RelationalOperator.Equals, this.CustodianID);
            db_sel.SetCondition(rela);

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_DRWIN_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }