コード例 #1
0
        public bool Init_from_DB()
        {
            if (this.depositary_idemnification_id < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(DepositaryIdemnification.Get_cmdTP());
            db_sel.tableName = "DepositaryIdemnification";
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("depositary_idemnification_id", HssUtility.General.RelationalOperator.Equals, this.depositary_idemnification_id);
            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);
        }
コード例 #2
0
 internal HssUtility.SQLserver.DB_insert Get_DBinsert()
 {
     HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(DepositaryIdemnification.Get_cmdTP());
     dbIns.AddValue("depositary_info_id", this.depositary_info_id.Value);
     dbIns.AddValue("language_id", this.language_id.Value);
     dbIns.AddValue("idemnification", this.idemnification.Value);
     dbIns.AddValue("idemnification2", this.idemnification2.Value);
     dbIns.AddValue("idemnification_di", this.idemnification_di.Value);
     dbIns.AddValue("idemnification2_di", this.idemnification2_di.Value);
     dbIns.AddValue("idemnification_russia", this.idemnification_russia.Value);/*Optional 8*/
     return(dbIns);
 }