コード例 #1
0
        /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Hss Entity Framework Auto Generated Code^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/

        public string Get_custodian_fullName()
        {
            Custodian cust = CustodianMaster.GetCustodian_num(this.Custodian_Number.Value);

            if (cust == null)
            {
                return(this.Custodian.Value);
            }
            else
            {
                return(cust.Custodian_FullName.Value);
            }
        }
コード例 #2
0
ファイル: CustodianMaster.cs プロジェクト: huangss0/GTS0
        public static void Init_from_DB()
        {
            if ((DateTime.Now - CustodianMaster.lastUpdateTime).TotalHours < Utility.RefreshInterval)
            {
                return;
            }

            CustodianMaster.Reset();
            DB_select selt   = new DB_select(Custodian.Get_cmdTP());
            DB_reader reader = new DB_reader(selt, Utility.Get_DRWIN_hDB());

            while (reader.Read())
            {
                Custodian cust = new Custodian();
                cust.Init_from_reader(reader);

                CustodianMaster.num_dic[cust.Custodian_Number]            = cust;
                CustodianMaster.full_dic[cust.Custodian_FullName.Value]   = cust;
                CustodianMaster.short_dic[cust.Custodian_ShortName.Value] = cust;
            }
            reader.Close();

            CustodianMaster.lastUpdateTime = DateTime.Now;
        }
コード例 #3
0
ファイル: Custodian.cs プロジェクト: huangss0/GTS0
        public Custodian GetCopy()
        {
            Custodian newEntity = new Custodian();

            if (!this.Custodian_ShortName.IsNull_flag)
            {
                newEntity.Custodian_ShortName.Value = this.Custodian_ShortName.Value;
            }
            if (!this.Custodian_FullName.IsNull_flag)
            {
                newEntity.Custodian_FullName.Value = this.Custodian_FullName.Value;
            }
            if (!this.Account_Number.IsNull_flag)
            {
                newEntity.Account_Number.Value = this.Account_Number.Value;
            }
            if (!this.Safekeeping_Number.IsNull_flag)
            {
                newEntity.Safekeeping_Number.Value = this.Safekeeping_Number.Value;
            }
            if (!this.Language.IsNull_flag)
            {
                newEntity.Language.Value = this.Language.Value;
            }
            if (!this.Country_Code.IsNull_flag)
            {
                newEntity.Country_Code.Value = this.Country_Code.Value;
            }
            if (!this.Title.IsNull_flag)
            {
                newEntity.Title.Value = this.Title.Value;
            }
            if (!this.From_FirstName.IsNull_flag)
            {
                newEntity.From_FirstName.Value = this.From_FirstName.Value;
            }
            if (!this.From_LastName.IsNull_flag)
            {
                newEntity.From_LastName.Value = this.From_LastName.Value;
            }
            if (!this.From_Company.IsNull_flag)
            {
                newEntity.From_Company.Value = this.From_Company.Value;
            }
            if (!this.From_Address1.IsNull_flag)
            {
                newEntity.From_Address1.Value = this.From_Address1.Value;
            }
            if (!this.From_Address2.IsNull_flag)
            {
                newEntity.From_Address2.Value = this.From_Address2.Value;
            }
            if (!this.From_Address3.IsNull_flag)
            {
                newEntity.From_Address3.Value = this.From_Address3.Value;
            }
            if (!this.From_Address4.IsNull_flag)
            {
                newEntity.From_Address4.Value = this.From_Address4.Value;
            }
            if (!this.From_Address5.IsNull_flag)
            {
                newEntity.From_Address5.Value = this.From_Address5.Value;
            }
            if (!this.Telephone.IsNull_flag)
            {
                newEntity.Telephone.Value = this.Telephone.Value;
            }
            if (!this.Fax.IsNull_flag)
            {
                newEntity.Fax.Value = this.Fax.Value;
            }
            if (!this.DefaultCustodianType.IsNull_flag)
            {
                newEntity.DefaultCustodianType.Value = this.DefaultCustodianType.Value;
            }
            if (!this.PrimaryAllowed.IsNull_flag)
            {
                newEntity.PrimaryAllowed.Value = this.PrimaryAllowed.Value;
            }
            if (!this.Tax_Authority.IsNull_flag)
            {
                newEntity.Tax_Authority.Value = this.Tax_Authority.Value;
            }
            if (!this.TA_ATTN.IsNull_flag)
            {
                newEntity.TA_ATTN.Value = this.TA_ATTN.Value;
            }
            if (!this.TA_Address1.IsNull_flag)
            {
                newEntity.TA_Address1.Value = this.TA_Address1.Value;
            }
            if (!this.TA_Address2.IsNull_flag)
            {
                newEntity.TA_Address2.Value = this.TA_Address2.Value;
            }
            if (!this.Custodian_Alias.IsNull_flag)
            {
                newEntity.Custodian_Alias.Value = this.Custodian_Alias.Value;
            }
            if (!this.TA_Phone.IsNull_flag)
            {
                newEntity.TA_Phone.Value = this.TA_Phone.Value;
            }
            if (!this.TA_FAX.IsNull_flag)
            {
                newEntity.TA_FAX.Value = this.TA_FAX.Value;
            }
            if (!this.Custodian_Ref_Number.IsNull_flag)
            {
                newEntity.Custodian_Ref_Number.Value = this.Custodian_Ref_Number.Value;
            }
            if (!this.JPM_Custodian_Ref_Num.IsNull_flag)
            {
                newEntity.JPM_Custodian_Ref_Num.Value = this.JPM_Custodian_Ref_Num.Value;
            }
            return(newEntity);
        }
