public override void Execute(BBIC bbicContext, IFBA ifbaContext) { foreach (var cal in ifbaContext.EventTable) { CalendarTable cl = new CalendarTable() { StartDateTime = cal.StartDateTime, EndDateTime = cal.EndDateTime, Position = cal.Position, Sensitivity = cal.Sensitivity, Active = cal.Active, AddressID = cal.AddressID, CreatedBy = cal.CreatedBy, UpdatedBy = cal.UpdatedBy, CreatedDateTime = cal.CreatedDateTime, UpdatedDateTime = cal.UpdatedDateTime, Type = cal.Type, CalendarID = cal.EventID, WorkingGroupId = new Guid("21F11EFB-4EDE-4F62-B231-687C349C6365"), }; CalendarLanguageTable clt = new CalendarLanguageTable() { CalendarTable = cl, LanguageId = Language.English, CreatedBy = cl.CreatedBy, UpdatedBy = cl.UpdatedBy, CreatedDateTime = cl.CreatedDateTime, UpdatedDateTime = cl.UpdatedDateTime, Name = cal.Name, Description = cal.Description, Details = cal.Details, TimeZoneID = new Guid("00000000-0001-0001-0001-000000000055"), }; CalendarWorkingGroupTable cwg = new CalendarWorkingGroupTable() { CalendarTable = cl, WorkingGroupId = new Guid("21F11EFB-4EDE-4F62-B231-687C349C6365"), CreatedBy = cal.CreatedBy, UpdatedBy = cal.UpdatedBy, CreatedDateTime = cal.CreatedDateTime, UpdatedDateTime = cal.UpdatedDateTime }; bbicContext.CalendarLanguageTable.InsertOnSubmit(clt); bbicContext.SubmitChanges(); } }
partial void DeleteCalendarLanguageTable(CalendarLanguageTable instance);
partial void UpdateCalendarLanguageTable(CalendarLanguageTable instance);
partial void InsertCalendarLanguageTable(CalendarLanguageTable instance);
private void detach_CalendarLanguageTable(CalendarLanguageTable entity) { this.SendPropertyChanging(); entity.CalendarTable = null; }
private void attach_CalendarLanguageTable(CalendarLanguageTable entity) { this.SendPropertyChanging(); entity.TimeZoneTable = this; }