예제 #1
0
 public void Load(IDataReader reader)
 {
     Id         = DataAccessUtility.LoadInt32(reader, "Id");
     TotalSpent = DataAccessUtility.LoadNullable <int>(reader, "TotalSpent");
     Date       = DataAccessUtility.LoadNullable <DateTime>(reader, "Date");
     Active     = DataAccessUtility.LoadNullable <bool>(reader, "Active");
 }
예제 #2
0
 public void Load(IDataReader reader)
 {
     Id          = DataAccessUtility.LoadInt32(reader, "Id");
     Status      = (DevTaskStatus)DataAccessUtility.LoadInt32(reader, "Status");
     Name        = DataAccessUtility.LoadNullable <string>(reader, "Name");
     Description = DataAccessUtility.LoadNullable <string>(reader, "Description");
 }
 public void Load(IDataReader reader)
 {
     Id              = DataAccessUtility.LoadInt32(reader, "Id");
     UserId          = DataAccessUtility.LoadInt32(reader, "UserId");
     DictionaryKey   = DataAccessUtility.LoadNullable <string>(reader, "dKey");
     DictionaryValue = DataAccessUtility.LoadNullable <string>(reader, "Value");
 }
예제 #4
0
 public void Load(IDataReader reader)
 {
     Id      = DataAccessUtility.LoadInt32(reader, "Id");
     Date    = DataAccessUtility.LoadNullable <DateTime>(reader, "Date");
     Trace   = DataAccessUtility.LoadNullable <string>(reader, "Trace");
     Message = DataAccessUtility.LoadNullable <string>(reader, "Message");
 }
예제 #5
0
 public void Load(IDataReader reader)
 {
     Id = DataAccessUtility.LoadInt32(reader, "Id");
     ElementIdentifier = DataAccessUtility.LoadNullable <string>(reader, "ElementIdentifier");
     CssAttribute      = DataAccessUtility.LoadNullable <string>(reader, "CssAttribute");
     CssValue          = DataAccessUtility.LoadNullable <string>(reader, "CssValue");
 }
예제 #6
0
        public void Load(IDataReader reader)
        {
            Id            = DataAccessUtility.LoadInt32(reader, "Id");
            N1            = DataAccessUtility.LoadInt32(reader, "N1");
            N2            = DataAccessUtility.LoadInt32(reader, "N2");
            N3            = DataAccessUtility.LoadInt32(reader, "N3");
            N4            = DataAccessUtility.LoadInt32(reader, "N4");
            N5            = DataAccessUtility.LoadInt32(reader, "N5");
            N6            = DataAccessUtility.LoadInt32(reader, "N6");
            SpecialNumber = DataAccessUtility.LoadInt32(reader, "S");

            PoleKey             = DataAccessUtility.LoadNullable <string>(reader, "PoleKey");
            PoleDestinationDate = DataAccessUtility.LoadNullable <DateTime>(reader, "PoleDestinationDate");
            CreationDate        = DataAccessUtility.LoadNullable <DateTime>(reader, "CreationDate");

            string wWinsData = DataAccessUtility.LoadNullable <string>(reader, "WinsData");

            if (string.IsNullOrEmpty(wWinsData))
            {
                Wins = new List <LottoWin>();
            }
            else
            {
                Wins = XmlHelper.CreateFromXml <List <LottoWin> >(wWinsData);
            }
        }
예제 #7
0
 public void Load(IDataReader reader)
 {
     Id           = DataAccessUtility.LoadInt32(reader, "Id");
     Name         = DataAccessUtility.LoadNullable <string>(reader, "Name");
     Active       = DataAccessUtility.LoadNullable <bool>(reader, "Active");
     CreationDate = DataAccessUtility.LoadNullable <DateTime>(reader, "CreationDate");
     Description  = DataAccessUtility.LoadNullable <string>(reader, "Description");
 }
 public void Load(IDataReader reader)
 {
     Id         = DataAccessUtility.LoadInt32(reader, "Id");
     Active     = DataAccessUtility.LoadNullable <bool>(reader, "Active");
     CategoryId = DataAccessUtility.LoadNullable <int?>(reader, "CategoryId");
     LastBought = DataAccessUtility.LoadNullable <DateTime?>(reader, "LastBought");
     Name       = DataAccessUtility.LoadNullable <string>(reader, "Name");
 }
 public void Load(IDataReader reader)
 {
     Id          = DataAccessUtility.LoadInt32(reader, "Id");
     TotalSpent  = DataAccessUtility.LoadNullable <int>(reader, "TotalSpent");
     Date        = DataAccessUtility.LoadNullable <DateTime>(reader, "Date");
     Description = DataAccessUtility.LoadNullable <string>(reader, "Description");
     UserGroupId = DataAccessUtility.LoadInt32(reader, "UserGroupId");
 }
