Exemple #1
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);
        }
Exemple #2
0
        public int Update_to_DB()
        {
            int count = 0;

            if (Utility.Is_DWRIN_admin())
            {
                Helper_SQLserver.AllTrigers("Dividend_Detail", false, Utility.Get_DRWIN_hDB());
            }
            foreach (DvdCustodian_AP_count dcAP in this.APcount_dic.Values)
            {
                count += dcAP.Update_to_DB();
            }
            if (Utility.Is_DWRIN_admin())
            {
                Helper_SQLserver.AllTrigers("Dividend_Detail", true, Utility.Get_DRWIN_hDB());
            }
            return(count);
        }