コード例 #4
0
ファイル: Custodian.cs プロジェクト: huangss0/GTS0
        internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(Custodian.Get_cmdTP());
            if (this.Custodian_ShortName.ValueChanged)
            {
                upd.AddValue("Custodian_ShortName", this.Custodian_ShortName);
            }
            if (this.Custodian_FullName.ValueChanged)
            {
                upd.AddValue("Custodian_FullName", this.Custodian_FullName);
            }
            if (this.Account_Number.ValueChanged)
            {
                upd.AddValue("Account_Number", this.Account_Number);                                  /*Optional 4*/
            }
            if (this.Safekeeping_Number.ValueChanged)
            {
                upd.AddValue("Safekeeping_Number", this.Safekeeping_Number);                                      /*Optional 5*/
            }
            if (this.Language.ValueChanged)
            {
                upd.AddValue("Language", this.Language);                            /*Optional 6*/
            }
            if (this.Country_Code.ValueChanged)
            {
                upd.AddValue("Country_Code", this.Country_Code);                                /*Optional 7*/
            }
            if (this.Title.ValueChanged)
            {
                upd.AddValue("Title", this.Title);                         /*Optional 8*/
            }
            if (this.From_FirstName.ValueChanged)
            {
                upd.AddValue("From_FirstName", this.From_FirstName);                                  /*Optional 9*/
            }
            if (this.From_LastName.ValueChanged)
            {
                upd.AddValue("From_LastName", this.From_LastName);                                 /*Optional 10*/
            }
            if (this.From_Company.ValueChanged)
            {
                upd.AddValue("From_Company", this.From_Company);                                /*Optional 11*/
            }
            if (this.From_Address1.ValueChanged)
            {
                upd.AddValue("From_Address1", this.From_Address1);                                 /*Optional 12*/
            }
            if (this.From_Address2.ValueChanged)
            {
                upd.AddValue("From_Address2", this.From_Address2);                                 /*Optional 13*/
            }
            if (this.From_Address3.ValueChanged)
            {
                upd.AddValue("From_Address3", this.From_Address3);                                 /*Optional 14*/
            }
            if (this.From_Address4.ValueChanged)
            {
                upd.AddValue("From_Address4", this.From_Address4);                                 /*Optional 15*/
            }
            if (this.From_Address5.ValueChanged)
            {
                upd.AddValue("From_Address5", this.From_Address5);                                 /*Optional 16*/
            }
            if (this.Telephone.ValueChanged)
            {
                upd.AddValue("Telephone", this.Telephone);                             /*Optional 17*/
            }
            if (this.Fax.ValueChanged)
            {
                upd.AddValue("Fax", this.Fax);                       /*Optional 18*/
            }
            if (this.DefaultCustodianType.ValueChanged)
            {
                upd.AddValue("DefaultCustodianType", this.DefaultCustodianType);                                        /*Optional 19*/
            }
            if (this.PrimaryAllowed.ValueChanged)
            {
                upd.AddValue("PrimaryAllowed", this.PrimaryAllowed);                                  /*Optional 20*/
            }
            if (this.Tax_Authority.ValueChanged)
            {
                upd.AddValue("Tax_Authority", this.Tax_Authority);                                 /*Optional 21*/
            }
            if (this.TA_ATTN.ValueChanged)
            {
                upd.AddValue("TA_ATTN", this.TA_ATTN);                           /*Optional 22*/
            }
            if (this.TA_Address1.ValueChanged)
            {
                upd.AddValue("TA_Address1", this.TA_Address1);                               /*Optional 23*/
            }
            if (this.TA_Address2.ValueChanged)
            {
                upd.AddValue("TA_Address2", this.TA_Address2);                               /*Optional 24*/
            }
            if (this.Custodian_Alias.ValueChanged)
            {
                upd.AddValue("Custodian_Alias", this.Custodian_Alias);                                   /*Optional 25*/
            }
            if (this.TA_Phone.ValueChanged)
            {
                upd.AddValue("TA_Phone", this.TA_Phone);                            /*Optional 26*/
            }
            if (this.TA_FAX.ValueChanged)
            {
                upd.AddValue("TA_FAX", this.TA_FAX);                          /*Optional 27*/
            }
            if (this.Custodian_Ref_Number.ValueChanged)
            {
                upd.AddValue("Custodian_Ref_Number", this.Custodian_Ref_Number);                                        /*Optional 28*/
            }
            if (this.JPM_Custodian_Ref_Num.ValueChanged)
            {
                upd.AddValue("JPM_Custodian_Ref_Num", this.JPM_Custodian_Ref_Num);                                         /*Optional 29*/
            }
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("Custodian_Number", HssUtility.General.RelationalOperator.Equals, this.pk_ID);
            upd.SetCondition(rela);

            return(upd);
        }
