コード例 #1
0
        public void GetRecordData(IDBRecord dbRecord, object oFlag)
        {
            IDBRecord x      = dbRecord;
            Object    oValue = null;

            if (oFlag != null)
            {
                if (oFlag is String)
                {
                    oValue = x[oFlag as String];
                }
                else if (oFlag is Int32)
                {
                    oValue = x[(Int32)oFlag];
                }
                else
                {
                    oValue = x[0];
                }
            }
            else
            {
                oValue = x[0];
            }

            DBValue dbValue = DBValue.Convert(oValue);

            Value = dbValue.GetValue <T>();
        }
コード例 #2
0
        void IDBOperability.GetRecordData(IDBRecord dbRecord, Object oFlag)
        {
            IDBRecord x = dbRecord;

            ID       = DBValue.Convert(x["ID"]);       // 0 Int32
            Guid     = DBValue.Convert(x["Guid"]);     // 1 String
            Name     = DBValue.Convert(x["Name"]);     // 2 String
            Birthday = DBValue.Convert(x["Birthday"]); // 3 DateTime
            Photo    = DBValue.Convert(x["Photo"]);    // 4 Byte[]

            /*
             * ID = DBValue.Convert(x[0]) // ID Int32
             * Guid = DBValue.Convert(x[1]) // Guid String
             * Name = DBValue.Convert(x[2]) // Name String
             * Birthday = DBValue.Convert(x[3]) // Birthday DateTime
             * Photo = DBValue.Convert(x[4]) // Photo Byte[]
             */
        }