예제 #10
0
 public void Load(IDataReader reader)
 {
     Id              = DataAccessUtility.LoadInt32(reader, "Id");
     XiFile          = (XuiFile)DataAccessUtility.LoadInt32(reader, "XuiFile");
     PrevText        = DataAccessUtility.LoadNullable <string>(reader, "PrevText");
     NewText         = DataAccessUtility.LoadNullable <string>(reader, "NewText");
     DestinationPath = DataAccessUtility.LoadNullable <string>(reader, "DestinationPath");
     Date            = DataAccessUtility.LoadNullable <DateTime>(reader, "Date");
 }
예제 #11
0
 public void Load(IDataReader reader)
 {
     Amount      = DataAccessUtility.LoadNullable <int>(reader, "Amount");
     Closed      = DataAccessUtility.LoadNullable <bool>(reader, "Closed");
     Id          = DataAccessUtility.LoadInt32(reader, "Id");
     TemplateId  = DataAccessUtility.LoadInt32(reader, "TemplateId");
     Month       = DataAccessUtility.LoadNullable <DateTime>(reader, "Month");
     UserGroupId = DataAccessUtility.LoadInt32(reader, "UserGroupId");
 }
 public static void SetFromDbXmlField<T>(this IDataReader reader,object obj, string dbFieldName, PropertyInfo pinfo)
 {
     if (pinfo != null)
     {
         var xmlData = DataAccessUtility.LoadNullable<string>(reader, dbFieldName);
         if (xmlData.NotEmpty())
             pinfo.SetValue(obj, XmlHelper.CreateFromXml<T>(xmlData));
         else
             pinfo.SetValue(obj, Activator.CreateInstance<T>());
     }
 }
예제 #13
0
 public void Load(IDataReader reader)
 {
     TransactionType = (MonthlyTransactionType)DataAccessUtility.LoadInt32(reader, "TransactionType");
     Amount          = DataAccessUtility.LoadNullable <int>(reader, "Amount");
     Name            = DataAccessUtility.LoadNullable <string>(reader, "Name");
     Id          = DataAccessUtility.LoadInt32(reader, "Id");
     Active      = DataAccessUtility.LoadNullable <bool>(reader, "Active");
     Auto        = DataAccessUtility.LoadNullable <bool>(reader, "Auto");
     UserGroupId = DataAccessUtility.LoadInt32(reader, "UserGroupId");
     FromDate    = DataAccessUtility.LoadNullable <DateTime>(reader, "FromDate");
     ToDate      = DataAccessUtility.LoadNullable <DateTime?>(reader, "ToDate");
 }
예제 #14
0
        public void Load(IDataReader reader)
        {
            Id           = DataAccessUtility.LoadInt32(reader, "Id");
            Artist       = DataAccessUtility.LoadNullable <string>(reader, "Artist");
            FullFileName = DataAccessUtility.LoadNullable <string>(reader, "FullFileName");
            FileName     = DataAccessUtility.LoadNullable <string>(reader, "FileName");
            Title        = DataAccessUtility.LoadNullable <string>(reader, "Title");
            MachineName  = DataAccessUtility.LoadNullable <string>(reader, "MachineName");

            //ToUsb = DataAccessUtility.LoadNullable<bool?>(reader, "ToUsb");
            //ToPlaylist = DataAccessUtility.LoadNullable<bool?>(reader, "ToPlaylist");
        }
        public void Load(IDataReader reader)
        {
            Id           = DataAccessUtility.LoadInt32(reader, "Id");
            UserId       = DataAccessUtility.LoadInt32(reader, "UserId");
            Shared       = DataAccessUtility.LoadNullable <bool>(reader, "Shared");
            CreationDate = DataAccessUtility.LoadNullable <DateTime>(reader, "CreationDate");
            Date         = DataAccessUtility.LoadNullable <DateTime>(reader, "Date");
            Description  = DataAccessUtility.LoadNullable <string>(reader, "Description");
            title        = DataAccessUtility.LoadNullable <string>(reader, "title");
            var rEvery = DataAccessUtility.LoadNullable <int?>(reader, "RepeatEvery");

            if (rEvery.HasValue)
            {
                RepeatEvery = (RepeatEvery)rEvery.Value;
            }
        }
