internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(Dividend_Detail_full.Get_cmdTP());
            if (this.DTC_Number.ValueChanged)
            {
                upd.AddValue("DTC_Number", this.DTC_Number);
            }
            if (this.CustodianID.ValueChanged)
            {
                upd.AddValue("CustodianID", this.CustodianID);                               /*Optional 25*/
            }
            if (this.Status.ValueChanged)
            {
                upd.AddValue("Status", this.Status);                          /*Optional 27*/
            }
            if (this.RecordDatePosition.ValueChanged)
            {
                upd.AddValue("RecordDatePosition", this.RecordDatePosition);                                      /*Optional 30*/
            }
            if (this.Dividend_FilingID.ValueChanged)
            {
                upd.AddValue("Dividend_FilingID", this.Dividend_FilingID);                                     /*Optional 37*/
            }
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("DetailID", HssUtility.General.RelationalOperator.Equals, this.pk_ID);
            upd.SetCondition(rela);

            return(upd);
        }
Example #2
0
        public int Delete_CustodianID_dvdDetail(string reclaimFeeType)
        {
            DB_update upd = new DB_update(Dividend_Detail_full.Get_cmdTP());

            upd.AddNull("CustodianID");

            SQL_relation rela0 = new SQL_relation("DividendIndex", RelationalOperator.Equals, this.DividendIndex);

            if (string.IsNullOrEmpty(reclaimFeeType))
            {
                upd.SetCondition(rela0);
            }
            else
            {
                SQL_relation  rela1 = new SQL_relation("ReclaimFeesType", RelationalOperator.Equals, reclaimFeeType);
                SQL_condition cond  = new SQL_condition(rela0, ConditionalOperator.And, rela1);
                upd.SetCondition(cond);
            }

            Helper_SQLserver.AllTrigers("Dividend_Detail", false, Utility.Get_DRWIN_hDB());
            int count = upd.SaveToDB(Utility.Get_DRWIN_hDB());

            Helper_SQLserver.AllTrigers("Dividend_Detail", true, Utility.Get_DRWIN_hDB());

            return(count);
        }
Example #3
0
        internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(Dividend_Detail_full.Get_cmdTP());
            //if (this.DividendIndex.ValueChanged) upd.AddValue("DividendIndex", this.DividendIndex);
            if (this.DTC_Number.ValueChanged)
            {
                upd.AddValue("DTC_Number", this.DTC_Number);
            }
            //if (this.Depositary.ValueChanged) upd.AddValue("Depositary", this.Depositary);/*Optional 10*/
            if (this.BO_COR.ValueChanged)
            {
                upd.AddValue("BO_COR", this.BO_COR);                          /*Optional 18*/
            }
            if (this.BO_EntityType.ValueChanged)
            {
                upd.AddValue("BO_EntityType", this.BO_EntityType);                                 /*Optional 19*/
            }
            if (this.ReclaimRate.ValueChanged)
            {
                upd.AddValue("ReclaimRate", this.ReclaimRate);                               /*Optional 22*/
            }
            if (this.CustodianID.ValueChanged)
            {
                upd.AddValue("CustodianID", this.CustodianID);                               /*Optional 25*/
            }
            if (this.Status.ValueChanged)
            {
                upd.AddValue("Status", this.Status);                          /*Optional 27*/
            }
            if (this.RecordDatePosition.ValueChanged)
            {
                upd.AddValue("RecordDatePosition", this.RecordDatePosition);                                      /*Optional 30*/
            }
            if (this.ReclaimFeesType.ValueChanged)
            {
                upd.AddValue("ReclaimFeesType", this.ReclaimFeesType);                                   /*Optional 41*/
            }
            if (this.PaidViaDTCC.ValueChanged)
            {
                upd.AddValue("PaidViaDTCC", this.PaidViaDTCC);                               /*Optional 120*/
            }
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("DetailID", HssUtility.General.RelationalOperator.Equals, this.pk_ID);
            upd.SetCondition(rela);

            return(upd);
        }
Example #4
0
        public static List <Dividend_Detail_full> Get_ddf_list(HashSet <int> detailID_hs)
        {
            List <Dividend_Detail_full> ddf_list = new List <Dividend_Detail_full>();

            if (detailID_hs == null)
            {
                return(ddf_list);
            }

            DB_select selt = new DB_select(Dividend_Detail_full.Get_cmdTP());

            selt.SetCondition(new SQL_relation("DetailID", true, detailID_hs));

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

            while (reader.Read())
            {
                Dividend_Detail_full ddf = new Dividend_Detail_full();
                ddf.Init_from_reader(reader);
                ddf_list.Add(ddf);
            }

            return(ddf_list);
        }
Example #5
0
        internal HssUtility.SQLserver.DB_insert Get_DBinsert()
        {
            HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(Dividend_Detail_full.Get_cmdTP());

            //dbIns.AddValue("DividendIndex", this.DividendIndex.Value);
            dbIns.AddValue("DTC_Number", this.DTC_Number.Value);
            //dbIns.AddValue("Depositary", this.Depositary);/*Optional 10*/
            dbIns.AddValue("BO_COR", this.BO_COR);                         /*Optional 18*/
            dbIns.AddValue("BO_EntityType", this.BO_EntityType);           /*Optional 19*/
            dbIns.AddValue("ReclaimRate", this.ReclaimRate);               /*Optional 22*/
            dbIns.AddValue("CustodianID", this.CustodianID);               /*Optional 25*/
            dbIns.AddValue("Status", this.Status);                         /*Optional 27*/
            dbIns.AddValue("RecordDatePosition", this.RecordDatePosition); /*Optional 30*/
            dbIns.AddValue("ReclaimFeesType", this.ReclaimFeesType);       /*Optional 41*/
            dbIns.AddValue("PaidViaDTCC", this.PaidViaDTCC);               /*Optional 120*/

            return(dbIns);
        }
        internal HssUtility.SQLserver.DB_insert Get_DBinsert()
        {
            HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(Dividend_Detail_full.Get_cmdTP());

            dbIns.AddValue("DTC_Number", this.DTC_Number.Value);
            dbIns.AddValue("Status", this.Status);                         /*Optional 27*/
            dbIns.AddValue("RecordDatePosition", this.RecordDatePosition); /*Optional 30*/
            dbIns.AddValue("Dividend_FilingID", this.Dividend_FilingID);   /*Optional 37*/

            return(dbIns);
        }