Beispiel #1
0
        private static SourceInfo ReaderToEntity(YZReader reader)
        {
            reader.Read();
            SourceInfo source = new SourceInfo();

            source.sourceId   = reader.ReadInt32("sourceId");
            source.sourceName = reader.ReadString("sourceName");
            source.sourceType = reader.ReadEnum <SourceTypeEnum>("connectType", SourceTypeEnum.NoType);
            source.sourceStr  = reader.ReadString("sourceStr");
            source.caption    = reader.ReadString("caption");
            source.createTime = reader.ReadDateTime("createTime");
            source.updateTime = reader.ReadDateTime("updateTime");
            source.isvalid    = reader.ReadBool("isvalid", false);
            ConnectInfo connect = new ConnectInfo();

            connect.connectId   = reader.ReadInt32("connectId");
            connect.connectName = reader.ReadString("connectName");
            connect.connectType = reader.ReadEnum <SourceTypeEnum>("connectType", SourceTypeEnum.NoType);
            connect.caption     = reader.ReadString("caption");
            connect.connectStr  = reader.ReadString("connectStr");
            connect.createTime  = reader.ReadDateTime("createTime");
            connect.updateTime  = reader.ReadDateTime("updateTime");
            connect.isvalid     = reader.ReadBool("isvalid", false);
            source.connectInfo  = connect;
            return(source);
        }
Beispiel #2
0
 public File(YZReader reader)
 {
     this.ID         = reader.ReadInt32("ID");
     this.FolderID   = reader.ReadInt32("FolderID");
     this.FileID     = reader.ReadString("FileID");
     this.AddBy      = reader.ReadString("AddBy");
     this.AddAt      = reader.ReadDateTime("AddAt");
     this.Comments   = reader.ReadString("Comments");
     this.Deleted    = reader.ReadBool("Deleted", false);
     this.DeleteBy   = reader.ReadString("DeleteBy");
     this.DeleteAt   = reader.ReadDateTime("DeleteAt");
     this.Recyclebin = reader.ReadBool("Recyclebin", false);
     this.Flag       = reader.ReadString("Flag");
     this.OrderIndex = reader.ReadInt32("OrderIndex");
 }
Beispiel #3
0
 public Device(YZReader reader)
 {
     this.Account     = reader.ReadString("Account");
     this.UUID        = reader.ReadString("UUID");
     this.Name        = reader.ReadString("Name");
     this.Model       = reader.ReadString("Model");
     this.Description = reader.ReadString("Description");
     this.Disabled    = reader.ReadBool("Disabled", false);
     this.RegisterAt  = reader.ReadDateTime("RegisterAt");
     this.LastLogin   = reader.ReadDateTime("LastLogin");
 }
Beispiel #4
0
 public Folder(YZReader reader)
 {
     this.FolderID   = reader.ReadInt32("FolderID");
     this.RootID     = reader.ReadInt32("RootID");
     this.ParentID   = reader.ReadInt32("ParentID");
     this.FolderType = reader.ReadString("FolderType");
     this.Name       = reader.ReadString("Name");
     this.Desc       = reader.ReadString("Desc");
     this.Owner      = reader.ReadString("Owner");
     this.CreateAt   = reader.ReadDateTime("CreateAt");
     this.Deleted    = reader.ReadBool("Deleted", false);
     this.DeleteBy   = reader.ReadString("DeleteBy");
     this.DeleteAt   = reader.ReadDateTime("DeleteAt");
     this.OrderIndex = reader.ReadInt32("OrderIndex");
 }
Beispiel #5
0
 public Group(YZReader reader)
 {
     this.GroupID          = reader.ReadInt32("GroupID");
     this.GroupType        = reader.ReadString("GroupType");
     this.Name             = reader.ReadString("Name");
     this.Desc             = reader.ReadString("Desc");
     this.DocumentFolderID = reader.ReadInt32("DocumentFolderID");
     this.FolderID         = reader.ReadInt32("FolderID");
     this.Owner            = reader.ReadString("Owner");
     this.CreateAt         = reader.ReadDateTime("CreateAt");
     this.ImageFileID      = reader.ReadString("ImageFileID");
     this.Deleted          = reader.ReadBool("Deleted", false);
     this.DeleteBy         = reader.ReadString("DeleteBy");
     this.DeleteAt         = reader.ReadDateTime("DeleteAt");
 }
Beispiel #6
0
 public Library(YZReader reader)
 {
     this.LibID            = reader.ReadInt32("LibID");
     this.LibType          = reader.ReadString("LibType");
     this.Name             = reader.ReadString("Name");
     this.Desc             = reader.ReadString("Desc");
     this.DocumentFolderID = reader.ReadInt32("DocumentFolderID");
     this.FolderID         = reader.ReadInt32("FolderID");
     this.Owner            = reader.ReadString("Owner");
     this.CreateAt         = reader.ReadDateTime("CreateAt");
     this.ImageFileID      = reader.ReadString("ImageFileID");
     this.Deleted          = reader.ReadBool("Deleted", false);
     this.DeleteBy         = reader.ReadString("DeleteBy");
     this.DeleteAt         = reader.ReadDateTime("DeleteAt");
     this.OrderIndex       = reader.ReadInt32("OrderIndex");
 }
Beispiel #7
0
        private static ConnectInfoCollection ReaderToEntityList(YZReader reader)
        {
            ConnectInfoCollection rv = new ConnectInfoCollection();

            while (reader.Read())
            {
                ConnectInfo connect = new ConnectInfo();
                connect.connectId   = reader.ReadInt32("connectId");
                connect.connectName = reader.ReadString("connectName");
                connect.connectType = reader.ReadEnum <SourceTypeEnum>("connectType", SourceTypeEnum.NoType);
                connect.caption     = reader.ReadString("caption");
                connect.connectStr  = reader.ReadString("connectStr");
                connect.createTime  = reader.ReadDateTime("createTime");
                connect.updateTime  = reader.ReadDateTime("updateTime");
                connect.isvalid     = reader.ReadBool("isvalid", false);
                rv.Add(connect);
            }
            return(rv);
        }
Beispiel #8
0
    public static bool ReadBool(IDataReader reader, int index, bool defaultValue)
    {
        YZReader dbr = new YZReader(reader);

        return(dbr.ReadBool(index, defaultValue));
    }