예제 #16
0
        public void Load(IDataReader reader)
        {
            Id          = DataAccessUtility.LoadInt32(reader, "Id");
            UserName    = DataAccessUtility.LoadNullable <string>(reader, "UserName");
            Password    = DataAccessUtility.LoadNullable <string>(reader, "Password");
            DisplayName = DataAccessUtility.LoadNullable <string>(reader, "DisplayName");
            EmailAdress = DataAccessUtility.LoadNullable <string>(reader, "EmailAdress");
            string cper = DataAccessUtility.LoadNullable <string>(reader, "AllowedClientPagePermissions");

            if (string.IsNullOrEmpty(cper))
            {
                AllowedClientPagePermissions = new List <ClientPagePermissions>();
            }
            else
            {
                AllowedClientPagePermissions = XmlHelper.CreateFromXml <List <ClientPagePermissions> >(cper);
            }
        }
예제 #17
0
        public void Load(IDataReader reader)
        {
            Id = DataAccessUtility.LoadInt32(reader, "Id");

            CreationDate = DataAccessUtility.LoadNullable <DateTime>(reader, "CreationDate");
            UpdateDate   = DataAccessUtility.LoadNullable <DateTime?>(reader, "UpdateDate");
            Active       = DataAccessUtility.LoadNullable <bool>(reader, "Active");
            Description  = DataAccessUtility.LoadNullable <string>(reader, "Description");

            var props = GetType().GetProperties();

            foreach (var pinfo in props)
            {
                var genericDataField = ((GenericDataFieldAttribute[])pinfo.GetCustomAttributes(typeof(GenericDataFieldAttribute), true)).FirstOrDefault();
                if (genericDataField != null)
                {
                    var dbValue = DataAccessUtility.LoadNullable <string>(reader, genericDataField.FieldName);
                    pinfo.SetValue(this, dbValue ?? string.Empty);
                }
            }
        }
        public void Load(IDataReader reader)
        {
            Id     = DataAccessUtility.LoadInt32(reader, "Id");
            Month  = DataAccessUtility.LoadNullable <DateTime>(reader, "Month");
            Active = DataAccessUtility.LoadNullable <bool>(reader, "Active");
            var currentMonthTotal = DataAccessUtility.LoadNullable <string>(reader, "CurrentMonthTotal");

            if (currentMonthTotal.IsEmpty())
            {
                CurrentMonthTotal = new WorkTime();
            }
            else
            {
                CurrentMonthTotal = XmlHelper.CreateFromXml <WorkTime>(currentMonthTotal);
            }

            var cfs = DataAccessUtility.LoadNullable <string>(reader, "CurrentShiftStart");

            if (cfs.IsEmpty())
            {
                CurrentShiftStart = new WorkTime();
            }
            else
            {
                CurrentShiftStart = XmlHelper.CreateFromXml <WorkTime>(cfs);
            }

            var cfe = DataAccessUtility.LoadNullable <string>(reader, "CurrentShiftEnd");

            if (cfe.IsEmpty())
            {
                CurrentShiftEnd = new WorkTime();
            }
            else
            {
                CurrentShiftEnd = XmlHelper.CreateFromXml <WorkTime>(cfe);
            }
        }
예제 #19
0
 public void Load(IDataReader reader)
 {
     Id       = DataAccessUtility.LoadInt32(reader, "Id");
     UserName = DataAccessUtility.LoadNullable <string>(reader, "UserName");
     //Description = DataAccessUtility.LoadNullable<string>(reader, "Description");
 }
예제 #20
0
 public void Load(IDataReader reader)
 {
     Id       = DataAccessUtility.LoadInt32(reader, "Id");
     Password = DataAccessUtility.LoadNullable <string>(reader, "Password");
     UserName = DataAccessUtility.LoadNullable <string>(reader, "UserName");
 }
예제 #21
0
 public void Load(IDataReader reader)
 {
     Id     = DataAccessUtility.LoadInt32(reader, "Id");
     Amount = DataAccessUtility.LoadInt32(reader, "Payment");
     Name   = DataAccessUtility.LoadNullable <string>(reader, "GuestName");
 }
예제 #22
0
 public void Load(IDataReader reader)
 {
     Id   = DataAccessUtility.LoadInt32(reader, "Id");
     Name = DataAccessUtility.LoadNullable <string>(reader, "Name");
 }
예제 #23
0
 public void Load(IDataReader reader)
 {
     Id         = DataAccessUtility.LoadInt32(reader, "Id");
     Date       = DataAccessUtility.LoadNullable <DateTime>(reader, "Date");
     DaylyShift = (ShiftTime)DataAccessUtility.LoadInt32(reader, "DaylyShift");
 }