public override void Execute(BbicApi.BBIC bbicContext, IfbaApi.IFBA ifbaContext)
        {
            logger.Info("Transfering Resources");

            var s1 = CopyOrgFile();
            var s = CopyFiles();

            foreach (var res in ifbaContext.ResourceTable)
            {
                FileTable ft = GetFileTable(res);
                FileWorkingGroupTable fwgt = GetFileWorkingGroupTable(res, ft);
                FileLanguageTable flt = GetFileLanguageTable(res, ft);
                AttachmentTable at = GetAttachmentTable(res, ft);

                UpdateAttachmentURL(res, at);

                if (at.URL != "~/Uploads/Document/")
                {
                    bbicContext.AttachmentTable.InsertOnSubmit(at);
                    bbicContext.FileLanguageTable.InsertOnSubmit(flt);
                    bbicContext.FileWorkingGroupTable.InsertOnSubmit(fwgt);
                }
                else
                {
                    logger.WarnFormat("Attachment for {0} was invalid, and thus it was not inserted", ft.FileId);

                }

                bbicContext.SubmitChanges();
            }

            logger.Info("Transfering Resources - Complete");
        }
        public override void Execute(BbicApi.BBIC bbicContext, IfbaApi.IFBA ifbaContext)
        {
            this.logger.Info("Transfering Organisations");

            foreach (var org in ifbaContext.OrganizationTable)
            {
                OrganizationTable ot = new OrganizationTable()
                {
                    OrganizationId = org.OrganizationID,
                    ImageUrl = "~/Uploads/document/organizations/" + org.OrganizationID + "/Images/smallLogo.gif",
                    Active = org.Active,
                    AddressId = org.AddressID,
                    CreatedBy = org.CreatedBy,
                    UpdatedBy = org.UpdatedBy,
                    UpdatedDateTime = org.UpdatedDateTime,
                    CreatedDateTime = org.CreatedDateTime,
                    Email1 = org.Email,
                    FaxNumber = "",
                    MobileNumber = "",
                    OrganizationName = org.Name,
                    PhoneNumber = "",
                    Position = org.Position,
                    TableRowVersion = org.TableRowVersion,
                    Tags = "",
                    Type = org.Type,
                    Website = org.URL,
                    WorkNumber = "",
                };

                bbicContext.OrganizationTable.InsertOnSubmit(ot);
                bbicContext.SubmitChanges();
            }

            this.logger.Info("Transfering Organisations - Complete");
        }
        public override void Execute(BbicApi.BBIC bbicContext, IfbaApi.IFBA ifbaContext)
        {
            foreach (var addr in ifbaContext.AddressTable)
            {

                    var at = new BbicApi.AddressTable()
                    {
                        Active = addr.Active,
                        City = addr.City,
                        CreatedBy = addr.CreatedBy,
                        UpdatedBy = addr.UpdatedBy,
                        CreatedDateTime = addr.CreatedDateTime,
                        UpdatedDateTime = addr.UpdatedDateTime,
                        AddressID = addr.AddressID,
                        CountryID = new Guid("00000000-0001-0001-0001-0000000000ED"),
                        Latitude = addr.Latitude,
                        Longitude = addr.Longitude,
                        TableRowVersion = addr.TableRowVersion,
                        Type = 1
                    };

                    var alt = new AddressLanguageTable()
                    {
                        Region = addr.Region,
                        Street1 = addr.Street1,
                        Street2 = addr.Street2,
                        City = addr.City,
                        CreatedBy = addr.CreatedBy,
                        UpdatedBy = addr.UpdatedBy,
                        CreatedDateTime = addr.CreatedDateTime,
                        UpdatedDateTime = addr.UpdatedDateTime,
                        LanguageId = Language.English,
                        PostalCode = addr.PostalCode,
                        AddressTable = at,
                        TableRowVersion = addr.TableRowVersion
                    };

                    bbicContext.AddressLanguageTable.InsertOnSubmit(alt);
            }

            bbicContext.SubmitChanges();
        }