Ejemplo n.º 1
0
        private static void Init_groupMember_dic()
        {
            DB_select selt   = new DB_select(ADR_Group_Member.Get_cmdTP());
            DB_reader reader = new DB_reader(selt, Utility.Get_DRWIN_hDB());

            while (reader.Read())
            {
                ADR_Group_Member agm = new ADR_Group_Member();
                agm.Init_from_reader(reader);

                TaskMemberMaster.groupMember_dic[agm.OwnerSID.Value] = agm;
            }
            reader.Close();
        }
Ejemplo n.º 2
0
        public ADR_Group_Member GetCopy()
        {
            ADR_Group_Member newEntity = new ADR_Group_Member();

            if (!this.GroupID.IsNull_flag)
            {
                newEntity.GroupID.Value = this.GroupID.Value;
            }
            if (!this.OwnerSID.IsNull_flag)
            {
                newEntity.OwnerSID.Value = this.OwnerSID.Value;
            }
            return(newEntity);
        }
Ejemplo n.º 3
0
        internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(ADR_Group_Member.Get_cmdTP());
            if (this.GroupID.ValueChanged)
            {
                upd.AddValue("GroupID", this.GroupID);
            }
            if (this.OwnerSID.ValueChanged)
            {
                upd.AddValue("OwnerSID", this.OwnerSID);
            }

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

            return(upd);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (this.ID < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(ADR_Group_Member.Get_cmdTP());
            db_sel.tableName = "ADR_Group_Member";
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("ID", HssUtility.General.RelationalOperator.Equals, this.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);
        }
Ejemplo n.º 5
0
        internal HssUtility.SQLserver.DB_insert Get_DBinsert()
        {
            HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(ADR_Group_Member.Get_cmdTP());

            dbIns.AddValue("GroupID", this.GroupID.Value);
            dbIns.AddValue("OwnerSID", this.OwnerSID.Value);

            return(dbIns);
        }