コード例 #5
0
ファイル: Custodian.cs プロジェクト: huangss0/GTS0
        internal HssUtility.SQLserver.DB_insert Get_DBinsert()
        {
            HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(Custodian.Get_cmdTP());

            dbIns.AddValue("Custodian_ShortName", this.Custodian_ShortName);
            dbIns.AddValue("Custodian_FullName", this.Custodian_FullName);
            dbIns.AddValue("Account_Number", this.Account_Number);               /*Optional 4*/
            dbIns.AddValue("Safekeeping_Number", this.Safekeeping_Number);       /*Optional 5*/
            dbIns.AddValue("Language", this.Language);                           /*Optional 6*/
            dbIns.AddValue("Country_Code", this.Country_Code);                   /*Optional 7*/
            dbIns.AddValue("Title", this.Title);                                 /*Optional 8*/
            dbIns.AddValue("From_FirstName", this.From_FirstName);               /*Optional 9*/
            dbIns.AddValue("From_LastName", this.From_LastName);                 /*Optional 10*/
            dbIns.AddValue("From_Company", this.From_Company);                   /*Optional 11*/
            dbIns.AddValue("From_Address1", this.From_Address1);                 /*Optional 12*/
            dbIns.AddValue("From_Address2", this.From_Address2);                 /*Optional 13*/
            dbIns.AddValue("From_Address3", this.From_Address3);                 /*Optional 14*/
            dbIns.AddValue("From_Address4", this.From_Address4);                 /*Optional 15*/
            dbIns.AddValue("From_Address5", this.From_Address5);                 /*Optional 16*/
            dbIns.AddValue("Telephone", this.Telephone);                         /*Optional 17*/
            dbIns.AddValue("Fax", this.Fax);                                     /*Optional 18*/
            dbIns.AddValue("DefaultCustodianType", this.DefaultCustodianType);   /*Optional 19*/
            dbIns.AddValue("PrimaryAllowed", this.PrimaryAllowed);               /*Optional 20*/
            dbIns.AddValue("Tax_Authority", this.Tax_Authority);                 /*Optional 21*/
            dbIns.AddValue("TA_ATTN", this.TA_ATTN);                             /*Optional 22*/
            dbIns.AddValue("TA_Address1", this.TA_Address1);                     /*Optional 23*/
            dbIns.AddValue("TA_Address2", this.TA_Address2);                     /*Optional 24*/
            dbIns.AddValue("Custodian_Alias", this.Custodian_Alias);             /*Optional 25*/
            dbIns.AddValue("TA_Phone", this.TA_Phone);                           /*Optional 26*/
            dbIns.AddValue("TA_FAX", this.TA_FAX);                               /*Optional 27*/
            dbIns.AddValue("Custodian_Ref_Number", this.Custodian_Ref_Number);   /*Optional 28*/
            dbIns.AddValue("JPM_Custodian_Ref_Num", this.JPM_Custodian_Ref_Num); /*Optional 29*/

            return(dbIns);
        }
コード例 #6
0
ファイル: Custodian.cs プロジェクト: huangss0/GTS0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (this.Custodian_Number < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(Custodian.Get_cmdTP());
            db_sel.tableName = "Custodians";
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("Custodian_Number", HssUtility.General.RelationalOperator.Equals, this.Custodian_Number);
            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);
        }