Skip to content

Commit

Permalink
Added some more dummy sample data. Set Android API Level back to 21. …
Browse files Browse the repository at this point in the history
…Omitted Count on the menu items, because it was only displaying in iOS anyway, and the values were always 0. Removed the filter button in the nav bar because it wasn't really doing anything, and it wasn't even firing the alert on iOS.
  • Loading branch information
jsauvexamarin committed Jul 2, 2015
1 parent 0fd0b06 commit 878e312
Show file tree
Hide file tree
Showing 7 changed files with 281 additions and 195 deletions.
2 changes: 1 addition & 1 deletion MobileCRM/MobileCRM.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.xamarin.mobilecrm" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19" />
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="21" />
<application android:theme="@style/MyTheme" android:icon="@drawable/Icon" android:label="Mobile CRM">
<!--
For the MAP to work, you *must* create your own API key. See instructions here:
Expand Down
110 changes: 83 additions & 27 deletions MobileCRM/MobileCRM.Services/Repositories/AccountRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,91 @@ public class AccountRepository : InMemoryRepository<Account>
{
public AccountRepository()
{
Add(
new Account
{
Company = "InnoTech",
Industry = "Software",
Address = new Address
AddRange(new List<Account>
{
new Account
{
Street = "700 Pacific Ave",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.79832,
Longitude = -122.44
}
});

Add(
new Account
{
Company = "Umbrella Corp",
Industry = "Medical",
Address = new Address
Company = "InnoTech",
Industry = "Software",
Address = new Address
{
Street = "700 Pacific Ave",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.79832,
Longitude = -122.44
}
},
new Account
{
Company = "Umbrella Corp",
Industry = "Medical",
Address = new Address
{
Street = "231 Broadway St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.79715,
Longitude = -122.40358
}
},
new Account
{
Company = "Soylent Corp",
Industry = "People",
Address = new Address
{
Street = "43 Drumm St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.794279,
Longitude = -122.396823
}
},
new Account
{
Company = "Stark Industries",
Industry = "Artificial Intelligence",
Address = new Address
{
Street = "600 Montgomery St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.795212,
Longitude = -122.402836
}
},
new Account
{
Company = "Tyrell Corp",
Industry = "Biotech",
Address = new Address
{
Street = "600 Montgomery St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.766601,
Longitude = -122.387786
}
},
new Account
{
Street = "231 Broadway St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.79715,
Longitude = -122.40358
Company = "Encom",
Industry = "Games",
Address = new Address
{
Street = "220 Sansome Street",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.792235,
Longitude = -122.400983
}
}
});
}
Expand Down
66 changes: 32 additions & 34 deletions MobileCRM/MobileCRM.Services/Repositories/ContactRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,41 @@ public class ContactRepository : InMemoryRepository<Contact>
{
public ContactRepository()
{
Add(
new Contact
{
FirstName = "Bob",
LastName = "Harlan",
Industry = "Software",
Address = new Address
AddRange(new List<Contact>
{
new Contact
{
Latitude = 37.7993396,
Longitude = -122.4017555
}
});

Add(
new Contact
{
FirstName = "Dory",
LastName = "Himenez",
Industry = "Logistic",
Address = new Address
FirstName = "Bob",
LastName = "Harlan",
Industry = "Software",
Address = new Address
{
Latitude = 37.7993396,
Longitude = -122.4017555
}
},
new Contact
{
Latitude = 37.79798,
Longitude = -122.40247
}
});

Add(
new Contact
{
FirstName = "Aria",
LastName = "Patel",
Industry = "Aerospace",
Address = new Address
FirstName = "Dory",
LastName = "Himenez",
Industry = "Logistic",
Address = new Address
{
Latitude = 37.79798,
Longitude = -122.40247
}
},
new Contact
{
Latitude = 37.79632,
Longitude = -122.40136
}
FirstName = "Aria",
LastName = "Patel",
Industry = "Aerospace",
Address = new Address
{
Latitude = 37.79632,
Longitude = -122.40136
}
}
});
}
}
Expand Down
167 changes: 75 additions & 92 deletions MobileCRM/MobileCRM.Services/Repositories/LeadRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,102 +14,85 @@ public class LeadRepository : InMemoryRepository<Lead>, IRepository<Lead>
{
public LeadRepository()
{
var royGinsberg =
new Lead
{
FirstName = "Roy",
LastName = "Ginsberg",
Industry = "Retail",
Address = new Address
{
Street = "394 Pacific Ave",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.7970564,
Longitude = -122.4034628
}
};

var skipTaylor =
new Lead
{
FirstName = "Don",
LastName = "Draper",
Industry = "Advertising",
Address = new Address
{
Street = "120 Broadway",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.798861,
Longitude = -122.40039
}
};

var jimGeoffrey =
new Lead
{
FirstName = "Jim",
LastName = "Geoffrey",
Industry = "Entertainment",
Address = new Address
{
Street = "444 Battery St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.795626,
Longitude = -122.400000
}
};

var turnerMcAvoy =
new Lead
AddRange(
new List<Lead>
{
FirstName = "Turner",
LastName = "McAvoy",
Industry = "Finance",
Address = new Address
new Lead
{
Street = "600 Montgomery St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.795212,
Longitude = -122.402836
}
};

var maxRockatansky =
new Lead
{
FirstName = "Max",
LastName = "Rockatansky",
Industry = "Motorsports",
Address = new Address
FirstName = "Roy",
LastName = "Ginsberg",
Industry = "Retail",
Address = new Address
{
Street = "394 Pacific Ave",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.7970564,
Longitude = -122.4034628
}
},
new Lead
{
FirstName = "Don",
LastName = "Draper",
Industry = "Advertising",
Address = new Address
{
Street = "120 Broadway",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.798861,
Longitude = -122.40039
}
},
new Lead
{
Street = "1 Embarcadero Center",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.794997,
Longitude = -122.399435
FirstName = "Jim",
LastName = "Geoffrey",
Industry = "Entertainment",
Address = new Address
{
Street = "444 Battery St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.795626,
Longitude = -122.400000
}
},
new Lead
{
FirstName = "Turner",
LastName = "McAvoy",
Industry = "Finance",
Address = new Address
{
Street = "600 Montgomery St",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.795212,
Longitude = -122.402836
}
},
new Lead
{
FirstName = "Max",
LastName = "Rockatansky",
Industry = "Motorsports",
Address = new Address
{
Street = "1 Embarcadero Center",
City = "San Francisco",
State = "CA",
PostalCode = "94111",
Latitude = 37.794997,
Longitude = -122.399435
}
}
};

AddRange(
new List<Lead>
{
royGinsberg,
skipTaylor,
jimGeoffrey,
turnerMcAvoy,
maxRockatansky
}
);

});
}
}
}
Loading

0 comments on commit 878e312

Please sign in to comment.