private SalesOrderTypeDto LoadDto(SafeSqlDataReader data) { SalesOrderTypeDto dto = new SalesOrderTypeDto() { SalesOrderTypeKey = data.GetInt32("SalesOrderTypeKey"), CreatedByUserId = data.GetString("CreatedByUserId"), CreatedByUserKey = data.GetInt32("CreatedByUserKey"), CreatedOnDate = data.GetDateTime("CreatedOnDate"), LastChanged = (byte[])data.GetValue("LastChanged"), ModifiedByUserId = data.GetString("ModifiedByUserId"), ModifiedByUserKey = data.GetInt32("ModifiedByUserKey"), ModifiedOnDate = data.GetDateTime("ModifiedOnDate"), Name = data.GetString("Name"), SalesOrderTypeId = data.GetString("SalesOrderTypeId"), SalesOrderTypeValue = data.GetInt16("SalesOrderTypeValue") }; return(dto); }
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); }
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); }
private NavigationDto LoadDto(SafeSqlDataReader data) { NavigationDto dto = new NavigationDto() { NavigationKey = data.GetInt32("NavigationKey"), CreatedByUserId = data.GetString("CreatedByUserId"), CreatedByUserKey = data.GetInt32("CreatedByUserKey"), CreatedOnDate = data.GetDateTime("CreatedOnDate"), HasChildren = data.GetBoolean("HasChildren"), IsPrivilegeRequired = data.GetBoolean("IsPrivilegeRequired"), LastChanged = (byte[])data.GetValue("LastChanged"), ModifiedByUserId = data.GetString("ModifiedByUserId"), ModifiedByUserKey = data.GetInt32("ModifiedByUserKey"), ModifiedOnDate = data.GetDateTime("ModifiedOnDate"), Name = data.GetString("Name"), NavigationId = data.GetString("NavigationId"), NavigationType = data.GetInt32("NavigationType"), ParentNavigationKey = (int?)data.GetValue("ParentNavigationKey"), Sequence = data.GetInt32("Sequence"), SpriteCssClass = data.GetString("SpriteCssClass"), Url = data.GetString("Url") }; if (dto.ParentNavigationKey.HasValue && dto.ParentNavigationKey.Value == 0) { dto.ParentNavigationKey = null; } if (string.IsNullOrEmpty(dto.Url)) { dto.Url = null; } return(dto); }