private SalesOrderStatusDto LoadDto(SafeSqlDataReader data)
        {
            TimeZoneInfo        currentUserTimeZoneInfo = DalHelpers.GetCurrentUserTimeZoneInfo();
            SalesOrderStatusDto dto = new SalesOrderStatusDto()
            {
                SalesOrderStatusKey = data.GetInt32("SalesOrderStatusKey"),
                CreatedByUserKey    = data.GetInt32("CreatedByUserKey"),
                CreatedByUserId     = data.GetString("CreatedByUserId"),
                CreatedOnDate       = TimeZoneInfo.ConvertTimeFromUtc(data.GetSmartDate("CreatedOnDate"), currentUserTimeZoneInfo),
                ModifiedByUserKey   = data.GetInt32("ModifiedByUserKey"),
                ModifiedByUserId    = data.GetString("ModifiedByUserId"),
                ModifiedOnDate      = TimeZoneInfo.ConvertTimeFromUtc(data.GetSmartDate("ModifiedOnDate"), currentUserTimeZoneInfo),
                Name = data.GetString("Name"),
                SalesOrderStatusId    = data.GetString("SalesOrderStatusId"),
                SalesOrderStatusValue = data.GetInt16("SalesOrderStatusValue"),
            };

            return(dto);
        }
Beispiel #2
0
        private DivisionDto LoadDto(SafeSqlDataReader data)
        {
            TimeZoneInfo currentUserTimeZoneInfo = DalHelpers.GetCurrentUserTimeZoneInfo();
            DivisionDto  dto = new DivisionDto()
            {
                DivisionKey       = data.GetInt32("DivisionKey"),
                CreatedByUserKey  = data.GetInt32("CreatedByUserKey"),
                CreatedByUserId   = data.GetString("CreatedByUserId"),
                CreatedOnDate     = TimeZoneInfo.ConvertTimeFromUtc(data.GetSmartDate("CreatedOnDate"), currentUserTimeZoneInfo),
                DivisionId        = data.GetString("DivisionId"),
                DivisionValue     = data.GetInt32("DivisionValue"),
                ModifiedByUserKey = data.GetInt32("ModifiedByUserKey"),
                ModifiedByUserId  = data.GetString("ModifiedByUserId"),
                ModifiedOnDate    = TimeZoneInfo.ConvertTimeFromUtc(data.GetSmartDate("ModifiedOnDate"), currentUserTimeZoneInfo),
                Name = data.GetString("Name"),
            };

            return(dto);
        }