public metadataTransactionType Create(DTO.MetaDataTransactionTypesDTO dto) { metadataTransactionType Trans = new metadataTransactionType(); Trans.ID = dto.ID; Trans.IsActive = dto.IsActive; Trans.Name = dto.Name; Trans.Identifier = dto.Identifier; Trans.SequenceNo = dto.SequenceNo; return(Trans); }
public DTO.MetaDataTransactionTypesDTO Parse(metadataTransactionType Trans) { DTO.MetaDataTransactionTypesDTO dto = new DTO.MetaDataTransactionTypesDTO(); dto.ID = Trans.ID; dto.IsActive = Trans.IsActive; dto.Name = Trans.Name; dto.Identifier = Trans.Identifier; dto.SequenceNo = Trans.SequenceNo; return(dto); }
protected override void Seed(NomEntities context) { GetBidUpImdicator().ForEach(c => context.BidUpIndicators.Add(c)); GetCapacityTypeIndicator().ForEach(c => context.metadataCapacityTypeIndicator.Add(c)); GetCycle().ForEach(c => context.metadataCycle.Add(c)); GetExportDeclaration().ForEach(c => context.metadataExportDeclaration.Add(c)); // GetFileStatus().ForEach(c => context.metadataFileStatu.Add(c)); GetQuantityTypeIndicator().ForEach(c => context.metadataQuantityTypeIndicator.Add(c)); GetRequestType().ForEach(c => context.metadataRequestType.Add(c)); var contractList = ContractSeed.GetContract(); //.ForEach(c => context.Contract.Add(c)); EmailTemplateSeed.GetEmailSeed().ForEach(c => context.EmailTemplates.Add(c)); FileStatusSeed.GetFileStatus().ForEach(c => context.metadataFileStatu.Add(c)); MetadataDataSetSeed.GetDataSet().ForEach(c => context.metadataDataset.Add(c)); PipelineEncKeyInfoSeed.GetPipelineEncKeyInfo().ForEach(c => context.metadataPipelineEncKeyInfo.Add(c)); SettingSeed.GetSettingData().ForEach(c => context.Setting.Add(c)); metadataErrorCodeSeed.GetErrorCode().ForEach(c => context.metadataErrorCode.Add(c)); GetSendingStatus().ForEach(c => context.SendingStages.Add(c)); GetReceivingStages().ForEach(c => context.ReceivingStages.Add(c)); var locationList = LocationsSeed.GetLocations(); #region Identity Seed // add roles if (!context.Roles.Any(r => r.Name == "Admin")) { var store = new RoleStore <IdentityRole>(context); var manager = new RoleManager <IdentityRole>(store); var role = new IdentityRole { Name = "Admin" }; manager.Create(role); } //add users if (!(context.ShipperCompany.Any(u => u.DUNS == "837565548"))) { var shipperCompany = new ShipperCompany { Name = "Shell", DUNS = "837565548", IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now, SubscriptionID = 0, ShipperAddress = "" }; context.ShipperCompany.Add(shipperCompany); if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Monday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Tiffany P", LastName = "On", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Tuesday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Rebecca J", LastName = "Newson", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Wednesday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Terry A", LastName = "Mcmillin", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Thursday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Amanda", LastName = "Boettcher", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Friday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Jason J", LastName = "Babin", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Saturday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Deepthi", LastName = "Bollu", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Sunday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Carly M", LastName = "Billington", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Jan02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Jayme C", LastName = "D'Agnolo", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Feb02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Brandon", LastName = "Johnson", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "March02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Tami L", LastName = "Covington", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "April02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Danielle", LastName = "Foster", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "May02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Christen", LastName = "Schaffer", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "June02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "John", LastName = "Powell", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "July02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Leslie", LastName = "May", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "August02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Justin", LastName = "Babb", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } } if (!(context.ShipperCompany.Any(u => u.DUNS == "078711334"))) { var shipperCompany = new ShipperCompany { Name = "Enercross", DUNS = "078711334", IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now, SubscriptionID = 0, ShipperAddress = "" }; context.ShipperCompany.Add(shipperCompany); if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0797697898", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Monday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Gagan", LastName = "Deep", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } if (!(context.Users.Any(u => u.UserName == "*****@*****.**"))) { var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); var userToInsert = new ApplicationUser { UserName = "******", PhoneNumber = "0000000000", EmailConfirmed = true, Email = "*****@*****.**", PhoneNumberConfirmed = true, }; userManager.Create(userToInsert, "Monday02__"); userManager.AddToRole(userToInsert.Id, "Admin"); var shipper = new Shipper { UserId = userToInsert.Id, FirstName = "Gagan", LastName = "Deep", ShipperCompanyID = shipperCompany.ID, IsActive = true, CreatedBy = "", CreatedDate = DateTime.Now, ModifiedBy = "", ModifiedDate = DateTime.Now }; context.Shipper.Add(shipper); } } #endregion #region Add Pipeline try { var pipelineList = PipelineSeed.GetPipelines(); var transactionTypeList = TransactionTypesSeed.GetTransactionTypes(); var tspList = TransportationServiceProviderSeed.GetTransportationServiceProvider(); var pipelineTranTypeMapList = PipelineTransactionTypeMapSeed.GetPipelineTransactionTypeMap(); var tpwList = TradingPartnerWorksheetSeed.GetTradingPartnerWorksheet(); var counterPartyList = CounterPartySeed.GetCounterParty(); var pipeEncKeyInfoList = PipelineEncKeyInfoSeed.GetPipelineEncKeyInfo(); foreach (var tranType in transactionTypeList) { var tt = new metadataTransactionType { Identifier = tranType.Identifier, IsActive = tranType.IsActive, Name = tranType.Name, SequenceNo = tranType.SequenceNo }; context.metadataTransactionType.Add(tt); context.Commit(); var tranTypeMapOnPipeTTId = pipelineTranTypeMapList.Where(a => a.TransactionTypeID == tranType.ID).ToList(); foreach (var ttm in tranTypeMapOnPipeTTId) { var map = new Pipeline_TransactionType_Map { IsActive = ttm.IsActive, LastModifiedBy = ttm.LastModifiedBy, LastModifiedDate = ttm.LastModifiedDate, PathType = ttm.PathType, PipeDuns = "",//pipe.DUNSNo, PipelineID = ttm.PipelineID, TransactionTypeID = tt.ID, CreatedBy = "", CreatedDate = DateTime.Now }; context.Pipeline_TransactionType_Map.Add(map); context.Commit(); } } foreach (var tsp in tspList) { var tspObj = new TransportationServiceProvider { CreatedBy = tsp.CreatedBy, CreatedDate = tsp.CreatedDate, DUNSNo = tsp.DUNSNo, IsActive = tsp.IsActive, ModifiedBy = tsp.ModifiedBy, ModifiedDate = tsp.ModifiedDate, Name = tsp.Name }; context.TransportationServiceProvider.Add(tspObj); context.Commit(); var tspPipeList = pipelineList.Where(a => a.TSPId == tsp.ID).ToList(); foreach (var pipe in tspPipeList) { var pipeObj = new Pipeline { IsActive = pipe.IsActive, ModelTypeID = pipe.ModelTypeID, ModifiedBy = pipe.ModifiedBy, ModifiedDate = pipe.ModifiedDate, Name = pipe.Name, ToUseTSPDUNS = pipe.ToUseTSPDUNS, TSPId = tspObj.ID, CreatedBy = "", CreatedDate = DateTime.Now, DUNSNo = pipe.DUNSNo }; context.Pipeline.Add(pipeObj); context.Commit(); var pipeTpwList = tpwList.Where(a => a.PipelineID == pipe.ID).ToList(); foreach (var tpw in pipeTpwList) { var tpwObj = new TradingPartnerWorksheet { IsActive = tpw.IsActive, IsTest = tpw.IsTest, KeyLive = tpw.KeyLive, KeyTest = tpw.KeyTest, ModifiedBy = tpw.ModifiedBy, ModifiedDate = tpw.ModifiedDate, Name = tpw.Name, PasswordLive = tpw.PasswordLive, PasswordTest = tpw.PasswordTest, PipeDuns = pipeObj.DUNSNo, PipelineID = pipeObj.ID, ReceiveDataSeperator = tpw.ReceiveDataSeperator, ReceiveSegmentSeperator = tpw.ReceiveSegmentSeperator, ReceiveSubSeperator = tpw.ReceiveSubSeperator, SendDataSeperator = tpw.SendDataSeperator, SendSegmentSeperator = tpw.SendSegmentSeperator, SendSubSeperator = tpw.SendSubSeperator, URLLive = tpw.URLLive, URLTest = tpw.URLTest, UsernameLive = tpw.UsernameLive, UsernameTest = tpw.UsernameTest, CreatedBy = "", CreatedDate = DateTime.Now }; context.TradingPartnerWorksheet.Add(tpwObj); } var conPipeList = contractList.Where(a => a.PipelineID == pipe.ID).ToList(); foreach (var conPipe in conPipeList) { var con = new Contract { IsActive = conPipe.IsActive, LocationFromID = conPipe.LocationFromID, LocationToID = conPipe.LocationToID, MDQ = conPipe.MDQ, ModifiedBy = conPipe.ModifiedBy, ModifiedDate = conPipe.ModifiedDate, PipeDuns = pipeObj.DUNSNo, PipelineID = pipeObj.ID, ReceiptZone = conPipe.ReceiptZone, RequestNo = conPipe.RequestNo, RequestTypeID = conPipe.RequestTypeID, ShipperID = 0, ValidUpto = conPipe.ValidUpto, CreatedBy = "", DeliveryZone = conPipe.DeliveryZone, FuelPercentage = conPipe.FuelPercentage, CreatedDate = DateTime.Now }; context.Contract.Add(con); } var locPipeList = locationList.Where(a => a.PipeDuns.Trim() == pipe.DUNSNo.Trim()).ToList(); foreach (var locPipe in locPipeList) { var loc = new Location { Identifier = locPipe.Identifier, IsActive = locPipe.IsActive, ModifiedBy = locPipe.ModifiedBy, ModifiedDate = locPipe.ModifiedDate, Name = locPipe.Name, PipeDuns = pipeObj.DUNSNo, PipelineID = pipeObj.ID, PropCode = locPipe.PropCode, RDUsageID = locPipe.RDUsageID, CreatedBy = locPipe.CreatedBy, CreatedDate = locPipe.CreatedDate }; context.Location.Add(loc); } var ttmpList = context.Pipeline_TransactionType_Map.Where(a => a.PipelineID == pipe.ID).ToList();//pipelineTranTypeMapList.Where(a => a.PipelineID == pipe.ID).ToList(); foreach (var map in ttmpList) { map.PipelineID = pipeObj.ID; map.PipeDuns = pipeObj.DUNSNo; context.Pipeline_TransactionType_Map.Attach(map); var entry = context.Entry(map); entry.Property(e => e.PipelineID).IsModified = true; entry.Property(e => e.PipeDuns).IsModified = true; context.Commit(); } var pipeEncKeyInfoPipeList = pipeEncKeyInfoList.Where(a => a.PipelineId == pipe.ID).ToList(); foreach (var peki in pipeEncKeyInfoPipeList) { peki.PipelineId = pipeObj.ID; peki.PipeDuns = pipeObj.DUNSNo; context.metadataPipelineEncKeyInfo.Add(peki); } } } foreach (var cp in counterPartyList) { context.CounterParty.Add(cp); } } catch (Exception ex) { } #endregion context.Commit(); }
public static List <metadataTransactionType> GetTransactionTypes() { List <metadataTransactionType> list = new List <metadataTransactionType>(); ISheet sheet; HSSFWorkbook hssfwb = new HSSFWorkbook(File.OpenRead(HostingEnvironment.MapPath("~/SeedFiles/TransactionTypes.xls"))); sheet = hssfwb.GetSheetAt(0); for (int row = 1; row <= sheet.LastRowNum; row++) { metadataTransactionType tt = new metadataTransactionType(); if (sheet.GetRow(row) != null) { tt.ID = Convert.ToInt32(sheet.GetRow(row).GetCell(0).NumericCellValue); tt.Identifier = sheet.GetRow(row).GetCell(1).StringCellValue; tt.Name = sheet.GetRow(row).GetCell(2).StringCellValue; tt.SequenceNo = Convert.ToInt32(sheet.GetRow(row).GetCell(3).NumericCellValue); tt.IsActive = sheet.GetRow(row).GetCell(4).NumericCellValue == 0 ? false : true; list.Add(tt); } } return(list); // return new List<metadataTransactionType> // { // new metadataTransactionType // { // Identifier="02", // Name="Authorized Contract Overrun", // SequenceNo = 20, // IsActive=true // }, // new metadataTransactionType // { // Identifier="105", // Name="Authorized Contract Overrun - Firm", // SequenceNo = 20, // IsActive=true // }, // new metadataTransactionType // { // Identifier="106", // Name="Authorized Contract Overrun - Interruptible", // SequenceNo = 20, // IsActive=true // }, // new metadataTransactionType // { // Identifier="12", // Name="Authorized Injection Overrun", // SequenceNo = 20, // IsActive=true // }, //new metadataTransactionType{Identifier="2",Name=" Authorized Contract Overrun",SequenceNo = 20,IsActive= true} //,new metadataTransactionType{Identifier="105",Name="Authorized Contract Overrun - Firm",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="106",Name="Authorized Contract Overrun - Interruptible",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="12",Name="Authorized Injection Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="135",Name="Authorized Overrun Incremental Capacity – TSP Defined 1",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="48",Name="Authorized Point Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="57",Name="Authorized Point Overrun – Backhaul",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="58",Name="Authorized Point Overrun – Shorthaul",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="13",Name="Authorized Withdrawal Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="55",Name="Backhaul",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="59",Name="Bank",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="60",Name="Bank Payback",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="1",Name="Current Business (Buy)",SequenceNo = 1 ,IsActive= true} //,new metadataTransactionType{Identifier="51",Name="Capacity Release",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="10",Name="Cashout",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="1",Name="Current Business",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="19",Name="Delivery of Claimed Suspense Gas",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="66",Name="Excess Injection – Daily",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="65",Name="Excess Injection Storage injection in excess of inventory contractual rights. 65",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="67",Name="Excess Withdrawal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="68",Name="Excess Withdrawal – Daily",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="14",Name="Extended Receipt/Delivery Service",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="136",Name="Facilities Reimbursement",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="138",Name="Flash Gas",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="56",Name="Flow Day Diversion",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="81",Name="Fuel Adjustment",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="49",Name="Gathering",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="123",Name="Hourly Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="124",Name="Hourly Overrun 1/12",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="125",Name="Hourly Overrun 1/16",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="112",Name="Imbalance Payback – Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="111",Name="Imbalance Payback – within Contract",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="3",Name="Imbalance Payback from Transportation Service Provider",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="63",Name="Imbalance Payback from Transportation Service Provider – Prior Business Period",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="4",Name="Imbalance Payback to Transportation Service Provider",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="64",Name="Imbalance Payback to Transportation Service Provider – Prior Business Period",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="103",Name="Imbalance Resolution – Firm",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="104",Name="Imbalance Resolution – Interruptible",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="9",Name="Imbalance Transfer",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="134",Name="Incremental Capacity – TSP Defined 1",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="126",Name="Incremental Reservation",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="69",Name="Inventory Addition",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="70",Name="Inventory Reduction",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="28",Name="Loan",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="29",Name="Loan Payback",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="108",Name="Lost/Unaccounted For Gas",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="31",Name="Meter Bounce",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="102",Name="Meter Bounce – Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="121",Name="Meter Bounce Delivery",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="122",Name="Meter Bounce Receipt",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="137",Name="Minimum Revenue Commitment",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="71",Name="Netting Injection",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="72",Name="Netting Withdrawal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="98",Name="Nominated No-Notice",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="100",Name="Nominated No-Notice – Small Shipper",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="94",Name="Nominated No-Notice – Small Shipper / Firm Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="95",Name="Nominated No-Notice – Small Shipper / Interruptible Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="92",Name="Nominated No-Notice / Firm Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="93",Name="Nominated No-Notice / Interruptible Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="101",Name="No-Notice – Small Shipper",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="16",Name="No-Notice Balancing",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="25",Name="No-Notice Due Service Requester Balancing",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="24",Name="No-Notice Due Transportation Service Provider Balancing",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="17",Name="No-Notice Pre-Injection",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="22",Name="No-Notice Service",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="117",Name="Off-system Market",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="118",Name="Off-system Supply",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="107",Name="Operational Balancing Agreement",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="140",Name="Out of Cycle",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="128",Name="Overrun – Seasonal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="26",Name="Park",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="127",Name="Park and Loan Highest Daily Balance",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="139",Name="Park and Loan Highest Daily Balance",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="27",Name="Park Withdrawal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="5",Name="Plant Thermal Reduction",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="8",Name="Pooling",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="54",Name="Pool-to-Pool",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="119",Name="Purchase",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="90",Name="Reservation / Firm Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="91",Name="Reservation / Interruptible Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="129",Name="Reservation Volume",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="133",Name="Reservation/Enhanced Hourly Flow",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="109",Name="Retrograde",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="110",Name="Retrograde – Flash",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="120",Name="Sale",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="84",Name="Segmented",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="85",Name="Segmented – Volumetric",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="88",Name="Segmented – Volumetric / Firm Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="89",Name="Segmented – Volumetric / Interruptible Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="86",Name="Segmented / Firm Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="87",Name="Segmented / Interruptible Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="1",Name="Current Business (Sell)",SequenceNo = 2 ,IsActive= true} //,new metadataTransactionType{Identifier="53",Name="SR Deficiency Credit",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="130",Name="Storage Capacity – Seasonal Firm",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="6",Name="Storage Injection",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="113",Name="Storage Injection – Firm",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="114",Name="Storage Injection – Interruptible",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="131",Name="Storage Inventory",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="41",Name="Storage Inventory Cycling",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="11",Name="Storage Inventory Transfer",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="7",Name="Storage Withdrawal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="115",Name="Storage Withdrawal – Firm",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="116",Name="Storage Withdrawal – Interruptible",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="18",Name="Suspense Gas Claim",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="61",Name="Take",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="62",Name="Take Payback",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="73",Name="Trade Injection",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="74",Name="Trade Withdrawal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="75",Name="Transfer Injection",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="76",Name="Transfer Withdrawal",SequenceNo = 3 ,IsActive= true} //,new metadataTransactionType{Identifier="52",Name="TSP Deficiency Credit",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="77",Name="Unauthorized Injection Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="50",Name="Unauthorized Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="82",Name="Unauthorized Transfer",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="78",Name="Unauthorized Withdrawal Overrun",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="79",Name="Un-nominated Injection",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="80",Name="Un-nominated Withdrawal",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="99",Name="Volumetric",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="96",Name="Volumetric / Firm Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="97",Name="Volumetric / Interruptible Storage",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="132",Name="Wheeling",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="1",Name="Withdrawl",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="83",Name="Write Off",SequenceNo = 20 ,IsActive= true} //,new metadataTransactionType{Identifier="1",Name="Current Business (Transport)",SequenceNo = 1 ,IsActive= true} // }; }