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); }
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); }