diff --git a/.gitignore b/.gitignore
index efb96b34..c13f9509 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,4 @@ OurUmbraco.Site/App_Data/cache/
*.sln.ide/
NuGetBackup
OurUmbraco.Site/web.config
+OurUmbraco.Site/usercontrols/Deli/
diff --git a/Marketplace/Controls/CountryDropDown.cs b/Marketplace/Controls/CountryDropDown.cs
new file mode 100644
index 00000000..fb7bedfe
--- /dev/null
+++ b/Marketplace/Controls/CountryDropDown.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections.Generic;
+using System.Web;
+using System.Linq;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.Collections.Specialized;
+using System.Globalization;
+
+namespace Marketplace.Controls
+{
+ public class CountryDropDownList : DropDownList
+ {
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ GetCountries();
+
+ }
+
+
+ private void GetCountries()
+ {
+
+ Dictionary dic = new Dictionary();
+ List col = new List();
+
+ foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
+ {
+
+ RegionInfo ri = new RegionInfo(ci.LCID);
+ if (!dic.ContainsKey(ri.EnglishName))
+ dic.Add(ri.EnglishName, ri.TwoLetterISORegionName.ToLowerInvariant());
+
+ if (!col.Contains(ri.EnglishName))
+ col.Add(ri.EnglishName);
+ }
+
+ col.Sort();
+
+
+
+ this.Items.Add(new ListItem("", ""));
+ foreach (var i in dic.OrderBy(x => x.Key))
+ {
+ this.Items.Add(new ListItem(i.Key, i.Value));
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/Css/Custom.css b/Marketplace/Css/Custom.css
new file mode 100644
index 00000000..d666f39d
--- /dev/null
+++ b/Marketplace/Css/Custom.css
@@ -0,0 +1,522 @@
+/* THIS STYLESHEET CONTAINS ALL THE THINGS WE'VE ADDED TO THE DESIGN */
+
+/* adjusting the header if there is no promoted content */
+
+
+.Class-VideoTutorial h1{display: none !Important;}
+
+.class-empty #wrapper{padding-top: 150px !Important;}
+.class-emtpy #header{height: 150px !Important;}
+
+.class-shopFlow #wrapper{padding-top: 200px !Important;}
+.class-shopFlow #header{padding-left: 0px; height: 200px !Important;}
+.class-shopFlow .breadcrumb{display: none !Important;}
+
+#panes div.tabPanel{display: none;}
+
+.get-started-table td {vertical-align: top; width: 33%;}
+.get-started-table li {margin-bottom: 5px;}
+.get-started-table ul {margin: 0;}
+td {vertical-align: top;}
+.no-margin {margin:0;}
+.boxLeft {
+float: left;
+width: 48%
+}
+.boxRight {
+float: right;
+width: 48%
+}
+
+/* SUBMITTED SITES */
+#tagSelector{height: 130px; display: block; list-style: none;
+margin-bottom: 20px; padding: 0px;}
+
+#tagSelector li{float: left; margin: 0px; display: block; width: 180px; padding: 5px;}
+#tagSelector li a{padding: 3px;}
+#tagSelector li a.current{font-weight: bold;}
+#tagSelector li.header{width: 100%; float: none; color: #444444; font-weight: bold; text-size: 12px;}
+
+#viewToggle{text-align: center; display: block; width: 120px; padding: 6px; border: solid 1px #e7e7e7; text-decoration: none; clear: both; margin-bottom: 20px; }
+
+#featuredSites{display: block; margin: 0px; padding: 0px;}
+
+#featuredSites li{display: block; text-align: center; width: 297px; height: 270px; float: left; margin: 0px 10px 14px 0px; padding: 7px;
+border-top: 1px solid #E7E7E7;
+border-left: 1px solid #E7E7E7;
+border-right: 2px solid #E7E7E7;
+border-bottom: 2px solid #E7E7E7;
+overflow: hidden
+}
+
+#sites.grid{display: block; margin: 0px; padding: 0px;}
+#sites.grid li{opacity:0.2; display: block; text-align: center; width: 135px; height: 145px; float: left; margin: 0px 20px 20px 0px; padding: 0px;
+ background: #252525; color: #fff;
+ overflow: hidden
+}
+
+#sites.grid li.last{margin-right: 0px; clear: right;}
+#sites.grid li a.thumb{color: #fff; display: block; margin: auto; background: #fff no-repeat top center; width: 136px; padding-top: 101px; height: 1px; overflow: hidden;}
+#sites.grid li h5{margin-top: 3px; padding: 5px; font-size: 11px; font-weight: normal; color: #fff;}
+#sites.grid li h5 a{color: #fff;}
+#sites.grid li p{display: none;}
+#sites.grid li.show{opacity: 0.99;}
+
+#sites.list{background: none !Important; display: block; margin: 0px; padding: 0px; width: auto; list-style: none;}
+
+#sites.list li{background: none !Important; opacity: 0.99 !Important; display: none; border-bottom: 1px solid #ccc; text-align: left;
+padding: 10px 10px 10px 150px; position: relative; min-height: 90px; height: auto !Important; height: 90px;}
+
+#sites.list li a.thumb{display: block; border: 1px solid #999; background: no-repeat top center; width: 115px; padding-top: 81px; height: 1px;
+overflow: hidden; position: absolute; top: 15px; left: 10px;}
+
+#sites.list li h5{margin: 2px 0px 5px 0px; padding: 2px; font-size: 16px;}
+
+#sites.list li p{}
+#sites.list li.show{opacity: 0.99 !Important; display: block;}
+
+div#showcase{width: 750px; height: 470px; overflow: auto; padding: 5px;}
+div#showcase div.image{margin: 0px 0px 20px 20px; width: 450px; height: 280px; overflow: hidden; border: 1px solid #ccc; text-align: center;
+position: absolute; top: 20px; right:0px;
+}
+div#showcase h1{float: left; color: #575757; width: 280px;}
+
+div#showcase div.desc{overflow: auto; position: absolute; bottom: 0px; height: 125px;
+padding: 7px; border-top: #e7e7e7 1px solid; margin-top: 35px; width: 745px;}
+
+div#showcase div.desc p{font-size: 12px !Important; line-height: 20px;}
+
+div#showcase dl{clear: left;}
+div#showcase dt{font-weight: bold;}
+div#showcase dd{margin-bottom: 10px;}
+
+/* FAQ */
+.faqGroup{list-style: none; margin: 0; padding: 0px;}
+.faqGroup li{display: block; width: 350px; height: 100px; float: left; margin:0px 20px 30px 0px;}
+.faqGroup li h3{margin: 5px 0 0 0; padding: 0px;}
+.faqGroup li p{padding-top: 10px; margin: 0px; }
+.faqGroup li.alt{float: right; }
+.faqGroup h3 a{color: #000 !Important; text-decoration: none !Important;}
+.faqGroup a:hover h3{color: #000; text-decoration: underline !Important;}
+
+.faqGroupFeatureLink li{display: block; width: 150px; float: left; margin:0px 10px 15px 0px;}
+.faqGroupFeatureLink a{color: #000 !Important; text-decoration: none !Important;}
+.faqGroupFeatureLink a:hover{color: #000; text-decoration: underline !Important;}
+
+/* Partners */
+
+.solutionProvider img{float: right; margin-top: 10px}
+.solutionProvider .meta{margin-bottom: 15px}
+.solutionProvider .meta p{font-size: 13px; margin-bottom: 0px}
+.solutionProvider{border-bottom: 1px solid #efefef; padding: 10px; margin-bottom: 10px}
+
+.goldProvider{border: 1px solid #efefef; background: #f7f7f7;}
+
+/* GOLD PARTNERS */
+ul.goldPartners, ul.standardPartners{margin: 0px; padding: 0px;}
+li.partner{display: block; float: left; padding: 10px; margin: 7px; width: 225px; border: 1px solid #efefef}
+li.partner a, li.partner a *{text-decoration: none !Important; color: #000}
+li.partner h3{color: #000; font-size: 18px; font-weight: bold; margin: 0px;}
+
+li.partner span.location{line-height: 15px; display: block; padding: 7px 0px 7px 0px; margin-bottom: 10px; border-bottom: #dbdbdb 1px solid; color: #666 !Important; font-size: 12px;}
+
+li.partner div.providerLogo{height: 160px; display: block; overflow: hidden;}
+li.partner span.abstract{border: 1px solid #efefef; line-height: 17px; display: none; font-size: 12px; color: #666; padding: 10px; background: #f9f9f9; height: 138px;}
+
+ul.goldPartners li.partner a:hover img{display: none;}
+ul.goldPartners li.partner a:hover span.abstract{display: block;}
+li.partner a:hover h3{text-decoration: underline !Important;}
+li.partner img{margin: auto;}
+
+ul.standardPartners li.partner h3{height: 18px; overflow: hidden}
+ul.standardPartners li.partner{width: 135px; padding: 3px; margin: 7px;}
+ul.standardPartners li.partner h3{font-size: 12px;}
+ul.standardPartners li.partner div.providerLogo{height: 90px;}
+ul.standardPartners li.partner span.location{line-height: 10px; font-size: 12px;}
+
+/*Licenses */
+
+.licenseTable td{padding: 7px; border-bottom: 1px solid #efefef;}
+.licenseTable{margin-bottom: 30px;}
+
+
+/* PRODUCTS */
+div.product{padding-left: 70px; padding-bottom: 20px; background: url(/images/bg-ico2.gif) no-repeat 10px 0px; }
+
+/* ABOUT US */
+.class-team img {margin: 0 15px 15px 15px;}
+
+/* TEST YOUR NEEDS */
+#test-your-needs-container p {
+ margin-bottom: 2px;
+}
+.need-cost {
+ font-weight: bold;
+ margin-bottom: 8px;
+
+}
+
+.need-result{
+ padding-left: 60px;
+ background: url(/images/custom/need-result-selected.png) no-repeat;
+}
+
+.need-result-summary{
+ padding-left: 60px;
+}
+
+.needs-total {
+ font-weight: bold;
+ font-size: 130%;
+ padding-bottom: 10px;
+}
+.btn-add-to-cart {
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(/images/custom/btn-order-inline.png) no-repeat;
+ width:152px;
+ height:50px;
+ margin-top: 25px;
+}
+.btn-add-to-cart:hover {
+ background:url(/images/custom/btn-order-inline-hover.png) no-repeat;
+}
+
+.btn-calculate-my-price {
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(/images/custom/btn-calculate-price.png) no-repeat;
+ width:152px;
+ height:50px;
+ margin-top: 25px;
+}
+.btn-calculate-my-price:hover {
+ background:url(/images/custom/btn-calculate-price-hover.png) no-repeat;
+}
+
+.test-your-needs-questions{list-style: none; margin-left: 0; padding-left: 0;}
+.test-your-needs-questions li{display: block; margin: 0; padding: 10px 0;}
+.test-your-needs-questions input {margin-top: 0px; padding-top: 0px;}
+.test-your-needs-questions label{padding-left: 5px; font-size: 20px;}
+#test-your-needs-container h2 {
+line-height: 125%;
+}
+
+
+/* 2 column pages */
+.two-column .left-column{width: 380px;}
+.two-column .right-column{width: 380px;}
+
+.noSidebar .left-column, .noSidebar .right-column{width: 450px;}
+
+/* 3 column pages */
+.three-column .left-column{width: 310px; margin: 0px;}
+.three-column .center-column{width: 310px; float: left; margin: 0px 15px 0px 15px;}
+.three-column .right-column{width: 310px; margin: 0px;}
+
+/* SHOP FLOW UL */
+ul.shop-flow{display: block; list-style: none; height: 50px; padding: 0px; margin: 0px; margin-left: -10px;}
+ul.shop-flow li{ display: block; padding: 0px; margin: 0px; border-bottom: 3px solid #000; float: left; height: 40px; margin-right: 2px;}
+ul.shop-flow li span{display: block; padding: 20px;}
+ul.shop-flow li.active{border-color: #ff6e00;}
+ul.shop-flow li.done{border-color: #7a7a7a;}
+
+/* SHOP FLOW BUTTONS */
+#umbracoFormNavigation a{
+ display: block;
+ width: 93px;
+ height: 22px;
+ padding-top: 6px;
+ font-size: 14px;
+ text-decoration: none;
+ color: white;
+ background: url(/images/custom/btn_sqr_blank.png) no-repeat top left;
+ text-align: center;
+}
+
+/* Shop flow Checkout */
+.checkOut #couponCode{display: none;}
+
+
+/*BREADCRUMB */
+ul.breadcrumb{z-index: 99; position: relative; list-style: none; margin: 0; padding: 0; margin-bottom: 20px;}
+ul.breadcrumb li{color: #999 !Important; list-style: none; margin: 0; padding: 0; display: inline;}
+
+ul.breadcrumb li a{color: #999 !Important;}
+
+
+/* BIRD */
+#bird{z-index: 999; position: relative; background: no-repeat url(/images/custom/bird0.gif) bottom left; height: 100px; width: 100px;}
+
+
+/* EXTRA HEADER BUTTONS */
+a.support{
+ width:108px;
+ height:108px;
+ text-indent:-9999px;
+ overflow:hidden;
+ float:right;
+ background:url(../images/btn-support.png) no-repeat;
+}
+
+a.support:hover{background:url(../images/btn-support-hover.png) no-repeat;}
+
+
+/* VIDEO PAGE*/
+div.videoChapter, div.videoChapter *{text-decoration: none !Important; color: #000 !Important;}
+.video-list a{text-decoration: none !Important; color: #000 !Important; font-weight: normal; font-size: 10px}
+
+/* New list of videos... */
+.video-list2{list-style: none; display: block; padding: 0px; marging: 0px;}
+.video-list2 li{width: 140px; overflow: hidden; display: block; float: left; margin: 7px; height: 145px; background: #252525;}
+.video-list2 li .image{overflow: hidden; display: block; height: 100px;}
+
+.video-list2 li a{font-size: 11px; font-weight: normal; line-height: 13px; color: #fff !Important; text-decoration: none !Important; display: block; text-align: center;}
+.video-list2 li a:hover{text-decoration: underline !Important;}
+.video-list2 span.text2{display: block; padding: 4px;}
+.video-list2 span.image{display: block; background: #efefef}
+
+/*Video Tutorial Page*/
+#VideoPlayer{margin-top: 0px; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 20px;}
+ul#VideoRelatedVideos{height: 555px; overflow: auto; float: right; width: 220px; list-style: none; padding: 0px; margin: 0px; }
+ul#VideoRelatedVideos li{display: block; border-bottom: 1px solid #efefef; padding: 10px; height: 50px;}
+ul#VideoRelatedVideos li.header{padding: 0px 10px 0px 10px; height: 25px}
+ul#VideoRelatedVideos li img{float: left; margin: 0px 10px 10px 0px; border: 1px solid #efefef; background: #fff}
+ul#VideoRelatedVideos li h5{padding: 0px; font-weight: normal; margin: 0; font-size: 12px; line-height: 16px}
+ul#VideoRelatedVideos li h3{padding: 0px; margin: 0px; line-height: 20px}
+ul#VideoRelatedVideos li.playing{background: #efefef;}
+
+/*Featured video */
+#tutorialFeature{border-bottom: 2px solid #EFF2F2; padding: 10px; margin-bottom: 10px; color: #666;}
+#tutorialFeature h2, #tutorialFeature p, #tutorialFeature li{color: #666;}
+#tutorialFeature a.preview{margin: 10px; margin-right: 35px; width: 350px; height: 190px; float: left; border: 1px solid #666}
+#tutorialFeature ul{padding: 0px; list-style: none;}
+#tutorialFeature ul li{padding-left: 20px; display: block; }
+#tutorialFeature img{margin-bottom: 20px;}
+
+
+/*developer page */
+.ajax ul{list-style: none; padding: 0px; margin: 0px; margin-bottom: 4px}
+.ajax ul li{display: block; padding: 5px; border-bottom: 1px solid #efefef; height: 50px}
+.ajax ul li small{display: block; padding: 2px; color: #999}
+.ajax ul li img{width: 48px; height: 48px; float: left; margin: 0px 7px 5px 0px;}
+
+/* Training */
+table.reservations{}
+table.reservations td, table.reservations th{padding: 7px; text-align: left; border-bottom: 1px solid #efefef}
+table.reservations tbody th{width: 120px;}
+table.reservations tbody td{padding-right: 10px;}
+table.reservations tbody input{padding: 2px; width: 200px; font-size: 16px;}
+
+.center{display: block; padding: 2px; text-align: center}
+
+.eventList{margin: 0px; padding: 0px; list-style: none;}
+.eventList li{margin: 0px; padding: 3px; border-bottom: 1px solid #efefef; display: block;}
+.eventList h4{padding: 0px; margin: 0}
+.eventList small{ color: #666;}
+
+/*RELEASES*/
+.releases-list a{color: black !Important; text-decoration: none !Important;}
+.releases-list .summary{
+ padding: 10px; background: #efefef; margin: 7px 7px 7px 20px; display: none;
+}
+
+
+/* BLOG */
+
+p.postmetadata{color: #666; margin-bottom: 30px}
+.post small{color: #666; margin-top: -10px; padding-bottom: 15px; display: block;}
+
+
+#commentform{
+ padding-left: 10px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+ #commentform #gravatar{
+ float:right;
+ margin-right: 190px;
+ margin-top: 20px;
+}
+#commentform label
+{
+ float:none;
+}
+#commentform .form-input{
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+#commentform .form-input textarea{
+ width: 400px;
+}
+#commentform .error{
+padding:0 0em;
+}
+#commentform label.error{
+border:none;
+
+padding:0 0.8em;
+}
+#commentform label.error {
+background:#FFF;
+border-color:#FBC2C4;
+color:#8A1F11;
+}
+
+#commentPosted {
+border:1px solid #DDDDDD;
+margin-bottom:0.5em;
+padding:0 0.8em;
+padding:10px;
+}
+
+#commentPosted {
+background:#FFF6BF none repeat scroll 0 0;
+border-color:#FFD324;
+color:#514721;
+}
+
+ol.commentlist{margin-left: 0px; padding: 0px; list-style: none;}
+
+ol.commentlist li{
+margin-bottom: 10px;
+padding: 10px;
+background: #FAFAFA;
+}
+
+
+ol.commentlist li small.commentmetadata{display: block; font-size: 10px; padding-bottom: 5px;}
+ol.commentlist li small.commentmetadata a{color: #999;}
+ol.commentlist li img.gravatar{float: right; margin: 0px 0xp 10px 10px; border: 1px solid #ccc; padding: 1px;}
+
+/* Twitter */
+#twitterUpdates{padding: 0px; margin: 0px; list-style: none}
+#twitterUpdates li{display: block; padding: 5px; margin-bottom: 20px;}
+#twitterUpdates li img{float: left; clear: left; margin: 0px 20px 20px 0px;}
+
+
+/* SEARCH */
+.searchResults{list-style: none; padding: 0px; margin: 0px;}
+.searchResults li{display: block; padding-left: 60px; background: url(/images/custom/search_text.gif) no-repeat 15px 7px;}
+
+
+.searchResults li.videochapter, .searchResults li.videotutorial{background-image: url(/images/custom/search_video.gif);}
+.searchResults li.umbracoblogpost{background-image: url(/images/custom/search_blog.gif);}
+.searchResults li small{color: #666; display: block; font-size: 11px}
+.searchResults li h3{margin-bottom: 2px;}
+.searchResults li p{margin-top: 2px;}
+
+/* Paypal redirect */
+body.redirecting{
+ margin-top: 100px;
+ text-align: center;
+}
+
+body.redirecting h1{display: block !Important; font-size: 22px}
+body.redirecting div{
+ margin: auto;
+ text-align: center;
+ width: 600px;
+ padding: 30px;
+
+ font-size: 18px;
+ color: #666;
+ background-color: #fff;
+ border: 5px solid #CCDDFF
+}
+
+
+/* -- 23Videos (List for 23videos - used on CG11 ticket page) -- */
+#video23List { margin:0; padding:0; }
+#video23List li { display:inline-block; height:140px; list-style-type:none; margin:0 2px; overflow:hidden; position:relative; width:170px;}
+#video23List li a { color:#fff; display:block; text-decoration:none; }
+#video23List li img { position:absolute; z-index:10; }
+#video23List li span { background:#000; background:rgba(0,0,0,0.8); bottom:0; color:#fff; font-size:11px; height:30px; /*40-5-5=30*/ line-height:12px; padding:5px; position:absolute; width:160px; /*170-5-5=160*/ z-index:11; }
+
+/* -- Image Cover for Convince your boss pdf -- */
+.convinceCover { -moz-box-shadow:1px 1px 5px #666; -o-box-shadow:1px 1px 5px #666; -webkit-box-shadow:1px 1px 5px #666; box-shadow:1px 1px 5px #666; float:left; margin-right:20px; }
+
+/* -- CodeGarden homepage panel & button text --*/
+.tabset li a span.codegarden { background:url(../images/custom/text-codegarden-panel-label.png) no-repeat 0 0; width:92px; }
+.promo-box .cyan-alt .container { background:url(../images/custom/bg-container-cyan-alt.jpg) no-repeat scroll 50% 0 transparent; }
+.cgPanelHeader { background:url(../images/custom/text-codegarden-panel-header.png) no-repeat; height:89px; overflow:hidden; text-indent:-9999px; width:459px;}
+.cgPanelText { width:470px; }
+.cgBuyTicketBtn { background:url(../images/custom/btn_get-your-ticket.png) no-repeat 0 0; cursor: pointer; float: right; height: 108px; margin:20px 0 0 15px; overflow: hidden; text-indent: -9999px; width: 108px; }
+.cgBuyTicketBtn:hover { background-position:0 -108px; }
+
+
+
+/* -- Nivio Slider styles --*/
+#slider {
+ position:relative;
+ width:692px;
+ height:461px;
+ background:url(../images/nivio-slider-2.4/loading.gif) no-repeat 50% 50%;
+ /*margin-bottom:50px;*/
+}
+#slider img {
+ position:absolute;
+ top:0px;
+ left:0px;
+ display:none;
+}
+#slider a {
+ border:0;
+ display:block;
+}
+
+.nivo-controlNav {
+ position:absolute;
+ left:260px;
+ bottom:-42px;
+}
+.nivo-controlNav a {
+ display:block;
+ width:22px;
+ height:22px;
+ background:url(../images/nivio-slider-2.4/bullets.png) no-repeat;
+ text-indent:-9999px;
+ border:0;
+ margin-right:3px;
+ float:left;
+}
+.nivo-controlNav a.active {
+ background-position:0 -22px;
+}
+
+.nivo-directionNav a {
+ display:block;
+ width:30px;
+ height:30px;
+ background:url(../images/nivio-slider-2.4/arrows.png) no-repeat;
+ text-indent:-9999px;
+ border:0;
+}
+a.nivo-nextNav {
+ background-position:-30px 0;
+ right:15px;
+}
+a.nivo-prevNav {
+ left:15px;
+}
+
+.nivo-caption
+{
+ color:#fff;
+}
+
+.nivo-caption p { color:#fff; }
+
+.nivo-caption a {
+ text-decoration:underline;
+}
+
+
+
+
+
+
+
+/* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
diff --git a/Marketplace/Css/Deli.css b/Marketplace/Css/Deli.css
new file mode 100644
index 00000000..c195b183
--- /dev/null
+++ b/Marketplace/Css/Deli.css
@@ -0,0 +1,1190 @@
+/* profile primary navigation */
+
+.options ul,
+.projectOptions ul,
+.stepNavigation
+{
+ height:30px!important;
+ display:block;
+ border-bottom: 1px solid #82B84F;
+ margin:1em 0 0 0;
+ padding:0;
+}
+
+.projectOptions
+{
+ position:absolute;
+ top:0;
+ left:0;
+ height:30px;
+
+}
+
+.projectOptions ul
+{
+ border-bottom:none!important;
+
+}
+
+.options ul li,
+.projectOptions ul li,
+.stepNavigation li
+{
+ float:left;
+ list-style:none;
+ padding:5px !important;
+ margin-bottom:-1px;
+ z-index:100;
+ height:20px;
+ margin:0!important;
+ -webkit-border-top-left-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-topleft: 3px;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.5s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.5s ease-in;
+ -moz-transition: background 0.5s ease-in;
+}
+
+
+
+.options ul li:hover,
+.projectOptions ul li:hover,
+.stepNavigation li:hover
+{
+ background:#efefef;
+}
+
+.projectOptions ul li:hover
+{
+ background:#FFF6BF;
+}
+
+.options ul li.current,
+.projectOptions ul li.current,
+.stepNavigation li.current
+{
+ border-top: 1px solid #82B84F;
+ border-left: 1px solid #82B84F;
+ border-right: 1px solid #82B84F;
+ background: #d3f39c;
+ font-weight:bold;
+}
+
+.projectOptions ul li.current
+{
+ border:none;
+ background:#efefef;
+}
+
+.projectOptions ul li.current a{
+ text-decoration:none!important;
+ color:#333!important;
+ font-weight:normal!important;
+}
+
+.options ul li.current:hover
+{
+ background: #d3f39c;
+}
+
+.projectOptions ul li.current:hover{
+ background:#efefef;
+}
+
+.options a,
+.projectOptions a,
+.stepNavigation a
+{
+ font-size:13px !important;
+}
+
+#projectDescription .options a
+{
+ font-size:11px !important;
+}
+
+.options li.current a,
+.stepNavigation li.current a
+{
+ text-decoration:none;
+ color:#252525;
+}
+
+/* profile & package creation sub navigation */
+.stepNavigation
+{
+ border-bottom: 1px solid #FFD324;
+}
+
+.stepNavigation li.current
+{
+ border-top: 1px solid #FFD324;
+ border-left: 1px solid #FFD324;
+ border-right: 1px solid #FFD324;
+ background:#FFF6BF;
+}
+
+.stepNavigation li.current:hover
+{
+ background:#FFF6BF;
+}
+
+#tabs
+{
+ position:relative;
+ padding-top:43px;
+}
+
+.tabContent
+{
+ padding:0px 1em 5px 1em;
+ border: 1px solid #efefef;
+ background:#F6F7F7;
+ overflow:hidden;
+ /*-webkit-border-bottom-left-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-top-right-radius: 5px;
+ border-bottom-left-radius: 5px;
+ border-bottom-right-radius: 5px;*/
+
+
+}
+
+/* Cart Progress Indicator */
+
+.cartProgress
+{
+ clear:both;
+ overflow:hidden;
+ margin-bottom:10px;
+}
+
+.cartProgress ul
+{
+ margin:0;
+ padding:0;
+}
+
+.cartProgress ul li
+{
+ list-style:none;
+ display:block;
+ height:20px;
+ line-height:20px;
+ padding:5px 0px 5px 0px;
+ width:195px;
+ color:#ccc;
+ float:left;
+ margin: 0;
+ text-align:center;
+ font-size:14px;
+
+}
+
+.cartProgress ul li.complete
+{
+ color:#666;
+ background:#d3f39c;
+ font-weight:bold;
+}
+
+.cartProgress ul li.current
+{
+ color:#fff;
+ font-weight:bold;
+ background:#8ECA56;
+ background:#8ECA56 url(img/progress_indicator.png) no-repeat top left;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-bottomright: 3px;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+
+.cartProgress ul li.first
+{
+ background-image:none;
+ -webkit-border-top-left-radius: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -moz-border-radius-topleft: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+
+
+
+
+
+
+
+/* profile projects styles */
+.profileProjectsHolder
+{
+ width:650px;
+ float:left;
+}
+
+.profileProjects
+{
+ margin:0;
+ padding:0;
+ clear:both;
+ overflow:hidden;
+}
+
+.profileProjects>li
+{
+ list-style:none;
+ float:left;
+ display:block;
+ width:220px;
+ height:90px;
+ border:1px solid #ccc;
+ background:#eee;
+ padding:10px 10px 10px 80px;
+ margin:0 1em 1em 0;
+ position:relative;
+
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.3s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.3s ease-in;
+ -moz-transition: background 0.3s ease-in;
+}
+
+.profileProjects>li.add
+{
+ background:#e6ffc6;
+ border:1px solid #8ECA56;
+}
+
+
+.profileProjects img
+{
+ position:absolute;
+ left:15px;
+ top:10px;
+}
+
+.profileProjects>li.add img
+{
+ top:20px;
+ left:55px;
+}
+
+.profileProjects>li:hover
+{
+ background:#ddd;
+}
+
+.profileProjects>li.add:hover
+{
+ background:#baf581;
+}
+
+.profileProjects>li h3
+{
+ margin:0;
+ padding:0;
+}
+
+.profileProjects>li.add h3
+{
+ margin-top:27px;
+ margin-left:35px;
+}
+
+.profileProjects .projectNav
+{
+ margin:.5em 0 0 0;
+ padding:0;
+}
+
+.profileProjects .projectNav li
+{
+ margin:0;
+ padding:0;
+ float:left;
+ list-style:none;
+}
+
+.profileProjects .projectNav li a
+{
+ display:block;
+ padding:.3em .5em;
+ background:#999;
+ text-decoration:none;
+ font-size:.9em;
+ font-weight:bold;
+ color:#fff;
+ margin:.1em;
+
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.1s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.1s ease-in;
+ -moz-transition: background 0.1s ease-in;
+}
+
+.profileProjects .projectNav li a:hover
+{
+ background:#8ECA56;
+}
+
+.profileProjects .projectIcon
+{
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+
+/* Deli BI styles */
+
+.overviewCharts .biChart
+{
+ float:left;
+ width:215px;
+ height:225px;
+ padding:10px;
+ margin:10px 10px 10px 0;
+ border:1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+
+.overviewCharts .biChart.last
+{
+ margin-right:0;
+}
+
+
+
+.overviewCharts .biChart h3, .statsBoxLine h3
+{
+ margin:0;
+ padding:0;
+}
+
+
+.statsBoxLine
+{
+ float:left;
+ width:485px;
+ height:220px;
+ padding:10px;
+ margin:10px 10px 10px 0;
+ border:1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+fieldset p{
+clear:both;
+}
+
+.dataTable
+{
+ border-collapse:collapse;
+ border:1px solid #ddd;
+ width:100%;
+ margin-bottom:1em;
+}
+
+.dataTable td, .dataTable th
+{
+ padding:8px !important;
+}
+
+
+.dataTable th
+{
+ color: #fff;
+ background: #8ECA56;
+ font-size:14px;
+}
+
+.dataTable tbody tr
+{
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.3s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.3s ease-in;
+ -moz-transition: background 0.3s ease-in;
+}
+
+.dataTable tbody tr:hover
+{
+ /*text-shadow: 0 0 3px #fff;*/
+ background:#ddd;
+}
+
+.dataTable tbody tr.totals:hover td
+{
+
+ background:#82B84F;
+}
+
+.dataTable tr.totals
+{
+ font-weight:bold;
+ font-size:14px;
+}
+
+.dataTable tr.totals td
+{
+ border-top:3px solid #8ECA56;
+}
+
+.dataTable .count, .dataTable .center
+{
+ text-align:center;
+}
+
+.dataTable .money, .dataTable .right
+{
+ text-align:right;
+}
+
+.statsOverview
+{
+ overflow:hidden;
+}
+
+.statsBox
+{
+ width:200px;
+ height:90px;
+ float:left;
+ margin:10px 10px 10px 0;
+ border:1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.statsBox .holder50
+{
+ overflow:hidden;
+}
+
+.statsBox .stat, .statsBox .stat50
+{
+ text-align:center;
+ padding:10px;
+ background:#eee;
+}
+
+.statsBox .stat span
+{
+ font-size:25px;
+ font-weight:bold;
+}
+
+.statsBox .stat50 span
+{
+ font-size:20px;
+ font-weight:bold;
+}
+
+.stat50
+{
+
+ width:80px;
+ float:left;
+ padding-bottom:5px!important;
+ padding-top:5px!important;
+}
+
+.statsBox.green .stat
+{
+ background:#D3F39C;
+}
+
+.statsBox.red .stat
+{
+ background:#ffbebe;
+}
+
+.statsBox .statType
+{
+ font-size:15px;
+ font-weight:bold;
+ text-align:center;
+ padding:10px;
+ color:#fff;
+ background:#999;
+ border-top:1px solid #fff;
+}
+
+.statsBox.green .statType
+{
+ background:#8ECA56;
+}
+
+.statsBox.red .statType
+{
+ background:#bc3a3a;
+}
+
+.statsBox.tall
+{
+ height:141px;
+}
+
+/* package creation go live check styles */
+
+
+.eligibilityNotification, .errorBox
+{
+ padding:.5em 1em 0 1em;
+ font-weight:bold;
+}
+
+.eligible
+{
+ border:4px solid #8ECA56;
+ background:#ddffbe;
+}
+
+.notEligible, .errorBox
+{
+ border:4px solid #bc3a3a;
+ background:#ffbebe;
+}
+
+
+/* addtocart styles */
+
+.projectPurchase, .projectDownload
+{
+ display:block;
+ margin-bottom:10px;
+ padding:10px 10px 10px 50px!important;
+ text-decoration:none;
+ position:relative;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ color:#999999;
+ font-size:80%;
+ text-decoration:none !important;
+}
+
+.downloadBtn img{
+border:0;
+}
+
+
+.projectPurchase
+{
+ background:url("img/shoppingbasket.png") no-repeat 10px 10px #CCE2F8;
+}
+
+.projectDownload
+{
+ background:#DDF8CC!important;
+}
+
+.projectDownload .downloadBtn
+{
+ display:block;
+ position:absolute;
+ left:7px;
+ bottom:3px;
+ border:0;
+}
+
+
+.projectPurchase h4, .projectDownload h4
+{
+ margin:0;
+ padding:0;
+}
+
+.projectPurchase ul
+{
+ margin:0;
+ padding:0;
+}
+
+.projectPurchase li
+{
+ font-size:11px;
+ display:block;
+ list-style:none;
+ margin:0;
+ padding:3px;
+ line-height:18px;
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.3s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.3s ease-in;
+ -moz-transition: background 0.3s ease-in;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ color:#999;
+}
+
+.projectPurchase li:hover
+{
+ background-color:#eee;
+}
+
+.projectPurchase li .addToCart
+{
+ float:right;
+ width:30px;
+ height:18px;
+ border:0;
+}
+
+.microCart
+{
+ color:#fff;
+ margin-left:10px;
+ display:inline-block;
+ background:#8ECA56;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ padding:3px 3px 3px 0px;
+
+
+}
+
+.microCart a
+{
+ text-decoration:none;
+}
+
+#top #memberHeaderProfile
+{
+ top:0!important;
+ right:0!important;
+}
+
+.deliLeft
+{
+ float:left;
+ width:220px;
+}
+
+.deliRight
+{
+ float:left;
+ width:760px;
+}
+
+.deliNav
+{
+ width:190px;
+ padding:10px;
+ background:#efefef;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ margin-right:10px;
+ margin-bottom:10px;
+}
+
+.deliNav.paid, .deliNav.hqPicks
+{
+ background:#CCE2F8;
+}
+
+.deliHelp
+{
+ background:#FFF6BF;
+}
+
+
+.deliNav h3
+{
+ padding:0 0 5px 0;
+ margin:0;
+ border-bottom:1px solid #ddd;
+}
+
+.deliNav ul,
+ul.linkList
+{
+ margin:5px 0;
+ padding:0;
+}
+
+.deliNav li,
+ ul.linkList li
+{
+ list-style:none;
+ padding:3px;
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.3s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.3s ease-in;
+ -moz-transition: background 0.3s ease-in;
+ font-size:13px;
+ font-weight:bold;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ position:relative;
+}
+
+ ul.linkList.icons li
+ {
+ padding-left:40px;
+ }
+
+ ul.linkList.icons li img
+ {
+ position:absolute;
+ left:3px;
+ top:3px;
+ }
+
+.deliNav li:hover,
+ul.linkList li:hover,
+.deliNav li.current,
+ul.linkList li.current
+{
+ background:#fff;
+}
+
+.deliNotification ul.linkList li:hover
+{
+ background:#FFD324;
+}
+
+.deliNotification ul.linkList small
+{
+ font-weight:normal;
+}
+
+.deliNav li a,
+ul.linkList li a
+{
+ text-decoration:none!important;
+}
+
+.deliFeatureBox
+{
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ padding:10px;
+ margin-top: 0px;
+ position:relative;
+}
+
+.deliFeatureBox
+{
+ padding:0;
+}
+
+.deliFeatureBox img
+{
+ display:block;
+ border:0;
+}
+
+.deliFeatureBox:hover .deliPackage
+{
+ display:block;
+ position:absolute;
+ left:10px;
+ top:10px;
+ width:300px;
+ height:230px;
+ background:#fff;
+ z-index:200;
+
+
+ border:1px solid #fff;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.60);
+ -moz-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.60);
+ -webkit-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.60);
+}
+
+.deliPromoBox{
+ position:relative;
+}
+
+
+.deliPromoBox h2
+{
+ margin-top: 8px;
+ margin-bottom: 10px;
+ padding-bottom: 3px;
+
+ border-bottom: 1px solid #efefef;
+}
+
+.deliPromoBox a.viewAll
+{
+ position:absolute;
+ right:10px;
+ top:2px;
+ font-size:13px;
+}
+
+.deliPromoBox ul
+{
+ margin:0;
+ padding:0;
+}
+
+.deliPromoBox li
+{
+ list-style:none;
+ float:left;
+ background:#fff;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ width:164px;
+ height:110px;
+ margin:10px;
+ text-align:center;
+ position:relative;
+}
+
+.deliPromoBox li .deliPackage
+{
+ padding:5px;
+}
+
+.deliPromoBox li .deliPackage a
+{
+ color: #000;
+ text-decoration: none;
+}
+
+.deliPromoBox li .deliPackage a:hover
+{
+ text-decoration: underline;
+}
+
+
+
+.commercialIndicator
+{
+ position:absolute;
+ top:0;
+ right:0;
+ width:30px;
+ height:30px;
+ text-indent:-9999em;
+ font-size:1px;
+}
+
+.commercialIndicator.commercial
+{
+ background:url(img/paid-euro.png) no-repeat top right;
+}
+
+
+
+.deliPromoBox li .hiLite,
+.deliFeatureBox .deliPackage
+{
+ display:none;
+}
+
+.packageIcon
+{
+ margin:0 auto;
+ display:block;
+ width:50px;
+ height:1px;
+ padding: 0;
+ overflow: hidden;
+ padding-top: 50px;
+}
+
+.deliPromoBox li h3
+{
+ font-size:12px;
+ margin:0;
+ padding:0;
+}
+
+.deliPromoBox li .creator,
+.deliFeatureBox .deliPackage .creator
+{
+ font-size:9px;
+ display: none;
+}
+
+.deliPromoBox li .category
+{
+ font-size:9px;
+}
+
+.deliPromoBox li .popularity
+{
+ display: none;
+}
+
+
+.deliPromoBox li:hover .deliPackage
+{
+ position:absolute;
+ top:-25px;
+ left:-65px;
+ width:300px;
+ height:200px;
+ background:#fff;
+ border:1px solid #fff;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ z-index:200;
+ text-align:left;
+ padding:0;
+ box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.60);
+ -moz-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.60);
+ -webkit-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.60);
+}
+
+.deliPromoBox li:hover .deliPackage .brief,
+.deliFeatureBox .deliPackage .brief
+{
+ padding:5px 10px 10px 85px;
+ position:relative;
+ height:50px;
+}
+
+
+.deliPromoBox li:hover .deliPackage .brief .packageIcon,
+.deliFeatureBox .deliPackage .brief .packageIcon
+{
+ position:absolute;
+ left:10px;
+ top:5px;
+}
+
+
+.deliPromoBox li:hover .deliPackage h3,
+.deliFeatureBox .deliPackage h3
+{
+ font-size:14px;
+ margin-top:12px;
+}
+
+.deliPromoBox li:hover .deliPackage .creator,
+.deliFeatureBox .deliPackage .creator
+{
+ position:absolute;
+ bottom:5px;
+ right:5px;
+}
+
+.deliPromoBox li:hover .hiLite,
+.deliFeatureBox .deliPackage .hiLite
+{
+ display:block;
+ padding:5px 10px 10px 85px;
+}
+
+.deliPromoBox li:hover .hiLite p,
+.deliFeatureBox .deliPackage .hiLite p
+{
+ font-size:12px!important;
+ margin:0;
+ padding:0;
+ line-height:15px;
+ color: #444444
+}
+
+.deliPromoBox li:hover .hiLite a,
+.deliFeatureBox .deliPackage .hiLite a
+{
+ text-decoration:none!important;
+}
+
+.deliPromoBox li:hover .popularity,
+.deliFeatureBox .deliPackage .popularity
+{
+ display:block;
+ position: absolute;
+ top: 70px;
+ left: 10px;
+ width: 50px;
+ text-align: center;
+ font-size: 14px;
+ font-weight: bold;
+ color: #5c5c5c
+}
+
+.deliPromoBox li:hover .popularity .karma,
+.deliFeatureBox .deliPackage .popularity .karma{
+ padding-bottom: 7px;
+ border-bottom: 1px solid #ccc;
+ margin-bottom: 7px;
+
+}
+
+.deliPromoBox li:hover .popularity small,
+.deliFeatureBox .deliPackage .popularity small
+{font-size: 10px;
+ font-weight: normal; display: block; text-variant: uppercase}
+
+.deliTags #tagCloud
+{
+ margin:0;
+ padding:0;
+}
+
+.deliTags #tagCloud a
+{
+ text-decoration:none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.3s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.3s ease-in;
+ -moz-transition: background 0.3s ease-in;
+ padding:3px 5px;
+ margin:0;
+}
+
+.deliTags #tagCloud a:hover
+{
+ background:#8ECA56;
+ color:#fff;
+}
+
+
+ .deliNotification
+ {
+ padding:10px 20px 10px 20px;
+ background:#FFF6BF;
+ border:1px solid #FFD324;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ margin-bottom:10px;
+ }
+
+ .sidebarNotification
+ {
+ margin-top:44px;
+ width:288px;
+ float:left;
+ }
+
+ .deliNotification h3
+ {
+ margin:0;
+ padding:0;
+ }
+
+
+.deliPaging
+{
+ clear:both;
+}
+
+.deliPaging li
+{
+ width:auto!important;
+ height:auto!important;
+}
+
+.deliPaging li a
+{
+ display:block;
+ background:#eee;
+ color:#000;
+ padding:5px;
+ text-decoration:none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-transition-property: background;
+ -webkit-transition-duration: 0.3s;
+ -webkit-transition-timing-function: ease-in;
+ -o-transition: background 0.3s ease-in;
+ -moz-transition: background 0.3s ease-in;
+}
+
+.deliPaging li a:hover
+{
+ background:#8ECA56;
+ color:#fff;
+}
+
+.deliPaging li a.selected
+{
+ background:#8ECA56;
+ color:#fff;
+}
+
+
+.clearfix:after {
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+
+
+
+.clearfix {
+ display: inline-block;
+}
+
+html[xmlns] .clearfix {
+ display: block;
+}
+
+* html .clearfix {
+ height: 1%;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
diff --git a/Marketplace/Css/DeliAdmin.css b/Marketplace/Css/DeliAdmin.css
new file mode 100644
index 00000000..1a43b924
--- /dev/null
+++ b/Marketplace/Css/DeliAdmin.css
@@ -0,0 +1,39 @@
+.dataTable
+{
+ width:100% !important;
+ table-layout: auto;
+ border-collapse: collapse;
+ border:#ccc 1px solid;
+}
+/*Header and Pager styles*/
+.dataTable thead tr
+{
+ background-image: url(../images/HeaderWhiteChrome.jpg);
+ background-position:center;
+ background-repeat:repeat-x;
+ background-color:#fff;
+ border-bottom:solid 1px #ccc;
+}
+.dataTable th
+{
+ padding: 5px;
+ color: #333;
+ text-align:left;
+}
+
+
+/*RowStyles*/
+.dataTable td
+{
+ padding: 5px;
+ border-right: solid 1px #ccc;
+}
+
+.dataTable .borderTop
+{
+ border-bottom: solid 1px #ccc;
+}
+
+.dataTable .right{
+ text-align:right;
+}
\ No newline at end of file
diff --git a/Marketplace/Css/community.css b/Marketplace/Css/community.css
new file mode 100644
index 00000000..6258bbc0
--- /dev/null
+++ b/Marketplace/Css/community.css
@@ -0,0 +1,761 @@
+/*OVERALL LAYOUT*/
+html, body{padding: 0px; margin: 0px; border: none; height: 100%;}
+body{font-size: 12px; background: #f5f5f5 url(img/body_bg.gif) repeat-y top center;
+font-family: Trebuchet MS,Arial,sans-serif; color: #2d2c2e; padding-bottom: 0px;}
+
+body#tinymce{background-image: none !Important; text-align: left !Important; padding: 10px !Important;}
+
+#main{text-align: center;
+ min-height: 100%; height: auto !Important; height: 100%;
+}
+
+.wrapper, #contentArea{margin: auto; text-align: center; width: 980px; position: relative}
+.divider{padding: 5px; border-bottom: 1px #999 dotted; clear: both; margin-bottom: 10px;}
+
+#body, .subpage{text-align: left; }
+body a{color: #2244BB }
+
+/*TOP + TOPNavi */
+#top{
+background: url(img/top_bg_green2.gif) repeat-x top #8ECA56;
+position:relative; margin-bottom: 0px; height: 83px;}
+
+#top #memberInfo{background: #82b84f; height: 20px; padding: 5px;}
+
+#top a#logo{display: block; top: 9px; left: 0px; padding: 36px 161px 0px 0px; width: 1px; height: 1px; overflow: hidden;
+background: url(img/top_logo.png) no-repeat left top; position: absolute;
+}
+
+#top ul{float: right; list-style: none; margin: 12px 0 0 18px; padding: 0px; height: 29px; display: block;}
+#top ul li{display: block; float: left; padding: 0; padding-left: 5px; height: 29px;}
+
+#top ul li a{
+color:#FFFFFF; display:block;
+font-size:1.2em; font-variant:normal; font-weight:bold;
+padding: 7px; text-decoration: none; height: 27px}
+
+
+#top ul li a:hover{text-decoration: underline;}
+#top ul li.current a{background: url(img/top_nav_a_bg.png) no-repeat bottom center;}
+
+#top #memberHeaderProfile{position: absolute; top: 5px; right: 7px; font-size: 11px; color: #fff; text-align: right; width: 700px;}
+#top #memberHeaderProfile a{color: #fff; margin-left: 5px;}
+#top #memberHeaderProfile div{display: inline !Important;}
+
+
+#searchBar{background: #f4f4f2; border-bottom: 1px solid #dadad9; position: relative; padding: 0px; font-weight: bold; padding: 5px;}
+#searchBar input.field{clear: both; margin: 0px; font-size: 1.3em; border: 1px solid #ccc; background: #fff; width: 260px}
+#searchBar #bt_search{position: absolute; right: 0px; margin: 0px; font-size: 1.3em;}
+
+#searchBar .ui{text-align: left; width: 350px; position: relative; margin: auto;}
+
+#searchBarOptions{display: none; padding-top: 10px;}
+#searchBarOptions label{padding-right: 15px; padding-left 5px;}
+
+/* Box Elemenet */
+.box {
+background:#F6F7F7;
+border:1px solid #F2F2F2;
+display:block;
+list-style-image:none;
+list-style-position:outside;
+list-style-type:none;
+margin:0 0 20px;
+padding:0 0 6px;}
+
+.box h4{color:#444444; font-size:12px; font-weight:bold; line-height:12px; padding: 10px !Important; background: #F0F2F2;
+ margin-top: 0px; margin-bottom: 0px; position: relative;
+}
+
+.rounded{
+ -webkit-border-radius: 10px; /* Safari prototype */
+ -moz-border-radius: 10px; /* Gecko browsers */
+ border-radius: 10px; /* Everything else - limited support at the moment */
+}
+
+.infoBox{padding: 7px 7px 7px 50px; height: auto !Important; min-height: 35px; height: 35px; background: #DDF8CC no-repeat 10px 7px; font-size: 11px;}
+#forumTools{position: absolute; top: 5px; right: 0px; width: 270px; background-image: url(img/icons/info.png); }
+#projectsInfo{position: absolute; top: 5px; right: 0px; width: 270px; background-image: url(img/icons/add.png); }
+#newTopic{position: absolute; top: 5px; right: 0px; width: 270px; background-image: url(img/icons/add.png); }
+#solutionBox{position: absolute; top: 5px; right: 0px; width: 270px; background-image: url(img/icons/add.png); }
+
+.infoBox ul{list-style: none; margin: 0px; padding: 0px;}
+.infoBox ul li{padding: 0px 0px 3px 0px;}
+.infoBox a{padding: 2px; font-size: 12px;}
+.infoBox small{color: #999; display: block; padding-top: 2px;}
+
+div.buttons{padding: 20px; background: #F0F2F2; font-size: 18px;}
+
+a.button{padding: 10px 0px 10px 0px; border: 1px solid #EFEFEF; text-decoration: none;}
+a.button em{border: 5px solid #fff; padding: 5px; color: #fff; background: #F5366D; }
+
+/*Breadcrumb*/
+#breadcrumb{margin: 0px; margin-top: -10px !Important; padding: 4px; list-style: none; font-size: 10px; color: #999; display: block; margin-bottom: 10px;}
+#breadcrumb li{display: inline; padding-right: 5px; margin: 0px;}
+#breadcrumb li a{color: #999; padding-right: 3px;}
+
+
+/*Footer*/
+.push{height: 60px; clear: both;}
+#footer{font-size: 10px; background: #252525; color: #fff; padding: 20px; height: 19px; text-align: center;
+border-top: 1px dotted #999; margin-top: -60px; clear: both; position: relative;}
+
+#footer a{color: #fff !Important}
+
+/* FORM ELEMENTS */
+label.inputLabel {font-weight:bold; width: 10em; display: block; float: left; padding: 1.5em 1.5em 1em 0; text-align: right; }
+
+fieldset {padding:0em;margin:1.5em 0 0 0;border:none; border-bottom:1px solid #ccc;}
+fieldset small{display: block;}
+legend {font-weight:bold;font-size:1.2em;}
+input.text, input.title, textarea, select {margin:0.5em 0;border:1px solid #bbb;}
+input.text:focus, input.title:focus, textarea:focus, select:focus {border:1px solid #666;}
+input.text, input.title, select.title {width:300px;padding:5px;}
+input.title, select.title {font-size:1.5em;}
+
+.buttons input{font-size: 18px;}
+
+textarea {width:300px;height:250px;padding:5px;}
+.error, .notice, .success, .focus {padding:.2em;margin-bottom:1em;border:2px solid #ddd;}
+.error {background:#FBE3E4 !Important;color:#8a1f11;border-color:#FBC2C4 !Important;}
+.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
+.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
+
+.error * {color:#8a1f11 !Important;}
+.notice * {color:#514721;}
+.success * {color:#264409;}
+
+.focus{border: none; border-top: 1px solid; border-bottom: 1px solid; border-color: #999; background: #F0F0F0;}
+
+.spotlight{padding: 0px; margin-bottom: 20px; border: none; background: none;}
+.spotlight h3, .spotlight h4, .spotlight h2{position: relative; font-size: 14px; margin-bottom: 0px; margin-top: 0px; color: #333; border-bottom: 3px solid #efefef; padding-bottom: 4px;}
+.spotlight h2{font-size: 18px;}
+
+.spotlight ul{list-style: none; margin: 0px; padding-left: 10px;}
+.spotlight ul.pager{padding-left: 0px;}
+.spotlight li{padding: 3px;}
+.spotlight a{font-size: 12px;}
+
+.spotlight ul.summary{padding: 5px 0px;}
+.spotlight ul.summary li{padding-bottom: 12px !Important; border: none !Important}
+.spotlight a.rss_small{top: 3px;}
+
+dt{font-style: italic;}
+dd{padding-bottom: 5px;}
+label.error, label.notice, label.success {background: none; border: none; padding-left: 1em;}
+
+input.wikiheadline{display: block; background: white; border: 1px solid #DEE4EF; color: #46484B; width: 100%;}
+
+/* SEARCH RESULTS */
+#search .result{padding: 10px 10px 25px 80px; background: 20px 10px no-repeat url(search/forum.gif);}
+
+#search .result h3{padding: 0px; font-weight: normal; margin: 0px;}
+#search .result h3 a{font-size: 14px; font-weight: bold; display: block; color: #333; text-decoration: none;}
+#search .result a:hover{text-decoration: underline;}
+
+#search .result a *{color: inherit}
+#search .result p{color: #000; font-size: 12px; padding: 0px; margin: 0px;}
+#search .result cite{color: #666; font-size: 11px;}
+#search .result em{font-weight: bold !Important;}
+
+#search .wiki{background-image: url(search/wiki.gif);}
+#search .project{background-image: url(search/project.gif);}
+#search .forum{background-image: url(search/forum.gif);}
+#search .solution{background-image: url(search/solved.gif);}
+
+/* Member Badge */
+div.memberBadge{background: #f0f0f0; padding: 10px 0px 10px 0px; text-align: center;}
+div.memberBadge *{color: #333;}
+div.memberBadge img{display: block; margin: auto; border: 1px solid #999;}
+div.memberBadge span{padding-top: 8px; display: block; font-weight: bold; font-size: 12px}
+div.memberBadge small{display: block; font-weight: normal; margin-top: -6px; color: #999}
+
+/* FRONTPAGE */
+#dashboard{width: 980px; position: relative}
+#sidebar{text-align: left; width: 300px; float: right; margin:20px 0px 20px 0px;}
+
+.callToAction h1{font-size: 20px;}
+.callToAction p{font-size: 12px;}
+.callToAction h1 a{color: #066808; text-decoration: none;}
+
+ul.summary{list-style: none; padding: 7px; margin: 0px; }
+ul.summary li{display: block; border-bottom: #e7e7e7 1px dotted; padding: 3px;}
+ul.summary li a{display: block; font-size: 11px;}
+ul.summary li small a{display: inline;}
+
+ul.summary img{float: left; height: 32px; width: 32px; margin-right: 10px; overflow: hidden; font-size: 1px;}
+ul.forumTopics li{height: auto !Important; height: 37px; min-height: 37px;}
+
+ul.wiki li{padding-left: 42px; background: url(img/doc.png) no-repeat left top;}
+ul.projects li{padding-left: 42px; background: url(img/package.png) no-repeat left top;}
+
+a.rss_small{font-size: 9px; position: absolute; right: 10px; top: 8px; font-weight: normal; display: block;
+padding: 14px 14px 0px 0px; overflow: hidden; height: 0px; width: 0px; background: url(img/rss.png) no-repeat top left;
+}
+
+a.more{display: block; font-size: 11px; color: #999; text-align: center}
+
+/* PROJECTS */
+a.projectDownload{background: #ddf8cc url(img/down.png) no-repeat 5px 10px; padding: 10px 10px 10px 50px; display: block; margin-bottom: 10px; text-decoration: none;}
+a.projectDownload span{color: #999; text-decoration: none !Important; display: block; font-size: 80%;}
+
+a.projectPurchase{background: #cce2f8 url(img/piggybank.png) no-repeat 5px 10px; padding: 10px 10px 10px 50px; display: block; margin-bottom: 10px; text-decoration: none;}
+a.projectPurchase span{color: #999; text-decoration: none !Important; display: block; font-size: 80%;}
+
+.openForCollab{background: #cce2f8 url(img/group.png) no-repeat 5px 10px; padding: 10px 10px 10px 50px; display: block; margin-bottom: 10px; text-decoration: none;}
+.openForCollab span{color: #999; text-decoration: none !Important; display: block; font-size: 80%;}
+
+
+.projectGroups{margin: 0; padding: 0; list-style: none;}
+.projectGroups li{margin: 0; float: left;}
+.projectGroups li div{width: 380px; margin: 15px; margin-right: 30px; background: top left no-repeat; padding-left: 50px; height: 80px}
+
+.projectGroups h3{padding: 0px; font-weight: normal; margin: 0px;}
+.projectGroups h3 a{font-size: 14px; font-weight: bold; display: block; color: #333; text-decoration: none;}
+.projectGroups a:hover{text-decoration: underline;}
+
+.projectGroups a *{color: inherit}
+.projectGroups p{color: #000; font-size: 12px; padding: 0px; margin: 0px;}
+
+
+/* Options */
+#body .options{text-align: right; padding: 4px; font-size: 11px; margin-top:0px; margin-bottom: 10px;}
+/*#body .options ul{list-style: none; margin: 0px; padding: 0px; display: block; height: 25px;}
+#body .options ul li{float: left; padding-right: 15px;}
+#body .options ul li a{font-size: 11px;}*/
+
+
+#body .options ul li.create{float: right!important;}
+
+
+dl.summary{padding: 7px; font-size: 11px;}
+
+
+#divFileProgressContainer{width: 300px; margin-top: 10px;}
+#divFileProgressContainer .progressContainer{border: 1px solid #ccc; padding: 3px;}
+#divFileProgressContainer .progressBarStatus{font-size: 10px; color: #999; }
+#divFileProgressContainer .progressBarInProgress{background: green; height: 2px; overflow: hidden;}
+
+
+
+/* Member Profile */
+#profileNavigation{background: #F0F0F0; padding: 10px; border-bottom: 1px solid #ccc}
+#profileNavigation #memberInfo{height: 70px; float: right; width: 300px; background: no-repeat right top; text-align: right; padding-right: 10px;}
+#profileNavigation #memberInfo h3{color: #999; font-size: 18px; margin-bottom: 0px; margin-top: 5px;}
+#profileNavigation #memberInfo h4{color: #999; font-size: 13px; margin: 0px;}
+#profileNavigation #memberAvatar {float: right;}
+#profileNavigation #memberAvatar img {height: 50px;}
+#profileNavigation ul{padding: 17px; display: block; list-style: none; margin: 0px; font-size: 13px; font-weight: bold; color: #999;}
+#profileNavigation ul li{display: inline;}
+#profileNavigation ul a{padding: 10px;}
+
+#memberProfile #avatar{float: left; margin: 20px 25px 0px 0px; width: 55px}
+#memberProfile #details{float: left; width: 800px;}
+#memberProfile .badge{margin: auto; margin-top: 10px;}
+
+.yourProjects
+{
+ list-style-type:none;
+ margin-left:0;
+}
+
+.yourProjects .projectImage
+{
+ float:left;
+ margin-right: 10px;
+}
+
+.yourProjects .projectActions
+{
+ float:left;
+}
+.yourProjects h2
+{
+ font-weight: normal;
+}
+.yourProjects p a
+{
+ color: #999999;
+}
+
+/* Buddy Icon Form */
+#buddyIconForm {padding: 10px; display: block;}
+#buddyIconForm .iconOption{width: 320px; display: block; text-align: center; float: left; font-size: 18px; font-weight: bold; color: #999;}
+#buddyIconForm .iconOption img{display: block; margin: auto; border: none;}
+
+#webcamHolder{width: 320px; float: right; margin: 0px 0px 20px 20px;}
+
+/* VOTING */
+.voting{text-align: center; background: #FFF6BF; border: 2px solid #FFD324; padding: 10px 0px 10px 0px;}
+.voting span{font-size: 25px; font-weight: bold;
+color: #514721; display: block; text-align: center; margin-bottom: 7px;}
+.voting span a{color: #514721; text-decoration: none; border-bottom: 1px dotted #999}
+
+.voting a.vote, .voting a.noVote{border: 1px solid #eacf5c; background: #fff; color: #514721; padding: 2px; font-size: 9px; text-decoration: none;}
+.voting a.noVote{border: 1px solid #eacf5c; background: #FFF6BF; color: #eacf5c;}
+
+
+.voting span.good a{color: green;}
+.voting span.bad a{color: red;}
+
+.voting a img{border: none;}
+.voting .like, .voting .dislike, .voting .kill{font-size: 11px; color: #066808;}
+
+.voting .TopicSolver{border: 1px solid #066808; padding: 2px; display: block; margin-top: 3px }
+
+#moveList{ z-index: 99999; text-align: right; display: none; margin: 7px 0px 0px 20px; padding: 7px; border: 1px solid #ccc; background: #fff; position: absolute; width: 250px;}
+#moveList li{text-align: left !Important; padding: 0px; list-style: none; display: block !Important; float: none !Important;}
+#moveList li a{padding: 3px; display: block !Important; float: none;}
+
+.voting .kill, .voting #ToggleMoveList{background: #fff !Important; color: #680708; border: 1px solid #680708; padding: 3px; display: block; font-size: 11px; margin-top: 10px;}
+#ToggleMoveList{border-color: #ccc !Important; color: blue !Important;}
+
+
+
+
+/* Pager */
+.pager{margin: 0px; padding: 10px 0px 0px 0px; list-style: none;}
+.pager li{display: block; padding-right: 2px; margin: 0px; margin-bottom: 9px;float:left;}
+.pager li a{font-size: 11px; padding: 3px 6px; border: 1px solid #ccc; text-decoration: none;}
+.pager li.current a{border: none;}
+.pager li a:hover{color: white; background: #2244BB;}
+.pager li.current a{font-weight: bold;}
+
+#memberLoader span, #memberLoader_weeks span, #memberLoader_year span{display: block; background: url(img/ajax-loadercircle.gif) no-repeat center left;
+ font-size: 11px; color: #999; margin: 10px; padding: 5px 30px 10px 40px; width: 200px;}
+
+/* Member Locator */
+
+
+#memlocresults{
+ margin-top: 10px;
+}
+#memlocradius{
+ width: 470px;
+
+}
+#memlocslider{
+ float:right;
+ margin-top: 10px;
+}
+
+/* SIMPLE MODAL */
+#simplemodal-container{background:#FFF6BF; color:#514721; width: 520px; border: 4px solid #FFD324; padding: 20px;}
+#simplemodal-container h3, #simplemodal-container p{color:#514721; margin: 0px; padding: 0px;}
+#simplemodal-container h3{font-size: 20px}
+#simplemodal-container textarea{display: block; padding: 5px; width: 510px; height: 50px;}
+#modalCloseButton{position: absolute; top: 10px; right: 10px; color: #514721; font-size: 11px;}
+
+/* Voting history */
+ul.votingHistory{display: block; padding: 5px; margin: 0px; margin-bottom: 10px; list-style: none; overflow: auto; height: 400px;}
+ul.votingHistory li{display: block; padding: 10px 10px 10px 35px; margin: 0px; border-top: 1px dotted #ccc; font-size: 11px; background: 5px 12px no-repeat;}
+
+ul.votingHistory li.up{background-image: url(img/icons/thumb_up.png); color: #118B00}
+ul.votingHistory li.down{background-image: url(img/icons/thumb_down.png); color: #8B0006}
+
+
+/* NOTIFICATION BANNER */
+#notification{text-align: center; background:#FFF6BF; color:#514721; font-size: 14px; font-weight: bold;
+border-bottom: 1px solid #FFD324; padding: 10px;
+
+}
+
+/*Project Tagger*/
+.tagger { float:left; }
+.tagAdd { margin:0 0 0 6px;}
+.tagList { list-style:none; padding:0; margin:0; clear:both; border-left:3px solid #ddd; padding-left:4px; float:left; margin:5px 10px;}
+.tagName { cursor:pointer; float:left; clear:both; padding:0.1em 1.5em 0.1em 0.4em;}
+.tagName:hover { background:#efefef url(img/bullet_toggle_minus.png) right 2px no-repeat; }
+
+
+
+/* TAGGER AUTOCOMPLETE */
+.ac_results {
+ padding: 0px;
+ border: 1px solid black;
+ background-color: white;
+ overflow: hidden;
+ z-index: 99999;
+}
+
+.ac_results ul {
+ width: 100%;
+ list-style-position: outside;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+.ac_results li {
+ margin: 0px;
+ padding: 2px 5px;
+ cursor: default;
+ display: block;
+ /*
+ if width will be 100% horizontal scrollbar will apear
+ when scroll mode will be used
+ */
+ /*width: 100%;*/
+ font: menu;
+ font-size: 12px;
+ /*
+ it is very important, if line-height not setted or setted
+ in relative units scroll will be broken in firefox
+ */
+ line-height: 16px;
+ overflow: hidden;
+}
+
+.ac_loading {
+ background: white url('img/indicator.gif') right center no-repeat;
+}
+
+.ac_odd {
+ background-color: #eee;
+}
+
+.ac_over {
+ background-color: #0A246A;
+ color: white;
+}
+
+/*TAGCLOUD*/
+#tagCloud
+{
+ margin-top: 10px;
+ padding:10px;
+ margin-bottom:10px;
+ text-align:justify;
+}
+
+#tagCloud A
+{
+ text-decoration:none;
+ margin-left:5px;
+ margin-right:5px;
+ font-family:Verdana, Arial;
+ text-transform:lowercase;
+ color: #8a8a8a;
+}
+
+#tagCloud A:hover, #tagCloud a.current
+{
+ color:#000;
+ text-decoration:underline;
+}
+
+#tagCloud A.weight1
+{
+ font-size: 2em;
+ font-weight:bolder;
+}
+#tagCloud A.weight2
+{
+ font-size:1.7em;
+ font-weight:bolder;
+}
+#tagCloud A.weight3
+{
+ font-size: 1.4em;
+ font-weight:bolder;
+}
+#tagCloud A.weight4
+{
+
+ font-size: 1.1em;
+}
+#tagCloud A.weight5
+{
+ font-size: 0.8em;
+}
+
+#tagCloud span
+{
+ font-size: 10px !Important;
+ color: #595a5a!Important;
+ font-weight: normal !Important;
+}
+
+.spotlight ul.projectsTagged li{border-bottom:1px solid #EFEFEF !important;}
+ul.projectsTagged li h5 a, .projectsTagged h5{text-decoration: none; font-weight: bold; font-size: 14px; margin-bottom: 0px; margin-top: 10px; color: #000;}
+ul.projectsTagged li h5 a:hover{text-decoration: underline;}
+
+
+.projectsTagged p{#search .result p{color: #000; font-size: 12px; padding: 0px; margin: 0px;}}
+
+.hLabel{
+ font-size: 10px;
+ color: #adc251;
+}
+
+/* Project Page */
+#project{position: relative;}
+#projectOwner{float: left; width: 55px; text-align: center; margin: 10px 20px 0px 0px;}
+#projectDescription{float: left;}
+
+#projectvoting{position: absolute; top: 10px; right: 0px;}
+#project .options{border-top: #efefef 1px solid; font-size: 11px; padding: 2px 0px 25px 0px; margin-right: 80px }
+#project .badge{margin: auto; margin-top: 10px;}
+
+/* Project Screenshots */
+.projectscreenshot{
+ display:block;
+ float:left;
+ padding:10px;
+ background-color: #F6F7F7;
+ margin-right: 5px;
+ margin-bottom: 5px;
+}
+.projectscreenshot:hover{
+ background-color: #F0F2F2;
+}
+
+a.badge{display: block; background: no-repeat center center; width: 40px; height: 40px; text-decoration: none; border: none; overflow: hidden; text-indent: -9999px;}
+a.mvp{background-image: url(badges/mvp.png);}
+a.core{background-image: url(badges/core.png);}
+a.hq{background-image: url(badges/hq.png);}
+a.vendor{background-image: url(badges/vendor.png);}
+a.admin{background-image: url(badges/admin.png);}
+a.mvpcandidate {background-image: url(badges/mvp_nominee.png);}
+
+/* Options */
+#options{display: block; height: 20px; padding: 5px; border-top: #efefef 1px solid; margin: 10px 0 0px 0;}
+#options ul{list-style: none; margin: 0px; padding: 0px; display: block; height: 20px;}
+#options ul li{float: left; padding-right: 15px; margin: 0px;}
+#options ul li a{font-size: 11px; margin: 0px;}
+#options ul li.right{float: right}
+
+/* Alert */
+.alert{
+background:#FFF6BF;
+color:#514721;
+font-size: 14px;
+border: 1px solid #FFD324;
+padding: 5px;
+margin-bottom:5px;
+}
+
+.confirm{
+background:#8ECA56;
+
+font-size: 14px;
+border: 1px solid #6AAE30;
+padding: 5px;
+margin-bottom:5px;
+}
+/* Top Notifications */
+#topNotificationContainer
+{
+ display:none;
+}
+.topNotification
+{
+ background-color: #FFF6BF;
+ padding: 7px 0px;
+ border-bottom:1px solid #FFD324;
+ color: #735005;
+ font-weight:bold;
+}
+.notifyClose
+{
+ display:block;
+ float:right;
+ cursor:pointer;
+ border: 2px solid #FFD324;
+ background-color: #FFF6BF;
+ color: #735005;
+ padding: 0px 4px;
+ margin-right: 20px;
+ font-family: Arial;
+ text-align:center;
+ font-weight: 700;
+ line-height: 1;
+}
+
+.notifyClose a
+{
+ color: ##514721;
+}
+
+/* General */
+
+a.remove
+{
+ color:#680708;
+}
+
+
+/* Project mark verified */
+.verifyWikiFile
+{
+ cursor:pointer;
+ color:green;
+ margin-top: 5px;
+ padding-left:18px;
+ background: url('img/verify.png') no-repeat bottom left;
+ font-size:100% !Important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
diff --git a/Marketplace/Css/fonts.css b/Marketplace/Css/fonts.css
new file mode 100644
index 00000000..2083872c
--- /dev/null
+++ b/Marketplace/Css/fonts.css
@@ -0,0 +1,109 @@
+/*FONTS */
+
+body{font-family: Arial, Helvetica, sans-serif; font-size: 13px;}
+
+h1, h2, h3, h4, h5, p{font-family: Arial, Helvetica, sans-serif; color: #333;}
+a{color: #1A6AB3;}
+
+p{font-size: 13px; margin-top: 7px; margin-bottom: 15px; color: #333; line-height: 18px}
+small{font-size: 11px; color: #5b5b5b;}
+
+em{color: #332e2e; font-style: normal; font-weight: bold;}
+h1{font-size: 28px; font-weight: bold; margin-bottom: 7px;}
+h2{font-size: 18px; font-weight: bold; margin-top: 0px; margin-bottom: 3px;}
+h3{font-size: 14px; font-weight: bold;}
+h4{font-size: 12px; font-weight: bold; }
+h5{font-size: 11px; font-weight: bold; }
+
+code, pre {
+background-color:#F2F2F2;
+border:1px solid #E3E3E3;
+border-left: 4px solid #e3e3e3;
+display:block !Important;
+font-family:monospace;
+font-size:12px;
+line-height:1.4em;
+margin:0 6em 1em 1em;
+padding: 0.5em;
+max-width: 650px;
+overflow: auto;
+}
+
+code pre{padding: 0px; border: none}
+
+
+a.act{padding: 2px; padding-left: 20px; color: #252525; background: no-repeat center left;}
+
+
+a.topics{background-image: url(img/ico/balloons.png);}
+a.yourtopics{background-image: url(img/ico/balloon-smiley.png);}
+
+a.edit{background-image: url(img/ico/pencil-small.png);}
+a.delete{background-image: url(img/ico/cross-small.png);}
+a.move{background-image: url(img/ico/document-tree.png);}
+
+a.subscribe{background-image: url(img/ico/mail--plus.png);}
+a.UnSubscribeTopic, a.UnSubscribeForum{background-image: url(img/ico/mail--delete.png);}
+a.upload{background-image: url(img/ico/document--plus.png);}
+#options a.history{background-image: url(img/ico/clock-history.png);}
+
+
+.options{padding: 3px !Important;}
+
+a.add{background: #8ECA56 2px 2px url(img/ico/plus-button.png) no-repeat; padding: 3px 3px 3px 25px;
+border: 1px solid #618A3B; color: #fff; text-decoration: none; margin-top: 2px;
+ -webkit-border-radius: 3px; /* Safari prototype */
+ -moz-border-radius: 3px; /* Gecko browsers */
+ border-radius: 3px; /* Everything else - limited support at the moment */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
diff --git a/Marketplace/Css/repository.css b/Marketplace/Css/repository.css
new file mode 100644
index 00000000..eba2b64b
--- /dev/null
+++ b/Marketplace/Css/repository.css
@@ -0,0 +1,181 @@
+/* GENERAL STYLES */
+body,html{padding: 10px !Important; margin: 0px !Important; padding: 10px; background: white; background-image: none !Important;}
+#closeHandle{display: none !Important;}
+
+#header{font-size: 14px; font-weight: bold; color: rgb(153, 153, 153); margin-bottom: 7px;}
+
+#header img{display: none !Important;}
+img.gradient{display: none !Important;}
+#theForm{margin-top: -15px; width: 100%; position: relative;}
+#Table1{width: auto !Important; width: 100%; display: block; margin: 0px;}
+
+#profileInfo{font-size: 10px; position: absolute; right: 10px; top: 10px; color: #999;}
+.propertyPane{padding: 10px; background-repeat: repeat-x}
+
+a{color: black;}
+
+body {
+ margin: 2px
+}
+
+#body{margin-top: 50px;}
+
+.repoBox{display: block; clear: both; padding: 10px; border-bottom: 1px solid #ccc; margin-bottom: 15px;}
+.noborder{border: none !Important;}
+h4{margin-top: 0px; margin-bottom: 15px; font-size: 15px;}
+.gradient{background-repeat: no-repeat;}
+
+#header{position: absolute; top: 10px; right: 15px;}
+#profile{text-align: right; font-size: 10px;}
+#profile input{width: 200px; margin-left: 15px;}
+
+
+.deliLeft{
+
+ width: 200px; /*Width of left column*/
+ position: absolute;
+}
+
+.deliRight
+{
+ float: none !Important;
+ margin-left: 230px !Important;
+ width: auto !Important;
+}
+a.viewAll{top: 14px !Important;}
+
+
+
+.deliNav{background: none !Important; padding-left: 0;}
+.deliNav a:hover{text-decoration: underline !Important;}
+
+
+/* Project page */
+
+
+
+/*MOVE STUFF */
+#breadcrumb{position: absolute; top: 20px; left: 10px; margin: 0px; margin-top: -10px !Important; padding: 4px; list-style: none; font-size: 11px; color: #333; display: block; margin-bottom: 10px;}
+#breadcrumb li{display: inline; padding-right: 5px; margin: 0px;}
+#breadcrumb li a{color: #999; padding-right: 3px;}
+
+/*HIDE STUFF*/
+h1{display: none !Important;}
+.options{display: none !Important;}
+.deliFeatureBox{display: none !Important;}
+#projectOwner{display: none !Important;}
+
+
+/*TAGCLOUD*/
+#tagCloud
+{
+ margin-top: 10px;
+ padding:10px;
+ margin-bottom:10px;
+ text-align:justify;
+}
+
+#tagCloud A
+{
+ text-decoration:none;
+ margin-left:5px;
+ margin-right:5px;
+ font-family:Verdana, Arial;
+ text-transform:lowercase;
+ color: #8a8a8a;
+}
+
+#tagCloud A:hover, #tagCloud a.current
+{
+ color:#000;
+ text-decoration:underline;
+}
+
+#tagCloud A.weight1
+{
+ font-size: 2em;
+ font-weight:bolder;
+}
+#tagCloud A.weight2
+{
+ font-size:1.7em;
+ font-weight:bolder;
+}
+#tagCloud A.weight3
+{
+ font-size: 1.4em;
+ font-weight:bolder;
+}
+#tagCloud A.weight4
+{
+
+ font-size: 1.1em;
+}
+#tagCloud A.weight5
+{
+ font-size: 0.8em;
+}
+
+#tagCloud span
+{
+ font-size: 10px !Important;
+ color: #595a5a!Important;
+ font-weight: normal !Important;
+}
+
+
+/* CLEAR FIX */
+clearfix:after {
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+.clearfix {
+ display: inline-block;
+}
+html[xmlns] .clearfix {
+ display: block;
+}
+* html .clearfix {
+ height: 1%;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
diff --git a/Marketplace/Css/screen.css b/Marketplace/Css/screen.css
new file mode 100644
index 00000000..f518255f
--- /dev/null
+++ b/Marketplace/Css/screen.css
@@ -0,0 +1,1742 @@
+* {font-size: 100.01%;}
+html {font-size: 62.5%;}
+body{
+ color:#1d1d1d;
+ font:1.3em Calibri, Arial, Helvetica, sans-serif;
+ margin:0;
+ background:#fff;
+ min-width:999px;
+}
+
+
+a{
+ text-decoration:none;
+ color:#252525;
+}
+a:hover{text-decoration:underline;}
+a.ShopButton{display: block; width: 100px; heigth: 100px; background: red;}
+
+img{border-style:none;}
+form,fieldset{
+ margin:0;
+ padding:0;
+ border-style:none;
+}
+input,textarea,select{
+ font:100% Calibri, Arial, Helvetica, sans-serif;
+ vertical-align:middle;
+}
+#wrapper{
+ width:100%;
+ position:relative;
+ padding:439px 0 0;
+}
+
+#wrapper.Class-Frontpage{padding:489px 0 0;}
+
+.none{display:none;}
+/* header */
+#header{
+ position:absolute;
+ top:0;
+ left:0;
+ height:469px;
+ width:100%;
+}
+/* form-box */
+.form-box{
+ width:100%;
+ background:#171717 url(../images/bg-form-box.gif) repeat-x;
+}
+.form-box .holder{
+ margin:0 auto;
+ width:940px;
+ overflow:hidden;
+ padding:6px 10px 8px;
+ position: relative;
+}
+/* search */
+.search {
+ float:right;
+ width:220px;
+}
+.search span{
+ float:left;
+ background: url(../images/bg-search.gif) no-repeat;
+ width:178px;
+ height:17px;
+ padding:3px 10px 0;
+ font-size:12px;
+}
+.search span input{
+ display:block;
+ background:none;
+ border:none;
+ outline:none;
+ margin:0;
+ padding:0;
+ width:100%;
+ color:#fff;
+}
+.search .submit{float:right;}
+/* add-nav */
+.add-nav{
+ float:right;
+ margin:0;
+ padding:3px 7px 0 0;
+ list-style:none;
+ font-size:12px;
+ line-height:14px;
+ letter-spacing:-1px;
+}
+.add-nav li{
+ float:left;
+ padding:0 16px 0 0;
+}
+.add-nav li a{color:#fff;}
+/* promo-box */
+.promo-box{
+ width:100%;
+ position:relative;
+}
+/* container */
+.promo-box .container{
+ height:380px;
+ width:100%;
+ overflow:hidden;
+}
+.promo-box .holder{
+ margin:0 auto;
+ width:940px;
+ padding:98px 10px 0;
+}
+.promo-box .holder:after{
+ display:block;
+ clear:both;
+ content:"";
+}
+
+.promo-box .tab{width: 100%}
+
+
+.promo-box .blackBlue .holder,
+.promo-box .blackPurple .holder{
+ width:943px;
+ padding-left:7px;
+}
+
+.promo-box .yellow .holder{padding-top:70px;}
+
+
+.promo-box .blue,
+.promo-box .green,
+.promo-box .tabPanel{
+ background:url(../images/bg-tab-content2.gif) repeat-x;
+}
+/* tab-content4 */
+.promo-box .yellow{
+ background:url(../images/bg-tab-content4.gif) repeat-x;
+}
+/* tab-content5 */
+.promo-box .cyan{
+ background:url(../images/bg-tab-content4.gif) repeat-x;
+}
+
+.promo-box .cyan-alt{
+ background:url(../images/bg-tab-content4.gif) repeat-x;
+}
+
+.promo-box .bg-get-started, .promo-box .bg-natural-born {
+ background:url(../images/bg-tab-content4.gif) repeat-x;
+}
+
+/* tab-content1 */
+.promo-box .blackPurple{background:#252525 url(../images/bg-tab-content1.gif) repeat-x;}
+
+/* tab-content6 */
+.promo-box .blackBlue{
+ background:url(../images/bg-tab-content6.gif) repeat-x;
+}
+
+.promo-box .tabPanel .container{background:url(../images/bg-container2.gif) no-repeat 50% 0;}
+.promo-box .bg-support .container{background:url(../images/bg-support.jpg) no-repeat 50% 0;}
+.promo-box .bg-get-started .container{background:url(../images/bg-start.jpg) no-repeat 50% 0;}
+.promo-box .bg-natural-born .container{background:url(../images/bg-natural-niels.jpg) no-repeat 50% 0;}
+
+/* Shop Flow Tab */
+.promo-box .shopFlow{background: url(../images/bg-tab-content-none.gif) repeat-x !Important;}
+.promo-box .shopFlow .container{background:url(../images/bg-tab-container-none.gif) no-repeat 50% 0; height: 180px !Important;}
+.promo-box .shopFlow .holder{padding:98px 0px 0 !Important;}
+
+/* Empty Tab */
+.promo-box .empty{background: url(../images/bg-tab-content-none.gif) repeat-x !Important;}
+.promo-box .empty .container{background:url(../images/bg-tab-container-none.gif) no-repeat 50% 0; height: 120px !Important;}
+
+/* Map tab */
+.partnerMap{width: 100%;}
+.partnerMap .holder{padding: 0px; padding-left: 0px !Important; padding-top:70px !Important; width: 100% !Important; margin-left: 0px;}
+.partnerMap .container{background:url(../images/bg-container4.gif) no-repeat 50% 0;}
+
+.promo-box .blackPurple .container{background:url(../images/bg-container1.gif) no-repeat 50% 0;}
+.promo-box .green .container{background:url(../images/bg-container2.gif) no-repeat 50% 0;}
+.promo-box .blue .container{background:url(../images/bg-container3.gif) no-repeat 50% 0;}
+.promo-box .yellow .container{background:url(../images/bg-container4.gif) no-repeat 50% 0;}
+.promo-box .cyan .container{background:url(../images/bg-container5.jpg) no-repeat 50% 0;}
+.promo-box .blackBlue .container{background:url(../images/bg-container6.gif) no-repeat 50% 0;}
+
+/* panel */
+.panel{
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+}
+.panel-holder{
+ margin:0 auto;
+ width:940px;
+ overflow:hidden;
+}
+/* logo */
+.logo{
+ float:left;
+ width:168px;
+ height:51px;
+ overflow:hidden;
+ text-indent:-9999px;
+ background:url(../images/logo.png) no-repeat;
+ margin:10px 0 0;
+}
+.logo a{
+ height:100%;
+ display:block;
+}
+/* nav */
+#nav{
+ float:right;
+ margin:0;
+ padding:0;
+ list-style:none;
+}
+#nav li{
+ float:left;
+ background:url(../images/bg-nav.png) no-repeat;
+ padding:12px 0 0 16px;
+ margin:0 15px 0 0;
+ height:58px;
+ display:inline;
+}
+#nav li:first-child{background:none;}
+#nav li a{
+ float:left;
+ text-indent:-9999px;
+ overflow:hidden;
+ height:34px;
+ cursor:pointer;
+ outline:none;
+}
+#nav li a.get-started{
+ background:url(../images/text-get-started.png) no-repeat;
+ width:81px;
+}
+#nav li.active a.get-started,
+#nav li a.get-started:hover{background:url(../images/text-get-started-hover.png) no-repeat;}
+
+#nav li a.products{
+ background:url(../images/text-products.png) no-repeat;
+ width:66px;
+}
+#nav li.active a.products,
+#nav li a.products:hover{background:url(../images/text-products-hover.png) no-repeat;}
+
+#nav li a.certified-partners{
+ background:url(../images/text-partners.png) no-repeat;
+ width:66px;}
+#nav li.active a.certified-partners,
+#nav li a.certified-partners:hover{background:url(../images/text-partners-hover.png) no-repeat;}
+
+
+#nav li a.help-and-support{
+ background:url(../images/text-support.png) no-repeat;
+ width:106px;
+}
+#nav li.active a.help-and-support,
+#nav li a.help-and-support:hover{background:url(../images/text-support-hover.png) no-repeat;}
+
+#nav li a.developers-site{
+ background:url(../images/text-site.png) no-repeat;
+ width:111px;
+}
+#nav li.active a.developers-site,
+#nav li a.developers-site:hover{background:url(../images/text-site-hover.png) no-repeat;}
+
+#nav li a.about-us{
+ background:url(../images/text-about-us.png) no-repeat;
+ width:62px;
+}
+#nav li.active a.about-us,
+#nav li a.about-us:hover{background:url(../images/text-about-us-hover.png) no-repeat;}
+/* video-holder */
+.video-holder{
+ float:left;
+ background:url(../images/bg-video-holder.png) no-repeat;
+ width:465px;
+ height:265px;
+ padding:2px 0 0 3px;
+}
+.video-holder a{position:relative;}
+.video-holder img{display:block;}
+.tab-content6 .text-holder,
+.tab-content1 .text-holder{
+ overflow:hidden;
+ height:1%;
+ padding:3px 0 0 15px;
+}
+.cms{
+ display:block;
+ background:url(../images/text-cms.png) no-repeat;
+ width:364px;
+ height:154px;
+ text-indent:-9999px;
+ overflow:hidden;
+ margin:0 0 7px 2px;
+}
+/* section */
+.section{
+ overflow:hidden;
+ width:372px;
+}
+/* list */
+.list{
+ margin:0;
+ padding:10px 0 0;
+ list-style:none;
+ float:left;
+ width:200px;
+}
+.list li{
+ background:url(../images/bg-list.gif) no-repeat 0 8px;
+ padding:0 0 0 5px;
+ margin:0 0 2px;
+ float:left;
+ width:100%;
+}
+.list li span{
+ text-indent:-9999px;
+ overflow:hidden;
+ height:22px;
+ float:left;
+}
+.list li span.solutions{
+ width:260px;
+ background:url(../images/text-solutions_new.png) no-repeat;
+}
+.list li span.free{
+ width:68px;
+ background:url(../images/text-free.png) no-repeat;
+}
+.download{
+ float:right;
+ background:url(../images/btn-download.png) no-repeat;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:108px;
+ height:108px;
+ cursor:pointer;
+}
+.download:hover{background:url(../images/btn-download-hover.png) no-repeat;}
+/* certificat */
+.certificat{
+ position:absolute;
+ top:70px;
+ right:0;
+ width:180px;
+}
+.certificat span{
+ display:block;
+ background:url(../images/bg-certificat.png) no-repeat;
+ width:180px;
+ height:107px;
+ text-indent:-9999px;
+ overflow:hidden;
+}
+
+
+a.our{
+ float:right;
+ background:url(../images/btn_our.png) no-repeat;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:108px;
+ height:108px;
+ cursor:pointer;
+ margin-top: -25px;
+}
+a.our:hover{background:url(../images/btn_our_hover.png) no-repeat;}
+
+
+/* carousel-w */
+.carousel-w{width:100%;}
+.site-running{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-site-running.png) no-repeat;
+ width:385px;
+ height:51px;
+}
+.as-free-as-you-need{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-as-free-as-you-need.png) no-repeat;
+ width:382px;
+ height:50px;
+ margin-top: 25px;
+}
+.text-developers-dream{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-a-developers-dream.png) no-repeat;
+ width:382px;
+ height:50px;
+ margin-top: 25px;
+}
+.prices-text {
+ margin-top: 15px;
+ width: 520px;
+}
+.text-well-help{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-well-help.png) no-repeat;
+ width:272px;
+ height:50px;
+ margin-top: 25px;
+}
+.support-text {
+ margin-top: 15px;
+ width: 520px;
+}
+.text-natural-born{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-natural-born-umbracians.png) no-repeat;
+ width:480px;
+ height:50px;
+ margin-top: 25px;
+}
+.get-started-text {
+ margin-top: 0px;
+ width: 520px;
+}
+.text-get-started{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-dont-worry-be-umbraco.png) no-repeat;
+ width:272px;
+ height:90px;
+ margin-top: 25px;
+ margin-bottom: 25px;
+}
+.about-text {
+ margin-top: 15px;
+ width: 520px;
+}
+.take-the-test {
+ float:right;
+ width:108px;
+ height:108px;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/btn-test-your-needs.png) no-repeat;
+ cursor:pointer;
+ margin-top: 50px;
+ margin-left: 10px;
+}
+.take-the-test:hover{background:url(../images/btn-test-your-needs-hover.png) no-repeat;}
+
+/* twocolumns */
+.twocolumns{
+ float:right;
+ width:627px;
+ padding:37px 0 0;
+}
+/* switcher */
+.switcher{
+ width:100%;
+ overflow:hidden;
+ border-bottom:2px solid #212627;
+ padding:0 0 9px;
+ margin:0 0 20px;
+}
+.switcher-inner{
+ float:right;
+ margin:-2px 0 0;
+}
+.switcher ul{
+ margin:0;
+ padding:0;
+ list-style:none;
+ float:right;
+}
+.switcher ul li{
+ float:left;
+ padding-left:9px;
+}
+.switcher ul li a{
+ float:left;
+ background:url(../images/bg-link.gif) no-repeat;
+ width:11px;
+ height:12px;
+ overflow:hidden;
+ text-indent:-9999px;
+ font-size:1px;
+ line-height:1px;
+}
+.switcher ul li a.current,
+.switcher ul li a:hover{background-position:0 100%;}
+/* carousel-container */
+.carousel-container{
+ overflow:hidden;
+ height:1%;
+ padding:0 7px;
+}
+.link-prev,
+.link-next{
+ text-indent:-9999px;
+ overflow:hidden;
+ width:46px;
+ height:46px;
+ margin-top:62px;
+ outline:none;
+}
+.link-prev{
+ float:left;
+ background:url(../images/bg-link-prev.gif) no-repeat;
+ margin-right:26px;
+}
+.link-next{
+ float:right;
+ background:url(../images/bg-link-next.gif) no-repeat;
+}
+.link-prev:hover,
+.link-next:hover{background-position:0 100%;}
+.carousel-container div{
+ float:left;
+ position:relative;
+ width:784px;
+ height:175px;
+ overflow:hidden;
+}
+.carousel-container div ul{
+ margin:0;
+ padding:0;
+ list-style:none;
+ float:left;
+ width:99999px;
+}
+.carousel-container div ul li{
+ float:left;
+ width:784px;
+ overflow:hidden;
+}
+.carousel-container div ul li ul{
+ width:792px;
+ margin-right:-8px;
+}
+.carousel-container div ul li ul li{
+ width:190px;
+ margin:0 8px 0 0;
+}
+.carousel-container div.visual{
+ background:url(../images/bg-visual.png) no-repeat;
+ width:188px;
+ padding-left:1px;
+ float:none;
+}
+.carousel-container div ul li img{display:block;}
+/* guidance-box */
+.guidance-box{
+ float:left;
+ padding:14px 0 0;
+ width:222px;
+}
+.easy{
+ background:url(../images/text-easy.png) no-repeat;
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:175px;
+ height:90px;
+ padding:0 0 50px;
+}
+.get-books{
+ float:right;
+ width:108px;
+ height:108px;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/btn-get-books.png) no-repeat;
+ cursor:pointer;
+}
+.get-books:hover{background:url(../images/btn-get-books-hover.png) no-repeat;}
+/* twocolumns */
+.twocolumns{
+ float:right;
+ width:627px;
+ padding:37px 0 0;
+}
+/* column */
+.column{
+ float:left;
+ width:137px;
+}
+.white-paper{
+ display:block;
+ width:120px;
+ height:24px;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-white-paper.png) no-repeat;
+}
+.twocolumns .switcher{margin-bottom:29px;}
+.twocolumns .switcher-inner{
+ margin:-6px 0 0;
+}
+.twocolumns .switcher ul{margin-top:0;}
+/* long */
+.long{
+ float:right;
+ width:460px;
+}
+.videos{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:121px;
+ height:18px;
+ background:url(../images/text-videos.png) no-repeat;
+}
+.twocolumns .link-prev,
+.twocolumns .link-next{margin-top:53px;}
+.twocolumns .link-prev{margin-right:24px;}
+.twocolumns .carousel-container div{width:308px;}
+.twocolumns .carousel-container div ul li{width:308px;}
+.twocolumns .carousel-container div ul li ul{
+ width:320px;
+ margin-right:-12px;
+}
+.twocolumns .carousel-container div ul li ul li{
+ width:148px;
+ margin-right:12px;
+}
+.carousel-container div.visual2{
+ background:url(../images/bg-visual2.png) no-repeat;
+ width:145px;
+ padding:2px 0 0 3px;
+ float:none;
+}
+.visual2 .text{
+ display:block;
+ background:#252525;
+ height:63px;
+ width:122px;
+ padding:6px 9px 2px;
+ color:#fff;
+ font-size:11px;
+ line-height:18px;
+ cursor:pointer;
+}
+.visual2 .text strong{
+ display:block;
+ font-size:14px;
+}
+.carousel-container div ul li a:hover .text{color:#ff6e00;}
+.price{
+ float:left;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-price.png) no-repeat;
+ width:195px;
+ height:100px;
+ margin:84px 104px 0 0;
+}
+/* listing */
+.listing{
+ margin:0;
+ padding:0;
+ list-style:none;
+ float:left;
+ background:url(../images/bg-listing.gif) repeat-y 171px 0;
+ width:400px;
+ height:310px;
+ position:relative;
+}
+.listing li{
+ position:absolute;
+ float:left;
+}
+.listing li a{outline:none;}
+.listing li.style1{
+ left:0;
+ top:80px;
+}
+.listing li.style2{
+ left:191px;
+ top:59px;
+}
+.listing li.style3{
+ left:255px;
+ top:146px;
+}
+.listing li.style4{
+ left:190px;
+ top:211px;
+}
+.listing li.style5{
+ left:115px;
+ bottom:17px;
+}
+.listing li.style6{
+ left:182px;
+ bottom:20px;
+}
+.listing li a img{
+ float:left;
+ margin-right:6px;
+}
+.listing li.style1 a img{
+ display:block;
+ float:none;
+}
+.listing li a span{
+ float:left;
+ cursor:pointer;
+ text-indent:-9999px;
+ overflow:hidden;
+}
+.listing li a span.cms2{
+ float:none;
+ display:block;
+ background:url(../images/text-cms2.png) no-repeat;
+ width:24px;
+ height:8px;
+ margin:0 0 -4px;
+}
+.complete{
+ background:url(../images/text-complete.png) no-repeat;
+ width:58px;
+ height:15px;
+ margin-top:45px;
+}
+.channel{
+ background:url(../images/text-channel.png) no-repeat;
+ width:80px;
+ height:12px;
+ margin-top:41px;
+}
+.course{
+ background:url(../images/text-course.png) no-repeat;
+ width:42px;
+ height:8px;
+ margin-top:29px;
+}
+.free2{
+ background:url(../images/text-free2.png) no-repeat;
+ width:46px;
+ height:15px;
+}
+.extras{
+ background:url(../images/text-extras.png) no-repeat;
+ width:59px;
+ height:11px;
+}
+/* button */
+.button{
+ margin: 0;
+ padding:0;
+ list-style:none;
+ float:right;
+}
+.button li{
+ float:left;
+ margin-left:7px;
+ display:inline;
+}
+.button li a{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:108px;
+ height:108px;
+}
+a.product{background:url(../images/btn-product.png) no-repeat;}
+a.product:hover{background:url(../images/btn-product-hover.png) no-repeat;}
+a.test{background:url(../images/btn-test.png) no-repeat;}
+a.test:hover{background:url(../images/btn-test-hover.png) no-repeat;}
+a.order{background:url(../images/btn-order.png) no-repeat;}
+a.order:hover{background:url(../images/btn-order-hover.png) no-repeat;}
+.integrator{
+ background:url(../images/text-integrator.png) no-repeat;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:354px;
+ height:154px;
+}
+.integratorText{
+ width:354px;
+}
+.download-big{
+ float:right;
+ background:url(../images/btn-download-big.png) no-repeat;
+ width:163px;
+ height:163px;
+ text-indent:-9999px;
+ overflow:hidden;
+ margin:100px 20px 0 0;
+ display:inline;
+}
+.download-big:hover{background:url(../images/btn-download-big-hover.png) no-repeat;}
+/* tabs */
+.tabs{
+ width:100%;
+ background:#060606 url(../images/bg-tabs.gif) repeat-x;
+}
+/* tabset */
+.tabset{
+ margin:0 auto;
+ padding:0;
+ list-style:none;
+ width:960px;
+ overflow:hidden;
+}
+.tabset li{
+ float:left;
+ background:url(../images/bg-tabset.gif) no-repeat;
+}
+.tabset li:first-child{background:none;}
+.tabset li a{
+ float:left;
+ width:139px !Important;
+ height:41px;
+ padding:14px 0 0 21px;
+}
+.tabset li a span{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ height:30px;
+ cursor:pointer;
+}
+.tabset li a span.need{
+ background:url(../images/text-need.png) no-repeat;
+ width:76px;
+}
+.tabset li a span.see{
+ background:url(../images/text-see.png) no-repeat;
+ width:99px;
+}
+.tabset li a span.read{
+ background:url(../images/text-read.png) no-repeat;
+ width:93px;
+}
+.tabset li a span.prices{
+ background:url(../images/text-prices.png) no-repeat;
+ width:38px;
+}
+.tabset li a span.get-started2{
+ background:url(../images/text-get-started2.png) no-repeat;
+ width:47px;
+}
+.tabset li a:hover{background:url(../images/bg-tabset-hover.gif) no-repeat 1px 0;}
+.tabset li a.current{background:url(../images/bg-tabset-active.gif) no-repeat 100% 22px !important;}
+/* main */
+#main{
+ margin:0 auto;
+ width:964px;
+ overflow:hidden;
+ padding:0 4px 67px 0;
+ position: relative;
+ z-index: 20;
+}
+.Frontpage #main{
+ padding:55px 0 56px 0;
+ width:960px;
+ min-height:356px;
+}
+* html .Frontpage #main {
+ height:356px;
+ overflow:visible;
+}
+
+#main.noSidebar{
+ width:960px !Important;
+}
+
+/* Cart special rules */
+#wrapper.cart{padding-top: 250px;}
+#wrapper.cart .txt-holder{width: 850px;}
+
+#main.noSidebar .main-holder{background: none;}
+#main.noSidebar #content{float: left; width: 960px; background: none !Important;}
+
+
+
+/* block */
+.block{
+ width:930px;
+ overflow:hidden;
+ padding:0 11px 0 19px;
+ line-height:1.3em;
+}
+/* extras-box */
+.extras-box{
+ color:#212627;
+ float:left;
+ width:440px;
+ margin:0 40px 0 0;
+}
+/* title */
+.title{
+ border-bottom:2px solid #252525;
+ padding:0 0 9px;
+ margin:0 0 16px;
+}
+#content .title{border-color:#000;}
+.title h2{
+ margin:0;
+ height:24px;
+ text-indent:-9999px;
+ overflow:hidden;
+}
+.umbraco-extras{
+ background:url(../images/text-umbraco-extras.png) no-repeat;
+ width:159px;
+}
+.releases{
+ background:url(../images/text-release.png) no-repeat;
+ width:189px;
+}
+.step{
+ background:url(../images/text-step.png) no-repeat;
+ width:155px;
+}
+.test1{
+ width:146px;
+ background:url(../images/text-test1.png) no-repeat;
+}
+/* ico-list */
+.ico-list{
+ margin:0;
+ padding:0;
+ list-style:none;
+}
+.ico-list li{margin:0 0 13px;}
+.ico-list li a{
+ display:block;
+ width:389px;
+ padding:13px 0 0 51px;
+}
+.ico-list li a:hover{text-decoration:none;}
+.ico-list li a strong{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ height:23px;
+}
+.ico-list li a span{display:block;}
+.ico1{background:url(../images/bg-ico1.gif) no-repeat;}
+.ico1:hover{background:url(../images/bg-ico1-hover.gif) no-repeat;}
+.ico2{background:url(../images/bg-ico2.gif) no-repeat;}
+.ico2:hover{background:url(../images/bg-ico2-hover.gif) no-repeat;}
+.ico3{background:url(../images/bg-ico3.gif) no-repeat;}
+.ico3:hover{background:url(../images/bg-ico3-hover.gif) no-repeat;}
+.ico-list li a strong.complete1{
+ width:330px;
+ background:url(../images/text-complete1.png) no-repeat;
+}
+.ico-list li a strong.channel1{
+ width:211px;
+ background:url(../images/text-channel1.png) no-repeat;
+}
+.ico-list li a strong.course1{
+ width:178px;
+ background:url(../images/text-course1.png) no-repeat;
+}
+/* releases-box */
+.releases-box{
+ float:left;
+ width:200px;
+ overflow:hidden;
+}
+/* releases-list */
+.releases-list{
+ margin:0;
+ padding:0;
+ list-style:none;
+}
+.releases-list li{
+ border-bottom:1px solid #c7c9c9;
+ padding:0 0 6px;
+ margin:0 0 6px;
+ height:1%;
+}
+.releases-list li a{
+ display:block;
+ padding:0 0 0 18px;
+ background:url(../images/separator.png) no-repeat 0 20%;
+ color:#212627;
+}
+.releases-list li a strong{
+ display:block;
+ font-size:1.07em;
+}
+.releases-list li a span{
+ display:block;
+ font-size:0.85em;
+}
+.releases-list li a:hover{
+ text-decoration:none;
+ background:url(../images/separator-hover.png) no-repeat 0 20%;
+}
+.releases-list li a:hover strong{color:#ff6e00;}
+/* previouse */
+.previouse{
+ background:url(../images/bg-previouse.gif) no-repeat 0 60%;
+ padding:0 0 0 8px;
+}
+/* feature-box */
+.feature-box{
+ overflow:hidden;
+ width:100%;
+ padding:24px 0 0;
+}
+.wish{
+ float:right;
+ text-indent:-9999px;
+ overflow:hidden;
+ width:66px;
+ height:66px;
+ background:url(../images/bg-wish.gif) no-repeat;
+}
+.feature-box p{margin:0;}
+.feature{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ background:url(../images/text-feature.png) no-repeat;
+ width:109px;
+ height:16px;
+ margin:0 0 7px;
+}
+/* step-box */
+.step-box{
+ float:right;
+ width:220px;
+}
+.step-box .title{
+ width:200px;
+ margin-left:10px;
+}
+/* accordion */
+.accordion{
+ margin:-6px 0 0;
+ padding:0;
+ list-style:none;
+}
+* html .accordion{position:relative;}
+.accordion li a{
+ display:block;
+ width:200px;
+ background:#dfdfdf url(../images/bg-accordion.gif) repeat-x;
+ padding:0 10px;
+ outline:none;
+}
+.accordion li a strong{
+ display:block;
+ width:100%;
+ background:url(../images/bg-arrow1.gif) no-repeat 100% 50%;
+ height:20px;
+ font-size:1.07em;
+ cursor:pointer;
+ padding:7px 0 3px;
+}
+.accordion li a:hover{
+ background:#ff6f01 url(../images/bg-accordion-hover.gif) repeat-x;
+ text-decoration:none;
+}
+.accordion a:hover strong{
+ background:url(../images/bg-arrow3.gif) no-repeat 100% 50%;
+ color:#fff;
+}
+.accordion a.ui-state-active{background:#dfdfdf url(../images/bg-accordion.gif) repeat-x !important;}
+.accordion a.ui-state-active strong{
+ background:url(../images/bg-arrow2.gif) no-repeat 100% 50% !important;
+ color:#252525 !important;
+}
+* html .slide{position:relative;}
+.slide ul{
+ margin:0;
+ padding:0 10px 5px;
+ list-style:none;
+ overflow:hidden;
+ width:200px;
+ background:#dfdfdf;
+}
+.slide ul li{
+ float:left;
+ width:100%;
+ margin:0 0 6px;
+}
+.accordion .slide ul li a{
+ display:block;
+ background:url(../images/separator.png) no-repeat 0 10%;
+ width:auto;
+ padding:1px 0 0 19px;
+}
+.accordion .slide ul li a:hover{background:url(../images/separator-hover.png) no-repeat 0 10%;}
+/* navigation */
+.navigation{
+ width:100%;
+ background:#252525;
+ margin:0 0 13px;
+}
+.navigation .holder{
+ margin:0 auto;
+ width:960px;
+ position:relative;
+}
+/* main-nav */
+.main-nav{
+ margin:0;
+ padding:0;
+ list-style:none;
+ width:100%;
+ overflow:hidden;
+ line-height:1.2em;
+}
+.main-nav li{
+ float:left;
+ background:url(../images/divider.gif) no-repeat;
+ width:160px;
+}
+.main-nav li:first-child{background:none;}
+.main-nav li a{
+ float:left;
+ width:145px;
+ color:#fff;
+ padding:19px 5px 17px 10px;
+ min-height:69px;
+}
+* html .main-nav li a{height:69px;}
+.main-nav li a strong{
+ display:block;
+ text-indent:-9999px;
+ overflow:hidden;
+ height:16px;
+ margin:0 0 6px;
+}
+.main-nav li a span{display:block;}
+.sign-in{
+ background:url(../images/text-sign-in.png) no-repeat;
+ width:44px;
+}
+.get-inspired{
+ background:url(../images/text-get-inspired.png) no-repeat;
+ width:80px;
+}
+.follow-us{
+ background:url(../images/text-follow-us.png) no-repeat;
+ width:61px;
+}
+.providers{
+ width:124px;
+ background:url(../images/text-providers.png) no-repeat;
+}
+.main-nav .developer-site{
+ width:104px;
+ background:url(../images/text-site1.png) no-repeat;
+}
+.dev-area {
+ margin-left: 0px;
+ margin-top: 10px;
+}
+
+.contact{
+ width:53px;
+ background:url(../images/text-contact.png) no-repeat;
+}
+.get-it{
+ width:41px;
+ background:url(../images/text-get-it.png) no-repeat;
+}
+.main-nav li a:hover{
+ background:url(../images/bg-main-nav-hover.gif) no-repeat 1px 0;
+ text-decoration:none;
+}
+.main-nav li a.last{width:60px;}
+.main-nav li a.last:hover{background:none;}
+.main-nav li a.download-small{
+ float:right;
+ background:url(../images/bg-download-small.gif) no-repeat !important;
+ width:60px;
+ min-height:61px !important;
+ overflow:hidden;
+ text-indent:-9999px;
+ padding:0;
+ margin:24px 10px 0 0;
+ display:inline;
+}
+* html .main-nav li a.download-small{height:61px !important;}
+.main-nav li a.download-small:hover{background-position:0 100% !important;}
+/* picture */
+.picture{
+ position:absolute;
+ top:-100px;
+ left:237px;
+ background:url(../images/bg-picture.gif) bottom right no-repeat;
+ width:573px;
+ height:100px;
+}
+.main-holder{
+ background:url(../images/bg-main-holder.gif) no-repeat;
+ width:960px;
+ overflow:hidden;
+}
+/* content */
+#content {
+ float:right;
+ width:790px;
+ color:#1d1d1d;
+ padding:25px 0 0;
+ line-height:1.3em;
+ overflow:hidden;
+ position:relative;
+ z-index:5;
+}
+
+#content h1{
+ font-size: 2em; margin: 0 0 1em 0;
+}
+
+#content h1.umbraco-cms{
+ background:url(../images/text-umbraco-cms.png) no-repeat;
+ width:188px;
+}
+#content h1.video-tutorials{
+ background:url(../images/text-video-tutorials.png) no-repeat;
+ width:208px;
+}
+.content-holder{
+ width:100%;
+ overflow:hidden;
+ margin:0 0 33px;
+}
+.tab-contents{
+ width:100%;
+ overflow:hidden;
+}
+.txt-holder{
+ float:left;
+ width:455px;
+}
+
+
+.short .txt-holder{
+ width:220px;
+ color:#000;
+}
+
+.txt-holder p{margin:0 0 17px;}
+.txt-holder .big{
+ font-size:1.2em;
+ line-height:1.3em;
+ margin:0 0 12px;
+}
+
+.right-column{width: 300px; float: right;}
+
+.short .txt-holder .big{margin-bottom:19px;}
+.txt-holder .big p{margin:0;}
+.content-holder .alignright{
+ float:right;
+ margin:4px 0 0;
+}
+.platea{
+ display:block;
+ font-size:1.08em;
+ margin:0 0 7px;
+}
+/* item-list */
+.item-list{
+ margin:-16px -20px 24px 0;
+ padding:0;
+ list-style:none;
+ width:800px;
+ overflow:hidden;
+ font-size:1.07em;
+ background:#eaeaea url(../images/bg-item-list.gif) repeat-x;
+}
+.item-list li{
+ width:160px;
+ float:left;
+ background:url(../images/sep1.gif) no-repeat;
+ display:table;
+}
+.item-list li:first-child{background:none;}
+.item-list li a{
+ color:#000 !Important;
+ text-decoration: none !Important;
+ height:55px;
+ display:table-cell;
+ vertical-align:middle;
+ outline:none;
+}
+* html .item-list li a{float:left;}
+*+html .item-list li a{float:left;}
+.item-list li a:hover{
+ text-decoration:none;
+ background:url(../images/bg-item-list-hover.gif) no-repeat;
+}
+.item-list li a span{
+ display:block;
+ width:130px;
+ background:url(../images/bg-arrow4.gif) no-repeat 100% 50%;
+ padding:2px 20px;
+ position:relative;
+ margin:0 -10px 0 0;
+ cursor:pointer;
+}
+.item-list li a.active{background:none !important;}
+.item-list li a.active span{background:url(../images/bg-arrow5.gif) no-repeat 100% 50% !important;}
+/* article */
+.article{
+ border-collapse:collapse;
+ float:right;
+ width:541px;
+ color:#fff;
+ margin:6px 0 0;
+}
+.article th{
+ padding:10px 1px 10px 0;
+ border-bottom:1px solid #fff;
+ background:#333 url(../images/sep2.gif) repeat-y 100% 0;
+ font-size:1.15em;
+ line-height:1.35em;
+}
+.article th.style1{
+ width:153px;
+ background:none;
+}
+.article th.style2{width:125px;}
+.article th.style3{width:114px;}
+.article th.style4{
+ width:145px;
+ background:#333;
+ padding-right:0;
+}
+.article td{
+ padding:8px 1px 9px 0;
+ border-bottom:1px solid #fff;
+ background:#6f6f6f url(../images/sep2.gif) repeat-y 100% 0;
+ text-align:center;
+ font-size:0.92em;
+ letter-spacing:-1px;
+}
+.article td.style1{
+ background-color:#efefef;
+ color:#333;
+}
+.article td.style4{
+ background:#6f6f6f;
+ padding-right:0;
+}
+/* sidebar */
+#sidebar{
+ float:left;
+ width:154px;
+ padding:5px 0 0;
+}
+/* nav-bar */
+.nav-bar{
+ background:url(../images/bg-nav-bar.gif) repeat-y;
+}
+.nav-bar ul{
+ margin:0;
+ padding:0 0 45px 4px;
+ list-style:none;
+ background:url(../images/bg-nav-bar-ul.gif) no-repeat 0 100%;
+ font-size:1.08em;
+ line-height:1em;
+}
+.nav-bar ul li{
+ background:url(../images/bg-nav-bar-li.gif) no-repeat;
+}
+.nav-bar ul li:first-child{background:none;}
+.nav-bar ul li a{
+ color:#252525;
+ display:block;
+ width:125px;
+ padding:18px 5px 18px 20px;
+}
+.nav-bar ul li.active a{
+ background:#fff;
+ text-decoration:none;
+}
+.offernewblack{
+ text-indent:-9999px;
+ overflow:hidden;
+ display:block;
+ background:url(../images/text-free-new-black.png) no-repeat;
+ width:341px;
+ height:50px;
+ padding:0 0 30px;
+}
+.core-channel{
+ text-indent:-9999px;
+ overflow:hidden;
+ display:block;
+ background:url(../images/text-core-channel.png) no-repeat;
+ width:246px;
+ height:37px;
+ padding:0 0 30px;
+}
+.text1{
+ display:block;
+
+ overflow:hidden;
+
+ width:258px;
+ height:75px;
+ margin:0 0 9px;
+ color:white;
+}
+.section2{
+ width:100%;
+ overflow:hidden;
+}
+.order1{
+ width:108px;
+ height:108px;
+ text-indent:-9999px;
+ overflow:hidden;
+ float:right;
+ background:url(../images/btn-order1.png) no-repeat;
+}
+.order1:hover{background:url(../images/btn-order1-hover.png) no-repeat;}
+/* video-list */
+.video-list{
+ margin:0 0 30px;
+ padding:14px 0 0 3px;
+ list-style:none;
+ width:830px;
+ overflow:hidden;
+ font-size:0.85em;
+}
+.offersignup{
+ width:108px;
+ height:108px;
+ text-indent:-9999px;
+ overflow:hidden;
+ float:right;
+ background:url(../images/btn-signup.png) no-repeat;
+}
+.video-list li{
+ display:inline-block;
+ vertical-align:top;
+ width:144px;
+ margin:0 15px 26px 0;
+}
+* html .video-list li{display:inline;}
+*+html .video-list li{display:inline;}
+.video-list li a{
+ color:#252525;
+ display:block;
+ cursor:pointer;
+ outline:none;
+ width:144px;
+ overflow:hidden;
+}
+.video-list li a .image{
+ display:block;
+ width:144px;
+ height:83px;
+ overflow:hidden;
+ margin:0 0 8px;
+ border-bottom: 1px solid #ccc;
+}
+.video-list li a:hover{
+ text-decoration:none;
+ background:none;
+}
+.video-list li a .image img{vertical-align:top;}
+.video-list li a:hover img{}
+.video-list li a .text2{
+ display:block;
+ background:url(../images/bg-arrow6.png) no-repeat;
+ padding:0 0 0 20px;
+ width:124px;
+}
+.video-list li a .text2 strong{
+ display:block;
+ font-size:1.28em;
+ margin:0 0 3px;
+}
+.video-list li a:hover .text2{background:url(../images/bg-arrow7.png) no-repeat;}
+.video-list li a:hover .text2 strong{color:#ff6e00;}
+.next-step{
+ text-indent:-9999px;
+ overflow:hidden;
+ display:block;
+ background:url(../images/text-next-step.png) no-repeat;
+ width:112px;
+ height:24px;
+}
+#content .switcher-inner{margin-top:-12px;}
+/* carousel-container2 */
+.carousel-container2{
+ overflow:hidden;
+ height:1%;
+ padding:8px 3px 0 11px;
+ margin:0 0 35px;
+ background:url(../images/bg-carousel-container2.gif) repeat-x 0 100%;
+}
+.carousel-container2 .link-prev,
+.carousel-container2 .link-next{margin-top:52px;}
+.carousel-container2 .link-prev{margin-right:24px;}
+.carousel-container2 div{
+ float:left;
+ position:relative;
+ width:628px;
+ height:180px;
+ overflow:hidden;
+}
+.carousel-container2 div ul{
+ margin:0;
+ padding:0;
+ list-style:none;
+ float:left;
+ width:99999px;
+}
+.carousel-container2 div ul li{
+ float:left;
+ width:628px;
+ overflow:hidden;
+}
+.carousel-container2 div ul li ul{
+ margin:0 -12px 0 0;
+ padding:0;
+ list-style:none;
+ width:640px;
+}
+.carousel-container2 div ul li ul li{
+ width:148px;
+ margin:0 12px 0 0;
+}
+.carousel-container2 div.visual3{
+ width:145px;
+ height:175px;
+ background:url(../images/bg-visual3.png) no-repeat;
+ padding:2px 0 0 3px;
+}
+.carousel-container2 div ul li a{
+ display:block;
+ width:140px;
+ height:150px;
+ background:#252525 url(../images/bg-visual-a.gif) no-repeat;
+ position:relative;
+ font-size:14px;
+ line-height:1.3em;
+ color:#fff;
+}
+.carousel-container2 div ul li a:hover{
+ background:#252525 url(../images/bg-visual-a-hover.gif) no-repeat;
+ color:#ff6e00;
+ text-decoration:none;
+}
+.carousel-container2 div ul li a strong{
+ position:absolute;
+ bottom:0;
+ left:0;
+ background:#252525;
+ width:124px;
+ padding:7px 6px 9px 10px;
+ cursor:pointer;
+}
+/* footer-w */
+.footer-w{
+ overflow:hidden;
+ width:100%;
+ background:url(../images/bg-footer-w.gif) repeat-x 0 100%;
+}
+.footer{
+ width:100%;
+ background:url(../images/bg-footer.gif) no-repeat 50% 100%;
+}
+.footer .holder{
+ margin:0 auto;
+ width:940px;
+ overflow:hidden;
+ padding:0 10px 18px;
+ color:#2f2f2f;
+ line-height:1em;
+}
+.footer address{font-style:normal;}
+.footer address strong,
+.footer address span{
+ margin:0 0 5px;
+ display:block;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
diff --git a/Marketplace/Events/DeliNotificationEvents.cs b/Marketplace/Events/DeliNotificationEvents.cs
new file mode 100644
index 00000000..b28374a8
--- /dev/null
+++ b/Marketplace/Events/DeliNotificationEvents.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+using NotificationsCore;
+using NotificationsWeb;
+
+using umbraco.BusinessLogic;
+using umbraco;
+using umbraco.cms.businesslogic.member;
+
+using Marketplace.Interfaces;
+
+
+namespace Marketplace.Events
+{
+ public class DeliNotificationEvents : ApplicationBase
+ {
+
+ protected void NewMemberNotification()
+ {
+
+ //memberTasks.NewMember += new memberTasks.NewUIMemberEventHandler(memberTasks_NewMember);
+
+ }
+
+ void memberTasks_NewMember(Member sender, string unencryptedPassword, NewMemberUIEventArgs e)
+ {
+
+ if ((bool)sender.getProperty("createdByDeli").Value)
+ {
+ InstantNotification not = new InstantNotification();
+ not.Invoke(Config.ConfigurationFile, Config.AssemblyDir, "DeliNewMember", sender, unencryptedPassword);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/Helpers/ExtensionMethods.cs b/Marketplace/Helpers/ExtensionMethods.cs
new file mode 100644
index 00000000..1d4c3c43
--- /dev/null
+++ b/Marketplace/Helpers/ExtensionMethods.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using Marketplace.Interfaces;
+
+namespace Marketplace.Helpers
+{
+ public static class ExtensionMethods
+ {
+ public static string ListingTypeAsString(this ListingType listingType)
+ {
+ switch (listingType)
+ {
+ case ListingType.free:
+ return "free";
+ break;
+ case ListingType.commercial:
+ return "commercial";
+ break;
+ case ListingType.promoted:
+ return "promoted";
+ break;
+ default:
+ return "free";
+ break;
+ }
+ }
+
+ public static string FileTypeAsString(this FileType fileType)
+ {
+ switch (fileType)
+ {
+ case FileType.screenshot:
+ return "screenshot";
+ break;
+ case FileType.package:
+ return "package";
+ break;
+ case FileType.docs:
+ return "docs";
+ break;
+ case FileType.source:
+ return "source";
+ break;
+ default:
+ return "package";
+ break;
+ }
+
+ }
+
+ public static string LicenseTypeAsString(this LicenseType licenseType)
+ {
+ switch (licenseType)
+ {
+ case LicenseType.Domain:
+ return "Domain";
+ break;
+ case LicenseType.IP:
+ return "IP";
+ break;
+ case LicenseType.Unlimited:
+ return "Unlimited";
+ break;
+ case LicenseType.SourceCode:
+ return "Source Code";
+ break;
+ default:
+ return "Domain";
+ break;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/Helpers/Helper.cs b/Marketplace/Helpers/Helper.cs
new file mode 100644
index 00000000..dc900fcd
--- /dev/null
+++ b/Marketplace/Helpers/Helper.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web.UI;
+using Marketplace.usercontrols.Deli.Package;
+
+namespace Marketplace.Helpers
+{
+ public static class ProjectCreatorHelper
+ {
+
+ public static void MoveToNextStep(UserControl control, int projectId)
+ {
+ Editor c = (Editor)control.Parent.Parent;
+ c.GotoNextStep(c.Step.Value, projectId);
+
+ }
+
+ public static void MoveToPreviousStep(UserControl control, int projectId)
+ {
+ Editor c = (Editor)control.Parent.Parent;
+ c.GoToPreviousStep(c.Step.Value, projectId);
+
+ }
+
+
+ }
+}
diff --git a/Marketplace/HttpHandlers/PayPalIPN.cs b/Marketplace/HttpHandlers/PayPalIPN.cs
new file mode 100644
index 00000000..526aff3a
--- /dev/null
+++ b/Marketplace/HttpHandlers/PayPalIPN.cs
@@ -0,0 +1,568 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Net;
+using System.Text;
+using System.Collections.Specialized;
+
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Orders;
+using Marketplace.Providers.OrderNote;
+using Marketplace.Providers.MemberLicense;
+using Marketplace.Providers.Listing;
+
+using Umbraco.Ecommerce.BusinessLogic;
+using Umbraco.Ecommerce.PaymentMethods;
+
+using umbraco.BusinessLogic;
+using System.Configuration;
+using NotificationsCore;
+using System.Globalization;
+
+
+namespace Marketplace.HttpHandlers
+{
+ public class PayPalIPN
+ {
+ #region properties
+
+ private UmbracoEcommerceOrderProvider _orderProvider;
+ public UmbracoEcommerceOrderProvider OrderProvider
+ {
+ get
+ {
+ if (_orderProvider != null)
+ return _orderProvider;
+ else
+ {
+ _orderProvider = (UmbracoEcommerceOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ return _orderProvider;
+ }
+ }
+ }
+
+ public IOrder dOrder;
+
+ private IDeliOrderItemProvider _orderItemProvider;
+ public IDeliOrderItemProvider OrderItemProvider
+ {
+ get
+ {
+ if (_orderItemProvider != null)
+ return _orderItemProvider;
+ else
+ {
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ return _orderItemProvider;
+ }
+ }
+ }
+
+ private NodeListingProvider _listingProvider;
+ public NodeListingProvider ListingProvider
+ {
+ get
+ {
+ if (_listingProvider != null)
+ return _listingProvider;
+ else
+ {
+ _listingProvider = (NodeListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ return _listingProvider;
+ }
+ }
+ }
+
+ private OrderNoteProvider _orderNoteProvider;
+ public OrderNoteProvider OrderNoteProvider
+ {
+ get
+ {
+ if (_orderNoteProvider != null)
+ return _orderNoteProvider;
+ else
+ {
+ _orderNoteProvider = (OrderNoteProvider)MarketplaceProviderManager.Providers["OrderNoteProvider"];
+ return _orderNoteProvider;
+ }
+ }
+ }
+
+ private ILicenseProvider _licenseProvider;
+ public ILicenseProvider LicenseProvider
+ {
+ get
+ {
+ if (_licenseProvider != null)
+ return _licenseProvider;
+ else
+ {
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ return _licenseProvider;
+ }
+ }
+ }
+
+ public MemberLicense mLicense;
+
+ private IMemberLicenseProvider _memberLicenseProvider;
+ public IMemberLicenseProvider MemberLicenseProvider
+ {
+ get
+ {
+ if (_memberLicenseProvider != null)
+ return _memberLicenseProvider;
+ else
+ {
+ _memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["memberLicenseProvider"];
+ return _memberLicenseProvider;
+ }
+ }
+ }
+
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+ #endregion
+
+ public void Process(HttpContext context, bool TestMode)
+ {
+
+ try
+ {
+ if (VerifiedByPaypal(context, TestMode))
+ {
+ NameValueCollection form = context.Request.Form;
+ HandleOrder(form, TestMode);
+
+ }
+ else
+ {
+ string formStr = "";
+ foreach (string key in context.Request.Form.AllKeys)
+ formStr += key + ": " + context.Request.Form[key] + "...";
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "PAYPAL IPN: Response:" + formStr);
+ }
+
+ }
+ catch (Exception ex)
+ {
+ string formStr = "";
+ foreach (string key in context.Request.Form.AllKeys)
+ formStr += key + ": " + context.Request.Form[key] + "...";
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "PAYPAL IPN: Response: " + ex.ToString() + formStr);
+
+ }
+
+ }
+
+ public bool VerifiedByPaypal(HttpContext context, bool TestMode)
+ {
+ try
+ {
+ string _url = "https://www.paypal.com/cgi-bin/webscr";
+ if (TestMode)
+ {
+ _url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
+ }
+
+ HttpWebRequest req = (HttpWebRequest)WebRequest.Create(_url);
+ req.Method = "POST";
+ req.ContentType = "application/x-www-form-urlencoded";
+ byte[] param = context.Request.BinaryRead(HttpContext.Current.Request.ContentLength);
+ string strRequest = Encoding.UTF8.GetString(param);
+ strRequest += "&cmd=_notify-validate";
+ req.ContentLength = strRequest.Length;
+
+ // Modify the POST string.
+ string formPostData = "cmd = _notify-validate";
+ foreach (String postKey in context.Request.Form)
+ {
+ string postValue = Encode(context.Request.Form[postKey]);
+ formPostData += string.Format("&{0}={1}", postKey, postValue);
+ }
+
+ // POST the verification response back to PayPal.
+ WebClient client = new WebClient();
+ client.Encoding = Encoding.UTF8;
+
+ client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
+
+ byte[] postByteArray = Encoding.UTF8.GetBytes(formPostData);
+ byte[] responseArray = client.UploadData(_url, "POST", postByteArray);
+ string response = Encoding.UTF8.GetString(responseArray);
+
+ // check the response, return 'true' if its "VERIFIED"
+ return (response == "VERIFIED");
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ public void TESTHandleOrder(NameValueCollection form, bool testMode)
+ {
+ try
+ {
+ string amount = form["amount"];
+ int invoice = int.Parse(form["invoice"]);
+ string status = form["payment_status"];
+ string txt_id = form["txn_id"];
+
+ // log the IPN response in the umbracoLog
+ string formStr = "";
+ foreach (string key in form.AllKeys)
+ formStr += key + ": " + form[key] + "....";
+
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL IPN: - " + formStr);
+
+ }
+ catch (Exception ex)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL IPN ERROR: " + ex.ToString());
+ }
+ }
+
+ public void HandleOrder(NameValueCollection form, bool testMode)
+ {
+ try
+ {
+ string amount = form["mc_gross"];
+ int invoice = int.Parse(form["invoice"]);
+ string status = form["payment_status"];
+ string txt_id = form["txn_id"];
+ string NoteText = "";
+
+ // log the IPN response in the umbracoLog before anything else
+ string formStr = "";
+ foreach (string key in form.AllKeys)
+ formStr += key + ": " + form[key] + "....";
+
+ // getDeli Order
+ dOrder = OrderProvider.GetOrder(invoice);
+
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL IPN: Order: " + dOrder.Id.ToString() + " - " + formStr);
+
+ switch (status)
+ {
+ case "Completed":
+ // make sure this isn't a duplicate from paypal
+ if (dOrder.Status != OrderStatus.Confirmed)
+ {
+ if (!testMode) // production!
+ {
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Confirmed.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Confirmed;
+ dOrder.TransactionId = txt_id;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ dOrder.PaymentDate = DateTime.Now.ToUniversalTime();
+ dOrder.ProcessedTotal = Convert.ToDouble(amount);
+
+ // create a MemberLicense for each OrderItem
+ foreach (IOrderItem item in dOrder.Items)
+ {
+ // create licenses for multiple quantity
+ for (int i = 0; i < item.Quantity; i++)
+ {
+ mLicense = new MemberLicense();
+ mLicense.LicenseId = LicenseProvider.GetLicense(item.LicenseId).Id;
+ mLicense.Member = dOrder.Member;
+ mLicense.OrderItemId = item.Id;
+ mLicense.ListingItemId = item.ListingItemId;
+ mLicense.CreateDate = DateTime.Now.ToUniversalTime();
+ mLicense.IsActive = true;
+
+ MemberLicenseProvider.SaveOrUpdate(mLicense);
+ }
+ }
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ // webservice call to create order on umbraco.com
+ string invoicePath;
+
+ try
+ {
+ invoicePath = CreateDotComOrder(dOrder, txt_id);
+ }
+ catch (Exception e)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL IPN ERROR: " + e.Message + " :: " + e.InnerException + " :: " + e.StackTrace);
+
+ invoicePath = string.Empty;
+
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli Error: invoice generation failed");
+
+ }
+
+ if (invoicePath.Length > 0)
+ {
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli invoice: " + invoicePath);
+
+ }
+
+ // send order complete mail
+ InstantNotification not = new InstantNotification();
+ not.Invoke(NotificationsWeb.Config.ConfigurationFile, NotificationsWeb.Config.AssemblyDir, "DeliOrderComplete", dOrder, dOrder.Member, txt_id);
+
+ foreach(var oi in dOrder.Items)
+ {
+ var listing = ListingProvider.GetListing(oi.ListingItemId,false);
+ var body = "Hi " + listing.Vendor.Member.Name + ",
" +
+ "The following order has just been received for the following product on the Umbraco Deli
" +
+ "" + listing.Name + " " + LicenseProvider.GetLicense(oi.LicenseId).LicenseType.ToString() + " " +
+ "ordered by" + dOrder.Member.Name + " email " + dOrder.Member.Email + "
" +
+ "Best, The Umbraco Deli Robot
";
+
+
+ umbraco.library.SendMail("robot@umbraco.org", listing.Vendor.Member.Email, "New Deli Order", body, true);
+ }
+ }
+ else // test!
+ {
+ NoteText = "DEV order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Confirmed.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Confirmed;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ dOrder.PaymentDate = DateTime.Now.ToUniversalTime();
+ dOrder.ProcessedTotal = Convert.ToDouble(amount);
+
+ // create a MemberLicense for each OrderItem
+ foreach (IOrderItem item in dOrder.Items)
+ {
+ // create licenses for multiple quantity
+ for (int i = 0; i < item.Quantity; i++)
+ {
+ mLicense = new MemberLicense();
+ mLicense.LicenseId = LicenseProvider.GetLicense(item.LicenseId).Id;
+ mLicense.Member = dOrder.Member;
+ mLicense.OrderItemId = item.Id;
+ mLicense.ListingItemId = item.ListingItemId;
+ mLicense.CreateDate = DateTime.Now.ToUniversalTime();
+ mLicense.IsActive = true;
+
+ MemberLicenseProvider.SaveOrUpdate(mLicense);
+ }
+ }
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ // webservice call to create order on umbraco.com
+ string invoicePath;
+
+ try
+ {
+ invoicePath = CreateDotComOrder(dOrder, txt_id);
+ }
+ catch (Exception e)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL IPN ERROR: " + e.Message + " :: " + e.InnerException + " :: " + e.StackTrace);
+
+ invoicePath = string.Empty;
+
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli Error: invoice generation failed - Error:" + e.Message + " :: " + e.InnerException + " :: " + e.StackTrace);
+
+ }
+
+ if (invoicePath.Length > 0)
+ {
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli invoice: " + invoicePath);
+
+ }
+
+ // send order complete mail
+ InstantNotification not = new InstantNotification();
+ not.Invoke(NotificationsWeb.Config.ConfigurationFile, NotificationsWeb.Config.AssemblyDir, "DeliOrderComplete", dOrder, dOrder.Member, txt_id);
+ foreach (var oi in dOrder.Items)
+ {
+ not.Invoke(NotificationsWeb.Config.ConfigurationFile, NotificationsWeb.Config.AssemblyDir, "DeliNotifyVendor", oi, dOrder.Member, oi.Id);
+ }
+ }
+ }
+ break;
+
+ case "Pending":
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Pending.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Pending;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ break;
+
+ case "Failed":
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Rejected.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Rejected;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ break;
+
+ case "Refunded":
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Refunded.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Refunded;
+ dOrder.IsRefunded = true;
+ dOrder.RefundDate = DateTime.Now.ToUniversalTime();
+
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ // todo: revoke license here
+ // todo: mark specific OrderItems as Refunded
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ break;
+
+ default:
+ break;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL IPN " + ex.Message + " :: " + ex.InnerException+ " :: " +ex.StackTrace);
+ }
+ }
+
+ public int CreateEcomOrder(IOrder o, bool TestMode)
+ {
+ try
+ {
+ // Create customer information
+ CustomerInfo ci = new CustomerInfo();
+ ci.AddData("id", o.Member.Id.ToString());
+ ci.AddData("email", o.Member.Email);
+
+ Guid payment = new CreditCard().Id;
+
+ // create order
+ Order providerOrder = Order.MakeNew(ci.ToXml(), o.Id.ToString(), payment, "deli order", o.Member.Email);
+ providerOrder.CustomerReference = o.Id.ToString();
+ providerOrder.ChangeStatus(Order.Status.Confirmed);
+ providerOrder.Comment = "deli order";
+
+ if(TestMode)
+ providerOrder.TestMode = true;
+
+ foreach(IOrderItem item in dOrder.Items)
+ {
+ OrderLine l = new OrderLine();
+ l.Quantity = item.Quantity;
+ l.ProductName = ListingProvider.GetListing(item.ListingItemId, false).Name + ", License: " + LicenseProvider.GetLicense(item.LicenseId).LicenseType.ToString();
+ l.Price = (decimal)item.NetPrice;
+ l.ProductId = item.ListingItemId.ToString();
+ l.Note = "deli order id: " + o.Id.ToString();
+
+ providerOrder.AddOrderLine(l);
+ }
+
+ // generate invoice
+ if(!TestMode)
+ providerOrder.GenerateInvoice(false);
+ else
+ providerOrder.GenerateInvoice(true);
+
+
+ return providerOrder.OrderId;
+ }
+ catch
+ {
+ return 0;
+ }
+ }
+
+ protected string CreateDotComOrder(IOrder dOrder, string transactionId)
+ {
+ com.umbraco.orders.Orders orderService = new com.umbraco.orders.Orders();
+ com.umbraco.orders.OrderProxy orderProxy = new com.umbraco.orders.OrderProxy();
+ com.umbraco.orders.BuyerProxy buyerProxy = new com.umbraco.orders.BuyerProxy();
+
+ // set up Ecomm Order
+ orderProxy.DeliOrderID = dOrder.Id;
+ orderProxy.PurchaseOrder = "";
+ orderProxy.TransactionID = transactionId;
+
+ // buyer
+ buyerProxy.ourMemberId = dOrder.Member.Id;
+ buyerProxy.ourMemberGuid = dOrder.Member.UniqueId;
+ buyerProxy.IP = dOrder.IP;
+ buyerProxy.Name = dOrder.Member.Name;
+ buyerProxy.Login = dOrder.Member.Name;
+ buyerProxy.Address = dOrder.Member.CompanyAddress;
+ buyerProxy.Company = dOrder.Member.Company;
+ buyerProxy.Country = Marketplace.library.GetCountry(dOrder.Member.CompanyCountry);
+ buyerProxy.Email = dOrder.CompanyInvoiceEmail;
+ buyerProxy.VAT = !dOrder.Member.VatInvalid ? dOrder.Member.CompanyVATNumber : "";
+ buyerProxy.Phone = "";
+
+ //order lines
+ var orderLineProxyList = new List();
+
+ foreach (IOrderItem item in dOrder.Items)
+ {
+ com.umbraco.orders.OrderLineProxy lineProxy = new com.umbraco.orders.OrderLineProxy();
+ IListingItem listingItem = ListingProvider.GetListing(item.ListingItemId);
+
+ lineProxy.VendorEconomicID = listingItem.Vendor.EconomicId;
+ lineProxy.Amount = (decimal)item.NetPrice;
+ lineProxy.Quantity = item.Quantity;
+ lineProxy.description = ListingProvider.GetListing(item.ListingItemId, false).Name + ", License Type: " + LicenseProvider.GetLicense(item.LicenseId).LicenseType.ToString();
+
+ // add order line to order
+ orderLineProxyList.Add(lineProxy);
+
+ }
+
+
+ orderProxy.OrderLines = orderLineProxyList.ToArray();
+ orderProxy.Buyer = buyerProxy;
+
+ bool isTestMode = bool.Parse(ConfigurationManager.AppSettings["deliPayPalTest"]);
+
+
+ com.umbraco.orders.OrderProxy returnOrderProxy = orderService.Create(orderProxy, isTestMode, ConfigurationManager.AppSettings["deliWebServiceUser"], ConfigurationManager.AppSettings["deliWebServicePass"]);
+
+
+ // set Ecomm order id
+ dOrder.OrderId = returnOrderProxy.EcommerceOrderID;
+ OrderProvider.SaveOrUpdate(dOrder);
+
+
+ return returnOrderProxy.InvoicePath;
+
+ }
+
+ #region Utilities
+
+ private string Encode(string oldValue)
+ {
+ string newValue = oldValue.Replace("\"", "'");
+ newValue = System.Web.HttpUtility.UrlEncode(newValue);
+ newValue = newValue.Replace("%2f", "/");
+ return newValue;
+ }
+
+
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/HttpHandlers/PayPalIPNHandler.cs b/Marketplace/HttpHandlers/PayPalIPNHandler.cs
new file mode 100644
index 00000000..aa9f4823
--- /dev/null
+++ b/Marketplace/HttpHandlers/PayPalIPNHandler.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace Marketplace.HttpHandlers
+{
+ public class PayPalIPNHandler : IHttpHandler
+ {
+ #region IHttpHandler Members
+
+ bool IHttpHandler.IsReusable
+ {
+ get { return true; }
+ }
+
+ void IHttpHandler.ProcessRequest(HttpContext context)
+ {
+ PayPalIPN ipn = new PayPalIPN();
+ ipn.Process(context, false);
+ }
+
+ #endregion
+ }
+
+ public class PayPalIPNHandlerTEST : IHttpHandler
+ {
+ #region IHttpHandlerTEST Members
+
+ bool IHttpHandler.IsReusable
+ {
+ get { return true; }
+ }
+
+ void IHttpHandler.ProcessRequest(HttpContext context)
+ {
+ PayPalIPN ipn = new PayPalIPN();
+ ipn.Process(context, true);
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/Marketplace.csproj b/Marketplace/Marketplace.csproj
new file mode 100644
index 00000000..20c0b566
--- /dev/null
+++ b/Marketplace/Marketplace.csproj
@@ -0,0 +1,771 @@
+
+
+
+
+ Debug
+ AnyCPU
+
+
+ 2.0
+ {6A2B659E-8BAE-4CD5-8764-851DFBE95FBF}
+ {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ Marketplace
+ Marketplace
+ v4.5.1
+ false
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ true
+ full
+ false
+ bin\
+ DEBUG;TRACE
+ prompt
+ 4
+ false
+
+
+ pdbonly
+ true
+ bin\
+ TRACE
+ prompt
+ 4
+ false
+
+
+
+ ..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.dll
+
+
+ ..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll
+
+
+ False
+ ..\packages\UmbracoCms.Core.7.1.6\lib\businesslogic.dll
+
+
+ ..\packages\ClientDependency.1.7.1.2\lib\ClientDependency.Core.dll
+
+
+ ..\packages\ClientDependency-Mvc.1.7.0.4\lib\ClientDependency.Core.Mvc.dll
+
+
+ False
+ ..\packages\UmbracoCms.Core.7.1.6\lib\cms.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\controls.dll
+
+
+ ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll
+
+
+ ..\packages\Examine.0.1.57.2941\lib\Examine.dll
+
+
+ ..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll
+
+
+ ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll
+
+
+ ..\packages\ImageProcessor.1.9.5.0\lib\ImageProcessor.dll
+
+
+ ..\packages\ImageProcessor.Web.3.3.0.0\lib\net45\ImageProcessor.Web.dll
+
+
+ False
+ ..\packages\UmbracoCms.Core.7.1.6\lib\interfaces.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\log4net.dll
+
+
+ ..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll
+
+
+ False
+ ..\..\Our\dependencies\MarketPlace\Marketplace.BusinessLogic.dll
+
+
+ False
+ ..\..\Our\dependencies\MarketPlace\Marketplace.Data.dll
+
+
+ False
+ ..\..\Our\dependencies\MarketPlace\Marketplace.Interfaces.dll
+
+
+ ..\..\Our\dependencies\MarketPlace\Marketplace.Presentation.dll
+
+
+ False
+ ..\..\Our\dependencies\MarketPlace\Marketplace.Providers.dll
+
+
+ False
+ ..\..\Our\dependencies\MarketPlace\Marketplace.Umbraco.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\Microsoft.ApplicationBlocks.Data.dll
+
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\Microsoft.Web.Helpers.dll
+
+
+ True
+ ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
+
+
+ ..\packages\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.1\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll
+
+
+ ..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll
+
+
+ False
+ ..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll
+
+
+ False
+ ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+
+ ..\forigndlls\NotificationsCore.dll
+
+
+ ..\forigndlls\NotificationsWeb.dll
+
+
+ ..\forigndlls\our.umbraco.org.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\SQLCE4Umbraco.dll
+
+
+
+
+
+
+ True
+ ..\packages\UmbracoCms.Core.7.1.6\lib\System.Data.SqlServerCe.dll
+
+
+ True
+ ..\packages\UmbracoCms.Core.7.1.6\lib\System.Data.SqlServerCe.Entity.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll
+
+
+
+ True
+ ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.30506.0\lib\net40\System.Web.Http.WebHost.dll
+
+
+ True
+ ..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll
+
+
+ True
+ ..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll
+
+
+ True
+ ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll
+
+
+ True
+ ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll
+
+
+
+
+ True
+ ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll
+
+
+
+
+
+
+
+
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\TidyNet.dll
+
+
+ ..\forigndlls\uComponents.Core.dll
+
+
+ ..\forigndlls\uForum.dll
+
+
+ False
+ ..\packages\UmbracoCms.Core.7.1.6\lib\umbraco.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\Umbraco.Core.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\umbraco.DataLayer.dll
+
+
+ ..\forigndlls\Umbraco.Ecommerce.dll
+
+
+ False
+ ..\packages\UmbracoCms.Core.7.1.6\lib\umbraco.editorControls.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\umbraco.MacroEngines.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\umbraco.providers.dll
+
+
+ ..\forigndlls\Umbraco.Support.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\Umbraco.Web.UI.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\umbraco.XmlSerializers.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\UmbracoExamine.dll
+
+
+ ..\forigndlls\umbracoMemberControls.dll
+
+
+ ..\forigndlls\uPowers.dll
+
+
+ ..\packages\UmbracoCms.Core.7.1.6\lib\UrlRewritingNet.UrlRewriter.dll
+
+
+ ..\forigndlls\uVersion.dll
+
+
+
+
+ setalllive.aspx
+ ASPXCodeBehind
+
+
+ setalllive.aspx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Settings.settings
+
+
+
+
+ OrderReview.ascx
+ ASPXCodeBehind
+
+
+ OrderReview.ascx
+
+
+ ProcessRefund.ascx
+ ASPXCodeBehind
+
+
+ ProcessRefund.ascx
+
+
+ VendorPayout.ascx
+ ASPXCodeBehind
+
+
+ VendorPayout.ascx
+
+
+ VendorPayoutReport.ascx
+ ASPXCodeBehind
+
+
+ VendorPayoutReport.ascx
+
+
+ Cart.ascx
+ ASPXCodeBehind
+
+
+ Cart.ascx
+
+
+ CartDetails.ascx
+ ASPXCodeBehind
+
+
+ CartDetails.ascx
+
+
+ CartProgress.ascx
+ ASPXCodeBehind
+
+
+ CartProgress.ascx
+
+
+ CartReview.ascx
+ ASPXCodeBehind
+
+
+ CartReview.ascx
+
+
+ MicroCart.ascx
+ ASPXCodeBehind
+
+
+ MicroCart.ascx
+
+
+ VendorCustomers.ascx
+ ASPXCodeBehind
+
+
+ VendorCustomers.ascx
+
+
+ VendorBIOverview.ascx
+ ASPXCodeBehind
+
+
+ VendorBIOverview.ascx
+
+
+ VendorProjectBI.ascx
+ ASPXCodeBehind
+
+
+ VendorProjectBI.ascx
+
+
+ FeaturedProject.ascx
+ ASPXCodeBehind
+
+
+ FeaturedProject.ascx
+
+
+ HQStaffPickProjects.ascx
+ ASPXCodeBehind
+
+
+ HQStaffPickProjects.ascx
+
+
+ MyLicenses.ascx
+ ASPXCodeBehind
+
+
+ MyLicenses.ascx
+
+
+ ProjectLicenses.ascx
+ ASPXCodeBehind
+
+
+ ProjectLicenses.ascx
+
+
+ ListPagination.ascx
+ ASPXCodeBehind
+
+
+ ListPagination.ascx
+
+
+ NewestProjects.ascx
+ ASPXCodeBehind
+
+
+ NewestProjects.ascx
+
+
+ Complete.ascx
+ ASPXCodeBehind
+
+
+ Complete.ascx
+
+
+ Licenses.ascx
+ ASPXCodeBehind
+
+
+ Licenses.ascx
+
+
+ Screenshots.ascx
+ ASPXCodeBehind
+
+
+ Screenshots.ascx
+
+
+ Details.ascx
+ ASPXCodeBehind
+
+
+ Details.ascx
+
+
+ Editor.ascx
+ ASPXCodeBehind
+
+
+ Editor.ascx
+
+
+ Files.ascx
+ ASPXCodeBehind
+
+
+ Files.ascx
+
+
+ VendorPayout.ascx
+ ASPXCodeBehind
+
+
+ VendorPayout.ascx
+
+
+ VendorPayoutHistory.ascx
+ ASPXCodeBehind
+
+
+ VendorPayoutHistory.ascx
+
+
+ PopularProjects.ascx
+ ASPXCodeBehind
+
+
+ PopularProjects.ascx
+
+
+ MemberDataLookup.ascx
+ ASPXCodeBehind
+
+
+ MemberDataLookup.ascx
+
+
+ MyProjects.ascx
+ ASPXCodeBehind
+
+
+ MyProjects.ascx
+
+
+ Signup.ascx
+ ASPXCodeBehind
+
+
+ Signup.ascx
+
+
+ ProjectsList.ascx
+ ASPXCodeBehind
+
+
+ ProjectsList.ascx
+
+
+ ProjectView.ascx
+ ASPXCodeBehind
+
+
+ ProjectView.ascx
+
+
+ PayPalConfirm.ascx
+ ASPXCodeBehind
+
+
+ PayPalConfirm.ascx
+
+
+ PayPalPayment.ascx
+ ASPXCodeBehind
+
+
+ PayPalPayment.ascx
+
+
+ RepoProjectView.ascx
+ ASPXCodeBehind
+
+
+ RepoProjectView.ascx
+
+
+ RefundRequest.ascx
+ ASPXCodeBehind
+
+
+ RefundRequest.ascx
+
+
+ VendorSupportRequest.ascx
+ ASPXCodeBehind
+
+
+ VendorSupportRequest.ascx
+
+
+ TopPaidProjectsList.ascx
+ ASPXCodeBehind
+
+
+ TopPaidProjectsList.ascx
+
+
+ Login_novalidationscript.ascx
+ ASPXCodeBehind
+
+
+ Login_novalidationscript.ascx
+
+
+
+
+ True
+ True
+ Reference.map
+
+
+ True
+ True
+ Reference.map
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ Reference.map
+
+
+ Reference.map
+
+
+
+ MSDiscoCodeGenerator
+ Reference.cs
+
+
+ Reference.map
+
+
+
+
+ Designer
+
+
+
+ MSDiscoCodeGenerator
+ Reference.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+ Dynamic
+ Web References\com.umbraco\
+ http://umbraco.com/umbraco/plugins/memberlookup/memberlookup.asmx
+
+
+
+
+ Settings
+ Marketplace_com_umbraco_MemberLookUp
+
+
+ Dynamic
+ Web References\com.umbraco.orders\
+ http://umbraco.com/webservices/orders.asmx
+
+
+
+
+ Settings
+ Marketplace_com_umbraco_orders_Orders
+
+
+
+
+ 10.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+
+
+
+
+
+ False
+ True
+ 54542
+ /
+
+
+ False
+ False
+
+
+ False
+
+
+
+
+
+ xcopy /s /y "$(TargetDir)marketplace*.*" "$(SolutionDir)OurUmbraco.Site\bin\"
+xcopy /s /y "$(ProjectDir)*.ascx" "$(SolutionDir)OurUmbraco.Site\"
+xcopy /s /y "$(ProjectDir)razor\*.cshtml" "$(SolutionDir)OurUmbraco.Site\macroscripts\"
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/ConfigureProjectLicenses.master b/Marketplace/MasterPages/ConfigureProjectLicenses.master
new file mode 100644
index 00000000..d9c8e92f
--- /dev/null
+++ b/Marketplace/MasterPages/ConfigureProjectLicenses.master
@@ -0,0 +1,13 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Deli.master b/Marketplace/MasterPages/Deli.master
new file mode 100644
index 00000000..311e69d6
--- /dev/null
+++ b/Marketplace/MasterPages/Deli.master
@@ -0,0 +1,40 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Top Paid Packages
+
+
+
+
HQ Picks
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/DeliCart.master b/Marketplace/MasterPages/DeliCart.master
new file mode 100644
index 00000000..e52f513f
--- /dev/null
+++ b/Marketplace/MasterPages/DeliCart.master
@@ -0,0 +1,20 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/DeliCartDetails.master b/Marketplace/MasterPages/DeliCartDetails.master
new file mode 100644
index 00000000..f4d7a7b9
--- /dev/null
+++ b/Marketplace/MasterPages/DeliCartDetails.master
@@ -0,0 +1,19 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/EditProject.master b/Marketplace/MasterPages/EditProject.master
new file mode 100644
index 00000000..e1a3c22c
--- /dev/null
+++ b/Marketplace/MasterPages/EditProject.master
@@ -0,0 +1,25 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Master.master b/Marketplace/MasterPages/Master.master
new file mode 100644
index 00000000..73326285
--- /dev/null
+++ b/Marketplace/MasterPages/Master.master
@@ -0,0 +1,146 @@
+<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Please enter atleast 50 characters (50 remaining)
+ or cancel
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/PayPalRedirect.master b/Marketplace/MasterPages/PayPalRedirect.master
new file mode 100644
index 00000000..6f818070
--- /dev/null
+++ b/Marketplace/MasterPages/PayPalRedirect.master
@@ -0,0 +1,38 @@
+<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+ - Umbraco.org - the friendly CMS
+
+
+
+
+
+
+
+
+
+
+
Please wait...
+
+ We are redirecting you to paypal.com, where you can pay your order securely. Please do not hit the "back" or "forward"
+ navigation buttons on your browser.
+
+
+ Thank you for your patience
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Project.master b/Marketplace/MasterPages/Project.master
new file mode 100644
index 00000000..88ea25b8
--- /dev/null
+++ b/Marketplace/MasterPages/Project.master
@@ -0,0 +1,44 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<% if( umbraco.presentation.nodeFactory.Node.GetCurrent().Children.Count > 0 ){ %>
+
Package discussions
+
+<%
+}
+%>
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/ProjectGroup.master b/Marketplace/MasterPages/ProjectGroup.master
new file mode 100644
index 00000000..33acc7da
--- /dev/null
+++ b/Marketplace/MasterPages/ProjectGroup.master
@@ -0,0 +1,38 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Top Paid Packages
+
+
+
+
HQ Picks
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Projects.master b/Marketplace/MasterPages/Projects.master
new file mode 100644
index 00000000..fa574153
--- /dev/null
+++ b/Marketplace/MasterPages/Projects.master
@@ -0,0 +1,68 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+
+
+
+
+<%-- div style="margin-top: 25px">
+
+
+
+
+
+
+
+
+
+
+
+
Top Paid Packages
+
+
+
+
HQ Picks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List your package here! Whether it's free or a commercial, it's easy to list in the Deli.
Get started today
+
+
Browse by Tag
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/ProjectsTags.master b/Marketplace/MasterPages/ProjectsTags.master
new file mode 100644
index 00000000..7c1084dd
--- /dev/null
+++ b/Marketplace/MasterPages/ProjectsTags.master
@@ -0,0 +1,22 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Deli.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+Browse projects by tag
+
+
+
+
+
Browse by tag
+
+
+
+
Projects tagged with: <%= Request["tag"] %>
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/Community.master b/Marketplace/MasterPages/Repository/Community.master
new file mode 100644
index 00000000..04ad75da
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/Community.master
@@ -0,0 +1,98 @@
+<%@ Master Language="C#" MasterPageFile="Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
The friendliest CMS community on the planet
+
+
+
+our.umbraco.org is the central hub for the friendly umbraco community. Search for documentation, get
+help and guidance from seasoned experts, download and collaborate on plugins and extensions.
+
+
+ <%if(!umbraco.library.IsLoggedOn()){ %>
+
Register an account or Login
+ <%}%>
+
+
+
+
+
+
+
+
Forum talk
+
Loading forum list...
+
More..
+
+
+
+
+
+
+
New projects
+
Loading the newest projects...
+
More..
+
+
+
+
New documentation
+
Loading the latest documentation...
+
More..
+
+
+
+
+
+
+
Community blogs
+
Loading blog list...
+
+
+
+
Twitter
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/Master.master b/Marketplace/MasterPages/Repository/Master.master
new file mode 100644
index 00000000..9050413e
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/Master.master
@@ -0,0 +1,99 @@
+<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
+
+
+
+
+
+ Umbraco Package Repository
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/Nothing.master b/Marketplace/MasterPages/Repository/Nothing.master
new file mode 100644
index 00000000..d8e768ef
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/Nothing.master
@@ -0,0 +1,34 @@
+<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/Project.master b/Marketplace/MasterPages/Repository/Project.master
new file mode 100644
index 00000000..e4453a80
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/Project.master
@@ -0,0 +1,11 @@
+<%@ Master Language="C#" MasterPageFile="Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/ProjectGroup.master b/Marketplace/MasterPages/Repository/ProjectGroup.master
new file mode 100644
index 00000000..d88bfee5
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/ProjectGroup.master
@@ -0,0 +1,32 @@
+<%@ Master Language="C#" MasterPageFile="Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
Top Paid Packages
+
+
+
+
HQ Picks
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/Projects.master b/Marketplace/MasterPages/Repository/Projects.master
new file mode 100644
index 00000000..8c2d95a0
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/Projects.master
@@ -0,0 +1,47 @@
+<%@ Master Language="C#" MasterPageFile="Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
+
Top Paid Packages
+
+
+
+
HQ Picks
+
+
+
+
+
+
+
+
+
+
+
+
+
List your package here! Whether it's free or a commercial, it's easy to list in the Deli.
Get started today
+
+
Browse by Tag
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/ProjectsTags.master b/Marketplace/MasterPages/Repository/ProjectsTags.master
new file mode 100644
index 00000000..ade63286
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/ProjectsTags.master
@@ -0,0 +1,21 @@
+<%@ Master Language="C#" MasterPageFile="Master.master" AutoEventWireup="true" %>
+
+
+
+
+
+
+
+
+
Browse projects by tag
+
+
+<%-- umbraco:Macro Alias="Project-tagcloud" runat="server">
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/Repository/Textpage.master b/Marketplace/MasterPages/Repository/Textpage.master
new file mode 100644
index 00000000..31c69a09
--- /dev/null
+++ b/Marketplace/MasterPages/Repository/Textpage.master
@@ -0,0 +1,10 @@
+<%@ Master Language="C#" MasterPageFile="Master.master" AutoEventWireup="true" %>
+
+
+
+
diff --git a/Marketplace/MasterPages/newest.master b/Marketplace/MasterPages/newest.master
new file mode 100644
index 00000000..c3c13549
--- /dev/null
+++ b/Marketplace/MasterPages/newest.master
@@ -0,0 +1,14 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Deli.master" AutoEventWireup="true" %>
+
+
+
+
+
+Newest packages
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/MasterPages/popular.master b/Marketplace/MasterPages/popular.master
new file mode 100644
index 00000000..882c94f3
--- /dev/null
+++ b/Marketplace/MasterPages/popular.master
@@ -0,0 +1,14 @@
+<%@ Master Language="C#" MasterPageFile="~/masterpages/Deli.master" AutoEventWireup="true" %>
+
+
+
+
+
+Popular packages
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/NotificationTypes/DeliNewMember.cs b/Marketplace/NotificationTypes/DeliNewMember.cs
new file mode 100644
index 00000000..313b90b4
--- /dev/null
+++ b/Marketplace/NotificationTypes/DeliNewMember.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Net.Mail;
+
+using NotificationsCore;
+
+using umbraco.cms.businesslogic.member;
+
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.NotificationTypes
+{
+ public class DeliNewMember : Notification
+ {
+
+ public DeliNewMember()
+ {
+
+ }
+
+ public override bool SendNotification(System.Xml.XmlNode details, params object[] args)
+ {
+ IMemberProvider MemberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+
+ try
+ {
+ SmtpClient c = new SmtpClient(details.SelectSingleNode("//smtp").InnerText);
+ c.Credentials = new System.Net.NetworkCredential(details.SelectSingleNode("//username").InnerText, details.SelectSingleNode("//password").InnerText);
+
+ MailAddress from = new MailAddress(
+ details.SelectSingleNode("//from/email").InnerText,
+ details.SelectSingleNode("//from/name").InnerText);
+
+ string subject = details.SelectSingleNode("//subject").InnerText;
+ string body = details.SelectSingleNode("//body").InnerText;
+
+ //Member m = (Member)args[0];
+ // deli member
+ IMember dMember = (IMember)args[0];
+
+ string domain = details.SelectSingleNode("//domain").InnerText;
+
+ body = string.Format(body,
+ dMember.Name,
+ dMember.Email,
+ args[1].ToString());
+
+ MailMessage mm = new MailMessage();
+ mm.Subject = subject;
+ mm.Body = body;
+
+ mm.To.Add(dMember.Email);
+ mm.From = from;
+
+ c.Send(mm);
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications] New deli member message sent" + dMember.Name);
+ }
+ catch (Exception e)
+ {
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications]" + e.Message);
+
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/NotificationTypes/DeliNotifyVendor.cs b/Marketplace/NotificationTypes/DeliNotifyVendor.cs
new file mode 100644
index 00000000..c672fc80
--- /dev/null
+++ b/Marketplace/NotificationTypes/DeliNotifyVendor.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using NotificationsCore;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using System.Net.Mail;
+
+namespace Marketplace.NotificationTypes
+{
+ public class DeliNotifyVendor : Notification
+ {
+ public DeliNotifyVendor()
+ {
+ }
+
+ public override bool SendNotification(System.Xml.XmlNode details, params object[] args)
+ {
+
+ IListingProvider listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ ILicenseProvider licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ try
+ {
+ SmtpClient c = new SmtpClient(details.SelectSingleNode("//smtp").InnerText);
+ c.Credentials = new System.Net.NetworkCredential(details.SelectSingleNode("//username").InnerText, details.SelectSingleNode("//password").InnerText);
+
+
+ MailAddress from = new MailAddress(
+ details.SelectSingleNode("//from/email").InnerText,
+ details.SelectSingleNode("//from/name").InnerText);
+
+ string subject = details.SelectSingleNode("//subject").InnerText;
+ string body = details.SelectSingleNode("//body").InnerText;
+
+ // deli ordered item
+ IOrderItem dOrder = (IOrderItem)args[0];
+
+ // deli listing
+ IListingItem dListing = listingProvider.GetListing(dOrder.ListingItemId);
+
+ // deli member
+ IMember dMember = (IMember)args[1];
+
+ string domain = details.SelectSingleNode("//domain").InnerText;
+
+ body = string.Format(body,
+ dMember.Name,
+ dOrder.Id.ToString(),
+ dListing.Name,
+ licenseProvider.GetLicense(dOrder.LicenseId).LicenseType.ToString(),
+ dOrder.Quantity,
+ dMember.Name,
+ dMember.Email);
+
+ MailMessage mm = new MailMessage();
+ mm.Subject = subject;
+ mm.Body = body;
+
+ mm.To.Add(dListing.Vendor.Member.Email);
+ mm.From = from;
+
+ c.Send(mm);
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications] Deli order vendor notification message sent, order item id: " + dOrder.Id.ToString());
+ }
+ catch (Exception e)
+ {
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications]" + e.Message);
+
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/NotificationTypes/DeliOrderComplete.cs b/Marketplace/NotificationTypes/DeliOrderComplete.cs
new file mode 100644
index 00000000..3aa17e4c
--- /dev/null
+++ b/Marketplace/NotificationTypes/DeliOrderComplete.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using NotificationsCore;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using System.Net.Mail;
+
+namespace Marketplace.NotificationTypes
+{
+ public class DeliOrderComplete : Notification
+ {
+ public DeliOrderComplete()
+ {
+ }
+
+ public override bool SendNotification(System.Xml.XmlNode details, params object[] args)
+ {
+ IOrderProvider OrderProvider = (IOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ IMemberProvider MemberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+
+
+ try
+ {
+ SmtpClient c = new SmtpClient(details.SelectSingleNode("//smtp").InnerText);
+ c.Credentials = new System.Net.NetworkCredential(details.SelectSingleNode("//username").InnerText, details.SelectSingleNode("//password").InnerText);
+
+ MailAddress from = new MailAddress(
+ details.SelectSingleNode("//from/email").InnerText,
+ details.SelectSingleNode("//from/name").InnerText);
+
+ string subject = details.SelectSingleNode("//subject").InnerText;
+ string body = details.SelectSingleNode("//body").InnerText;
+
+ // deli order
+ IOrder dOrder = (IOrder)args[0];
+
+ // deli member
+ IMember dMember = (IMember)args[1];
+
+ string domain = details.SelectSingleNode("//domain").InnerText;
+
+ body = string.Format(body,
+ dMember.Name,
+ dOrder.Id.ToString(),
+ dOrder.ProcessedTotal.ToString(),
+ dOrder.Currency.ToString(),
+ dOrder.PaymentDate.ToString(),
+ args[2].ToString());
+
+ MailMessage mm = new MailMessage();
+ mm.Subject = subject;
+ mm.Body = body;
+
+ mm.To.Add(dMember.Email);
+ mm.From = from;
+
+ c.Send(mm);
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications] Deli order complete message sent, order id: " + dOrder.Id.ToString());
+ }
+ catch (Exception e)
+ {
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications]" + e.Message);
+
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/NotificationTypes/DeliPayoutRequest.cs b/Marketplace/NotificationTypes/DeliPayoutRequest.cs
new file mode 100644
index 00000000..2160fd31
--- /dev/null
+++ b/Marketplace/NotificationTypes/DeliPayoutRequest.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using NotificationsCore;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using System.Net.Mail;
+
+namespace Marketplace.NotificationTypes
+{
+ public class DeliPayoutRequest : Notification
+ {
+ public DeliPayoutRequest()
+ {
+ }
+
+ public override bool SendNotification(System.Xml.XmlNode details, params object[] args)
+ {
+ IPayoutProvider payoutProvider = (IPayoutProvider)MarketplaceProviderManager.Providers["PayoutProvider"];
+ IMemberProvider MemberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+
+
+ try
+ {
+ SmtpClient c = new SmtpClient(details.SelectSingleNode("//smtp").InnerText);
+ c.Credentials = new System.Net.NetworkCredential(details.SelectSingleNode("//username").InnerText, details.SelectSingleNode("//password").InnerText);
+
+ MailAddress from = new MailAddress(
+ details.SelectSingleNode("//from/email").InnerText,
+ details.SelectSingleNode("//from/name").InnerText);
+
+ string subject = details.SelectSingleNode("//subject").InnerText;
+ string body = details.SelectSingleNode("//body").InnerText;
+ string notify = details.SelectSingleNode("//to").InnerText;
+
+ // deli order
+ IPayout dPayout = (IPayout)args[0];
+
+ // deli member
+ IMember dMember = (IMember)MemberProvider.GetMemberById(dPayout.VendorId);
+
+ string domain = details.SelectSingleNode("//domain").InnerText;
+
+ body = string.Format(body,
+ dMember.Name,
+ GetPayoutValue(dPayout.OrderItems).ToString());
+
+ MailMessage mm = new MailMessage();
+ mm.Subject = subject;
+ mm.Body = body;
+
+ mm.To.Add(notify);
+ mm.From = from;
+
+ c.Send(mm);
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications] Deli payout message sent, payout id: " + dPayout.Id.ToString());
+ }
+ catch (Exception e)
+ {
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "[Notifications]" + e.Message + "++++++++++++++++++++++" + e.Source + "-------" + e.StackTrace);
+
+ }
+
+ return true;
+ }
+
+ private double GetPayoutValue(IEnumerable items)
+ {
+ double val = 0.00;
+ foreach (var i in items)
+ {
+ val += i.PayoutAmount;
+ }
+
+ return val;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/NotificationTypes/Notification.config b/Marketplace/NotificationTypes/Notification.config
new file mode 100644
index 00000000..e4fb3293
--- /dev/null
+++ b/Marketplace/NotificationTypes/Notification.config
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+ mx01.fab-it.dk
+ our.umbraco.org
+
+ Our Umbraco
+ robot@umbraco.org
+
+
+
+
+
+
+
+
+
+ Umbraco community: Vote for project reminder
+ We noticed you downloaded the project ‘{0}’ from Umbraco Community Projects and have not yet given the project a vote.
+Voting for projects helps others find high-quality projects and helps project owners by letting them know which projects the community finds valuable.
+
+You can view the project here {1}
+
+
+Thank You from the Umbraco Community!
+--------------------------------------------------
+Don't want to get these notifications? Simply update your profile on our.umbraco.org
+
+
+
+
+ Umbraco community: Solution Reminder
+ We noticed that the topic ‘{0}’ you created in the Umbraco Community Forum does not have a post marked as a solution.
+If a post helped answer your question or resolve your issue please mark it as a solution so others can quickly find it. You can view the topic and any posts here {1}.
+
+
+Thank You from the Umbraco Community!
+--------------------------------------------------
+Don't want to get these notifications? Simply update your profile on our.umbraco.org
+
+
+
+
+ Umbraco community: New topic in '{0}' forum
+ {2} just added a new topic to the '{0}' forum.
+
+--------------------------------------------------
+
+{3}
+
+{4}
+
+--------------------------------------------------
+
+You can view the new topic here:
+{1}
+
+
+Thank You from the Umbraco Community!
+--------------------------------------------------
+You get this notification because you are subscribed to the '{0}' forum notifications.
+You can unsubscribe from your profile on our.umbraco.org
+
+
+
+
+ Umbraco community: New comment in topic '{0}'
+ {2} just added a new comment to the '{0}' topic.
+
+--------------------------------------------------
+
+{3}
+
+--------------------------------------------------
+
+You can view the new comment here:
+{1}
+
+
+Thank You from the Umbraco Community!
+--------------------------------------------------
+You get this notification because you are subscribed to the '{0}' topic notifications.
+You can unsubscribe from your profile on our.umbraco.org
+
+
+
+
+ Welcome to the Umbraco Deli
+
+ Hi {0} -
+
+ During your purchase from the Umbraco Deli we created
+ a new member account for you, just to save you some
+ time.
+
+ --------------------------------------------------
+
+ Your user name is: {1}
+ Your password is: {2}
+
+ --------------------------------------------------
+
+ We suggest you protect your information by changing
+ your password after logging in at:
+
+ http://our.umbraco.org/member/login
+
+ --------------------------------------------------
+
+ Not only does your new member account provide you with
+ access to your purchased licenses, but it also is your key
+ to the Umbraco Community on http://our.umbraco.org/ !
+
+ We encourage you to log in to http://our.umbraco.org/member/login
+ and plug-in to our community.
+
+
+ Thank You from the Umbraco Deli!
+ --------------------------------------------------
+ We sent this notification because we created an account for you.
+ You can unsubscribe from further communication from
+ your profile on our.umbraco.org
+
+
+
+
+ Your Umbraco Deli Order
+
+ Hi {0} -
+
+ Your Umbraco Deli purchase is complete! Your order details are below,
+ but you may want to get on it with it and just configure your
+ license here: http://our.umbraco.org/member/profile/my-licenses/
+
+ --------------------------------------------------
+
+ Deli Order Id: {1}
+ Payment Amount: {2}
+ Payment Currency: {3}
+ Payment Date: {4}
+ Transaction Id: {5}
+
+ --------------------------------------------------
+
+
+ Thank You from the Umbraco Deli!
+
+ --------------------------------------------------
+ We sent this notification because you completed an order with us.
+ You can unsubscribe from further communication from
+ your profile on our.umbraco.org
+
+
+
+
+ You have a new Umbraco Deli Order
+
+ Hi {0} -
+
+ An order was just placed on theUmbraco Deli for your project!
+ The details of the order details are below.
+
+ --------------------------------------------------
+
+ Order Item Id: {1}
+ Deli project name: {2}
+ License Type: {3} x {4}
+ Ordered by: {5}, {6}
+
+ --------------------------------------------------
+
+ Thank You from the Umbraco Deli!
+
+ --------------------------------------------------
+ We sent this notification because you are a Deli vendor.
+ You can unsubscribe from further communication from
+ your profile on our.umbraco.org
+
+
+
+
+ Welcome to the Umbraco Deli
+
+ Hi {0} -
+
+ During your purchase from the Umbraco Deli we created
+ a new member account for you, just to save you some
+ time.
+
+ --------------------------------------------------
+
+ Your user name is: {1}
+ Your password is: {2}
+
+ --------------------------------------------------
+
+ We suggest you protect your information by changing
+ your password after logging in at:
+
+ http://our.umbraco.org/member/login
+
+ --------------------------------------------------
+
+ Not only does your new member account provide you with
+ access to your purchased licenses, but it also is your key
+ to the Umbraco Community on http://our.umbraco.org/ !
+
+ We encourage you to log in to http://our.umbraco.org/member/login
+ and plug-in to our community.
+
+
+ Thank You from the Umbraco Deli!
+ --------------------------------------------------
+ We sent this notification because we created an account for you.
+ You can unsubscribe from further communication from
+ your profile on our.umbraco.org
+
+
+
+
+ A new payout request has been received
+ gregory@umbraco.com
+
+ Hi there -
+
+ A Deli Vendor has requested a payout! Payout details are below:
+ http://our.umbraco.org/umbraco/
+
+ --------------------------------------------------
+
+ Vendor: {0}
+ Payout Amount: {1}
+
+ --------------------------------------------------
+
+
+ Thank You from the Umbraco Deli!
+
+ --------------------------------------------------
+ We sent this notification because your the BOSS!
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/ProjectFileUploadHandler.cs b/Marketplace/ProjectFileUploadHandler.cs
new file mode 100644
index 00000000..41a1c646
--- /dev/null
+++ b/Marketplace/ProjectFileUploadHandler.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using umbraco.cms.businesslogic.web;
+using umbraco.cms.businesslogic;
+using umbraco.cms.businesslogic.member;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using our;
+using Marketplace.Providers.MediaFile;
+using Marketplace.Umbraco.BusinessLogic;
+
+namespace Marketplace {
+ public class ProjectFileUploadHandler : IHttpHandler {
+
+ #region IHttpHandler Members
+
+ public bool IsReusable {
+ get { return true; }
+ }
+
+ public void ProcessRequest(HttpContext context) {
+
+ HttpPostedFile file = context.Request.Files["Filedata"];
+ string userguid = context.Request.Form["USERGUID"];
+ string projectguid = context.Request.Form["NODEGUID"];
+ string fileType = context.Request.Form["FILETYPE"];
+ string fileName = context.Request.Form["FILENAME"];
+ string umbraoVersion = (context.Request.Form["UMBRACOVERSION"] != null) ? context.Request.Form["UMBRACOVERSION"] : "nan";
+ string dotNetVersion = (context.Request.Form["DOTNETVERSION"] != null) ? context.Request.Form["DOTNETVERSION"] : "nan";
+ string trustLevel = (context.Request.Form["TRUSTLEVEL"] != null) ? context.Request.Form["TRUSTLEVEL"] : "nan";
+
+
+
+
+ List v = new List() { UmbracoVersion.DefaultVersion() };
+
+ if (!string.IsNullOrEmpty(umbraoVersion))
+ {
+ v.Clear();
+ v = GetVersionsFromString(umbraoVersion);
+ }
+
+
+ bool trust = false;
+ if(trustLevel == "Medium"){
+ trust = true;
+ }
+
+
+ if (!string.IsNullOrEmpty(userguid) && !string.IsNullOrEmpty(projectguid) && !string.IsNullOrEmpty(fileType) && !string.IsNullOrEmpty(fileName)) {
+
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var p = provider.GetListing(new Guid(projectguid));
+ Member mem = new Member(new Guid(userguid));
+
+ if (p.Vendor != null && p.Vendor.Member.Id == mem.Id || Utills.IsProjectContributor(mem.Id, p.Id))
+ {
+
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+
+ var packageFileType = (FileType)Enum.Parse(typeof(FileType), (string)fileType , true);
+
+ fileProvider.CreateFile(fileName, p.Version, mem.UniqueId, file, packageFileType, v, dotNetVersion, trust);
+
+ } else {
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, 0, "wrong type or not a owner");
+ }
+
+ }
+ }
+
+ public static List GetVersionsFromString(string p)
+ {
+ var verArray = p.Split(',');
+ var verList = new List();
+ foreach (var ver in verArray)
+ {
+ verList.Add(UmbracoVersion.AvailableVersions()[ver]);
+ }
+ return verList;
+ }
+
+
+ #endregion
+ }
+}
diff --git a/Marketplace/Properties/AssemblyInfo.cs b/Marketplace/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..f176c11b
--- /dev/null
+++ b/Marketplace/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Marketplace")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Marketplace")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("b19fabd8-dd28-4981-9123-56d8467905a7")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Marketplace/Properties/Settings.Designer.cs b/Marketplace/Properties/Settings.Designer.cs
new file mode 100644
index 00000000..8e919b52
--- /dev/null
+++ b/Marketplace/Properties/Settings.Designer.cs
@@ -0,0 +1,46 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.34014
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
+ [global::System.Configuration.DefaultSettingValueAttribute("http://umbraco.com/umbraco/plugins/memberlookup/memberlookup.asmx")]
+ public string Marketplace_com_umbraco_MemberLookUp {
+ get {
+ return ((string)(this["Marketplace_com_umbraco_MemberLookUp"]));
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
+ [global::System.Configuration.DefaultSettingValueAttribute("http://umbraco.com/webservices/orders.asmx")]
+ public string Marketplace_com_umbraco_orders_Orders {
+ get {
+ return ((string)(this["Marketplace_com_umbraco_orders_Orders"]));
+ }
+ }
+ }
+}
diff --git a/Marketplace/Properties/Settings.settings b/Marketplace/Properties/Settings.settings
new file mode 100644
index 00000000..824486b6
--- /dev/null
+++ b/Marketplace/Properties/Settings.settings
@@ -0,0 +1,12 @@
+
+
+
+
+
+ http://umbraco.com/umbraco/plugins/memberlookup/memberlookup.asmx
+
+
+ http://umbraco.com/webservices/orders.asmx
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Razor/Deli-MyProjects.cshtml b/Marketplace/Razor/Deli-MyProjects.cshtml
new file mode 100644
index 00000000..53c6d1e4
--- /dev/null
+++ b/Marketplace/Razor/Deli-MyProjects.cshtml
@@ -0,0 +1,95 @@
+@using Marketplace.Interfaces
+@using Marketplace.Providers
+
+@{
+ IMemberProvider memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ IMember member = memberProvider.GetCurrentMember();
+ IListingProvider provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ IEnumerable projects = provider.GetListingsByVendor(member.Id,true,true);
+
+ string editUrl = umbraco.library.NiceUrl(Int32.Parse(Parameter.Edit));
+ string forumUrl = umbraco.library.NiceUrl(Int32.Parse(Parameter.Forum));
+ string licenseUrl = umbraco.library.NiceUrl(Int32.Parse(Parameter.Licenses));
+ string teamUrl = umbraco.library.NiceUrl(Int32.Parse(Parameter.Team));
+}
+
+Your existing projects
+
+
+@foreach (var project in projects)
+{
+
+
+ @if (!string.IsNullOrEmpty(project.DefaultScreenshot))
+ {
+
+ }
+ else
+ {
+
+ }
+
+ @project.CreateDate.ToString("D")
+
+
+ Edit
+ Forums
+ @if (project.ListingType == ListingType.commercial)
+ {
+ Licenses
+ }
+
+ @if (project.OpenForCollab)
+ {
+ Team
+ }
+
+
+
+}
+
+
+
+
+
+
+
+
+
+@{
+ var contribProjects = provider.GetListingsForContributor(member.Id);
+}
+
+@if (contribProjects.Count() > 0)
+{
+Project where you are contributor
+
+@foreach (var project in contribProjects)
+{
+
+
+
+
+ @project.CreateDate.ToString("D")
+ Owner: @project.Vendor.Member.Name
+
+
+ Edit
+ Forums
+ @if (project.ListingType == ListingType.commercial)
+ {
+ Licenses
+ }
+
+
+
+}
+
+}
+
diff --git a/Marketplace/Razor/Deli-ProjectCategories.cshtml b/Marketplace/Razor/Deli-ProjectCategories.cshtml
new file mode 100644
index 00000000..56b7e806
--- /dev/null
+++ b/Marketplace/Razor/Deli-ProjectCategories.cshtml
@@ -0,0 +1,22 @@
+@using Marketplace.Interfaces
+@using Marketplace.Providers
+
+@{
+ ICategoryProvider categoryProvider = (ICategoryProvider)MarketplaceProviderManager.Providers["CategoryProvider"];
+ IEnumerable cats = categoryProvider.GetAllCategories();
+ var selected = "";
+}
+Project Categories
+
+@foreach (var cat in cats)
+{
+
+
+
+
+ @cat.Name
+
+@* (@cat.ProjectCount) *@
+
+}
+
diff --git a/Marketplace/Razor/Deli-TagCloud.cshtml b/Marketplace/Razor/Deli-TagCloud.cshtml
new file mode 100644
index 00000000..7b6d5623
--- /dev/null
+++ b/Marketplace/Razor/Deli-TagCloud.cshtml
@@ -0,0 +1,33 @@
+@using Marketplace.Interfaces
+@using Marketplace.Providers
+
+@{
+ var tagsProvider = (IProjectTagProvider)MarketplaceProviderManager.Providers["TagProvider"];
+ var tags = tagsProvider.GetAllTags(false).OrderBy(x => x.Count).Take(50).OrderBy(x => x.Text);
+ max = tags.Max(x => x.LiveCount);
+}
+
+@functions{
+
+ public int max { get; set; }
+ public string weight(int liveCount)
+ {
+ double perc = ((double)liveCount / (double)max) * 100;
+
+ if(perc >= 99)return "weight1";
+ if(perc >= 70)return "weight2";
+ if(perc >= 40)return "weight3";
+ if(perc >= 20)return "weight4";
+ return "weight5";
+
+
+ }
+}
+
+
+
+
+@foreach (var t in tags) {
+
@t.Text
+}
+
diff --git a/Marketplace/Razor/VersionCompatibilityReport.cs b/Marketplace/Razor/VersionCompatibilityReport.cs
new file mode 100644
index 00000000..22aa2005
--- /dev/null
+++ b/Marketplace/Razor/VersionCompatibilityReport.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using Marketplace.uVersion;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.Razor
+{
+ public class VersionCompatibilityReport
+ {
+ private List uVersions;
+ private int fileId { get; set; }
+ private int packageId { get; set; }
+ private IListingProvider projectProvider;
+ private IListingItem project;
+ private IMediaFile file;
+
+
+ public VersionCompatibilityReport(int fid, int pid)
+ {
+ uVersions = Marketplace.uVersion.UVersion.GetAllVersions();
+ fileId = fid;
+ packageId = packageId;
+ projectProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ project = projectProvider.GetListing(pid, false);
+ file = project.PackageFile.Where(x => x.Id == Int32.Parse(project.CurrentReleaseFile)).FirstOrDefault();
+ }
+
+ public List GetCompatibilityReport()
+ {
+ var compatList = new List();
+ using (Marketplace.Data.MarketplaceDataContext ctx = new Marketplace.Data.MarketplaceDataContext())
+ {
+
+ foreach (var ver in uVersions)
+ {
+ var reports = ctx.DeliVersionCompatibilities.Where(x => x.version == ver.Name && x.projectId == project.Id);
+
+ if (reports.Count() > 0)
+ {
+ float compats = reports.Where(x => x.isCompatible).Count();
+ float numReps = reports.Count();
+ var perc = Convert.ToInt32(((compats / numReps) * 100));
+
+ var smiley = "unhappy";
+
+ if (perc >= 95)
+ {
+ smiley = "joyous";
+ }
+ else if (perc < 95 && perc >= 80)
+ {
+ smiley = "happy";
+ }
+ else if (perc < 80 && perc >= 65)
+ {
+ smiley = "neutral";
+ }
+ else if (perc < 65 && perc >= 50)
+ {
+ smiley = "unhappy";
+ }
+ else
+ {
+ smiley = "superUnhappy";
+ }
+
+
+
+ compatList.Add(new verCompat() { perc = perc, smiley = smiley, version = ver.Name });
+ }
+ else
+ {
+ compatList.Add(new verCompat() { perc = 0, smiley = "untested", version = ver.Name });
+ }
+
+ }
+ }
+ return compatList;
+
+ }
+ }
+
+ public class verCompat
+ {
+ public int perc { get; set; }
+ public string smiley { get; set; }
+ public string version { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/Razor/versionCompatibility.cshtml b/Marketplace/Razor/versionCompatibility.cshtml
new file mode 100644
index 00000000..1382a192
--- /dev/null
+++ b/Marketplace/Razor/versionCompatibility.cshtml
@@ -0,0 +1,46 @@
+@using Marketplace.uVersion;
+@{
+ var versions = UVersion.GetAllVersions();
+ var fileId = @Parameter.fileId;
+ var packageId = @Parameter.packageId;
+
+ var memberProvider = (Marketplace.Interfaces.IMemberProvider)Marketplace.Providers.MarketplaceProviderManager.Providers["MemberProvider"];
+ var mem = memberProvider.GetCurrentMember();
+
+ var projectProvider = (Marketplace.Interfaces.IListingProvider)Marketplace.Providers.MarketplaceProviderManager.Providers["ListingProvider"];
+ var Project = projectProvider.GetListing(Int32.Parse(packageId));
+
+}
+
+@if(umbraco.library.IsLoggedOn())
+{
+
+ if(Marketplace.library.HasDownloaded(mem.Id, Project.Id))
+ {
+
+
+
+
+ @:or Cancel
+ }
+ else
+ {
+ You need to download this package before you can report on it's compatibility
+ }
+
+}
+else
+{
+ You must login before you can report on package compatibility.
+}
\ No newline at end of file
diff --git a/Marketplace/Razor/versionCompatibilityReport.cshtml b/Marketplace/Razor/versionCompatibilityReport.cshtml
new file mode 100644
index 00000000..e5ae2682
--- /dev/null
+++ b/Marketplace/Razor/versionCompatibilityReport.cshtml
@@ -0,0 +1,26 @@
+@using Marketplace.Razor;
+@{
+ int fileId = Int32.Parse(Parameter.fileId);
+ int packageId = Int32.Parse(Parameter.packageId);
+
+ var verReport = new VersionCompatibilityReport(fileId, packageId);
+}
+
+This project is compatible with the following versions as reported by community members who have downloaded this package:
+
+@{
+
+ foreach (var ver in verReport.GetCompatibilityReport())
+ {
+ if(ver.smiley != "untested"){
+ @ver.version (@ver.perc%)
+ }
+ else
+ {
+ @ver.version (untested)
+ }
+ }
+}
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Rest.cs b/Marketplace/Rest.cs
new file mode 100644
index 00000000..b7cc03c6
--- /dev/null
+++ b/Marketplace/Rest.cs
@@ -0,0 +1,167 @@
+using System;
+using System.Web.Script.Serialization;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Data;
+using System.Web.Security;
+using Umbraco.Web.BaseRest;
+
+namespace Marketplace
+{
+ [RestExtension("deli")]
+ public class Rest
+ {
+ ///
+ /// Gets the popular listings.
+ ///
+ /// Type of the listing.
+ /// The skip.
+ /// The take.
+ ///
+ [RestExtensionMethod(ReturnXml = false)]
+ public static string GetPopularListings(string listingType, int skip, int take)
+ {
+
+ var ProjectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ IEnumerable Projects;
+
+ switch (listingType)
+ {
+ case "free":
+ Projects = ProjectsProvider.GetListingsByPopularity(skip, take, true, false).Where(x => x.ListingType == Interfaces.ListingType.free).Take(take);
+ break;
+
+ case "commercial":
+ Projects = ProjectsProvider.GetTopPaidListings(skip, take, true, false);
+ break;
+
+ default:
+ Projects = ProjectsProvider.GetListingsByPopularity(skip, take, true, false);
+ break;
+ }
+
+
+ JavaScriptSerializer serializer = new JavaScriptSerializer();
+ return serializer.Serialize(Projects.Select(x => new
+ {
+ Name = x.Name,
+ CategoryName = Marketplace.library.GetCategoryName((int)x.Id),
+ DefaultScreenShot = GetScreenShot(x.DefaultScreenshot),
+ Description = Marketplace.library.ShortenText(x.Description.ToString()),
+ NiceUrl = x.NiceUrl,
+ ListingType = x.ListingType.ToString(),
+ Karma = x.Karma,
+ Downloads = x.Downloads
+
+ }));
+ }
+
+ ///
+ /// Gets the newest listings.
+ ///
+ /// Type of the listing.
+ /// The skip.
+ /// The take.
+ ///
+ [RestExtensionMethod(ReturnXml = false)]
+ public static string GetNewestListings(string listingType, int skip, int take)
+ {
+
+ var ProjectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ IEnumerable Projects;
+
+ switch (listingType)
+ {
+ case "free":
+ Projects = ProjectsProvider.GetListingsByLatest(skip, take, ListingType.free, true, false);
+ break;
+
+ case "commercial":
+ Projects = ProjectsProvider.GetListingsByLatest(skip, take, ListingType.commercial, true, false);
+ break;
+
+ default:
+ Projects = ProjectsProvider.GetListingsByLatest(skip, take, true, false);
+ break;
+ }
+
+
+ JavaScriptSerializer serializer = new JavaScriptSerializer();
+ return serializer.Serialize(Projects.Select(x => new
+ {
+ Name = x.Name,
+ CategoryName = Marketplace.library.GetCategoryName((int)x.Id),
+ DefaultScreenShot = GetScreenShot(x.DefaultScreenshot),
+ Description = Marketplace.library.ShortenText(x.Description.ToString()),
+ NiceUrl = x.NiceUrl,
+ ListingType = x.ListingType.ToString(),
+ Karma = x.Karma,
+ Downloads = x.Downloads
+
+ }));
+ }
+
+ [RestExtensionMethod(ReturnXml = false)]
+ public static string CompatibilityReport(int projectId, int fileId, string compatArr)
+ {
+ using (var ctx = new MarketplaceDataContext())
+ {
+ int _currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0;
+ var versionData = compatArr.Split(',').Select(x => new { version = x.Split('^')[0], compat = x.Split('^')[1] });
+
+
+ // load all the existing member reports for this package by this member. This is to stop multiple insertions of reports for a single member
+ var memberReports = ctx.DeliVersionCompatibilities.Where(x => x.memberId == _currentMember && x.fileId == fileId && x.projectId == projectId).ToList();
+
+
+
+ foreach (var ver in versionData)
+ {
+ if (ver.compat == "1" || ver.compat == "0")
+ {
+ var compVer = new DeliVersionCompatibility() { fileId = fileId, memberId = _currentMember, isCompatible = ver.compat == "1" ? true : false, dateStamp = DateTime.Now, version = ver.version, projectId = projectId };
+
+ //try find an existing report
+ var existingReport = memberReports.Where(x => x.fileId == compVer.fileId && x.memberId == compVer.memberId && x.projectId == compVer.projectId && x.version == compVer.version).FirstOrDefault();
+ if (existingReport != null)
+ {
+ existingReport.isCompatible = compVer.isCompatible;
+ existingReport.dateStamp = DateTime.Now;
+ }
+ else
+ {
+ // otherwise insert the new compat ver report
+ ctx.DeliVersionCompatibilities.InsertOnSubmit(compVer);
+ }
+
+ }
+
+ }
+ ctx.SubmitChanges();
+
+ //give them some Karma if they haven't reported on this before.
+ if (memberReports.Count() == 0)
+ {
+ uPowers.Library.Rest.Action("ProjectVersionVote", fileId);
+ }
+ }
+ return "got it thanks";
+ }
+
+
+
+ private static string GetScreenShot(string ss){
+ if(!string.IsNullOrEmpty(ss)){
+ return "/umbraco/imagegen.ashx?image="+ ss +"&pad=true&width=50&height=50;";
+ }
+ else return "/css/img/package2.png";
+ }
+
+ }
+}
+
diff --git a/Marketplace/Web References/com.umbraco.orders/BuyerProxy.datasource b/Marketplace/Web References/com.umbraco.orders/BuyerProxy.datasource
new file mode 100644
index 00000000..fca61402
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco.orders/BuyerProxy.datasource
@@ -0,0 +1,10 @@
+
+
+
+ Marketplace.com.umbraco.orders.BuyerProxy, Web References.com.umbraco.orders.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco.orders/OrderProxy.datasource b/Marketplace/Web References/com.umbraco.orders/OrderProxy.datasource
new file mode 100644
index 00000000..60658ce1
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco.orders/OrderProxy.datasource
@@ -0,0 +1,10 @@
+
+
+
+ Marketplace.com.umbraco.orders.OrderProxy, Web References.com.umbraco.orders.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco.orders/Reference.cs b/Marketplace/Web References/com.umbraco.orders/Reference.cs
new file mode 100644
index 00000000..511883fa
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco.orders/Reference.cs
@@ -0,0 +1,741 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.34014
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+//
+// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.34014.
+//
+#pragma warning disable 1591
+
+namespace Marketplace.com.umbraco.orders {
+ using System;
+ using System.Web.Services;
+ using System.Diagnostics;
+ using System.Web.Services.Protocols;
+ using System.Xml.Serialization;
+ using System.ComponentModel;
+
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Web.Services.WebServiceBindingAttribute(Name="OrdersSoap", Namespace="http://tempuri.org/")]
+ public partial class Orders : System.Web.Services.Protocols.SoapHttpClientProtocol {
+
+ private System.Threading.SendOrPostCallback CreateOperationCompleted;
+
+ private System.Threading.SendOrPostCallback GetFromEcommerceIDOperationCompleted;
+
+ private System.Threading.SendOrPostCallback GetFromTransactionIDOperationCompleted;
+
+ private System.Threading.SendOrPostCallback LinkProfilesOperationCompleted;
+
+ private bool useDefaultCredentialsSetExplicitly;
+
+ ///
+ public Orders() {
+ this.Url = global::Marketplace.Properties.Settings.Default.Marketplace_com_umbraco_orders_Orders;
+ if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
+ this.UseDefaultCredentials = true;
+ this.useDefaultCredentialsSetExplicitly = false;
+ }
+ else {
+ this.useDefaultCredentialsSetExplicitly = true;
+ }
+ }
+
+ public new string Url {
+ get {
+ return base.Url;
+ }
+ set {
+ if ((((this.IsLocalFileSystemWebService(base.Url) == true)
+ && (this.useDefaultCredentialsSetExplicitly == false))
+ && (this.IsLocalFileSystemWebService(value) == false))) {
+ base.UseDefaultCredentials = false;
+ }
+ base.Url = value;
+ }
+ }
+
+ public new bool UseDefaultCredentials {
+ get {
+ return base.UseDefaultCredentials;
+ }
+ set {
+ base.UseDefaultCredentials = value;
+ this.useDefaultCredentialsSetExplicitly = true;
+ }
+ }
+
+ ///
+ public event CreateCompletedEventHandler CreateCompleted;
+
+ ///
+ public event GetFromEcommerceIDCompletedEventHandler GetFromEcommerceIDCompleted;
+
+ ///
+ public event GetFromTransactionIDCompletedEventHandler GetFromTransactionIDCompleted;
+
+ ///
+ public event LinkProfilesCompletedEventHandler LinkProfilesCompleted;
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Create", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public OrderProxy Create(OrderProxy order, bool testMode, string login, string password) {
+ object[] results = this.Invoke("Create", new object[] {
+ order,
+ testMode,
+ login,
+ password});
+ return ((OrderProxy)(results[0]));
+ }
+
+ ///
+ public void CreateAsync(OrderProxy order, bool testMode, string login, string password) {
+ this.CreateAsync(order, testMode, login, password, null);
+ }
+
+ ///
+ public void CreateAsync(OrderProxy order, bool testMode, string login, string password, object userState) {
+ if ((this.CreateOperationCompleted == null)) {
+ this.CreateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOperationCompleted);
+ }
+ this.InvokeAsync("Create", new object[] {
+ order,
+ testMode,
+ login,
+ password}, this.CreateOperationCompleted, userState);
+ }
+
+ private void OnCreateOperationCompleted(object arg) {
+ if ((this.CreateCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.CreateCompleted(this, new CreateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetFromEcommerceID", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public OrderProxy GetFromEcommerceID(int EcommerceOrderID, string login, string password) {
+ object[] results = this.Invoke("GetFromEcommerceID", new object[] {
+ EcommerceOrderID,
+ login,
+ password});
+ return ((OrderProxy)(results[0]));
+ }
+
+ ///
+ public void GetFromEcommerceIDAsync(int EcommerceOrderID, string login, string password) {
+ this.GetFromEcommerceIDAsync(EcommerceOrderID, login, password, null);
+ }
+
+ ///
+ public void GetFromEcommerceIDAsync(int EcommerceOrderID, string login, string password, object userState) {
+ if ((this.GetFromEcommerceIDOperationCompleted == null)) {
+ this.GetFromEcommerceIDOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFromEcommerceIDOperationCompleted);
+ }
+ this.InvokeAsync("GetFromEcommerceID", new object[] {
+ EcommerceOrderID,
+ login,
+ password}, this.GetFromEcommerceIDOperationCompleted, userState);
+ }
+
+ private void OnGetFromEcommerceIDOperationCompleted(object arg) {
+ if ((this.GetFromEcommerceIDCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.GetFromEcommerceIDCompleted(this, new GetFromEcommerceIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetFromTransactionID", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public OrderProxy GetFromTransactionID(string transaction, string login, string password) {
+ object[] results = this.Invoke("GetFromTransactionID", new object[] {
+ transaction,
+ login,
+ password});
+ return ((OrderProxy)(results[0]));
+ }
+
+ ///
+ public void GetFromTransactionIDAsync(string transaction, string login, string password) {
+ this.GetFromTransactionIDAsync(transaction, login, password, null);
+ }
+
+ ///
+ public void GetFromTransactionIDAsync(string transaction, string login, string password, object userState) {
+ if ((this.GetFromTransactionIDOperationCompleted == null)) {
+ this.GetFromTransactionIDOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFromTransactionIDOperationCompleted);
+ }
+ this.InvokeAsync("GetFromTransactionID", new object[] {
+ transaction,
+ login,
+ password}, this.GetFromTransactionIDOperationCompleted, userState);
+ }
+
+ private void OnGetFromTransactionIDOperationCompleted(object arg) {
+ if ((this.GetFromTransactionIDCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.GetFromTransactionIDCompleted(this, new GetFromTransactionIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/LinkProfiles", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public BuyerProxy LinkProfiles(string profileEmail, string profilePassword, string login, string password) {
+ object[] results = this.Invoke("LinkProfiles", new object[] {
+ profileEmail,
+ profilePassword,
+ login,
+ password});
+ return ((BuyerProxy)(results[0]));
+ }
+
+ ///
+ public void LinkProfilesAsync(string profileEmail, string profilePassword, string login, string password) {
+ this.LinkProfilesAsync(profileEmail, profilePassword, login, password, null);
+ }
+
+ ///
+ public void LinkProfilesAsync(string profileEmail, string profilePassword, string login, string password, object userState) {
+ if ((this.LinkProfilesOperationCompleted == null)) {
+ this.LinkProfilesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnLinkProfilesOperationCompleted);
+ }
+ this.InvokeAsync("LinkProfiles", new object[] {
+ profileEmail,
+ profilePassword,
+ login,
+ password}, this.LinkProfilesOperationCompleted, userState);
+ }
+
+ private void OnLinkProfilesOperationCompleted(object arg) {
+ if ((this.LinkProfilesCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.LinkProfilesCompleted(this, new LinkProfilesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ public new void CancelAsync(object userState) {
+ base.CancelAsync(userState);
+ }
+
+ private bool IsLocalFileSystemWebService(string url) {
+ if (((url == null)
+ || (url == string.Empty))) {
+ return false;
+ }
+ System.Uri wsUri = new System.Uri(url);
+ if (((wsUri.Port >= 1024)
+ && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
+ return true;
+ }
+ return false;
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.33440")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+ public partial class OrderProxy {
+
+ private OrderLineProxy[] orderLinesField;
+
+ private System.DateTime createdField;
+
+ private BuyerProxy buyerField;
+
+ private OrderStatus orderStatusField;
+
+ private string invoicePathField;
+
+ private int deliOrderIDField;
+
+ private int ecommerceOrderIDField;
+
+ private string purchaseOrderField;
+
+ private string transactionIDField;
+
+ ///
+ public OrderLineProxy[] OrderLines {
+ get {
+ return this.orderLinesField;
+ }
+ set {
+ this.orderLinesField = value;
+ }
+ }
+
+ ///
+ public System.DateTime Created {
+ get {
+ return this.createdField;
+ }
+ set {
+ this.createdField = value;
+ }
+ }
+
+ ///
+ public BuyerProxy Buyer {
+ get {
+ return this.buyerField;
+ }
+ set {
+ this.buyerField = value;
+ }
+ }
+
+ ///
+ public OrderStatus OrderStatus {
+ get {
+ return this.orderStatusField;
+ }
+ set {
+ this.orderStatusField = value;
+ }
+ }
+
+ ///
+ public string InvoicePath {
+ get {
+ return this.invoicePathField;
+ }
+ set {
+ this.invoicePathField = value;
+ }
+ }
+
+ ///
+ public int DeliOrderID {
+ get {
+ return this.deliOrderIDField;
+ }
+ set {
+ this.deliOrderIDField = value;
+ }
+ }
+
+ ///
+ public int EcommerceOrderID {
+ get {
+ return this.ecommerceOrderIDField;
+ }
+ set {
+ this.ecommerceOrderIDField = value;
+ }
+ }
+
+ ///
+ public string PurchaseOrder {
+ get {
+ return this.purchaseOrderField;
+ }
+ set {
+ this.purchaseOrderField = value;
+ }
+ }
+
+ ///
+ public string TransactionID {
+ get {
+ return this.transactionIDField;
+ }
+ set {
+ this.transactionIDField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.33440")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+ public partial class OrderLineProxy {
+
+ private decimal amountField;
+
+ private string descriptionField;
+
+ private int quantityField;
+
+ private System.Guid productIDField;
+
+ private int vendorEconomicIDField;
+
+ ///
+ public decimal Amount {
+ get {
+ return this.amountField;
+ }
+ set {
+ this.amountField = value;
+ }
+ }
+
+ ///
+ public string description {
+ get {
+ return this.descriptionField;
+ }
+ set {
+ this.descriptionField = value;
+ }
+ }
+
+ ///
+ public int Quantity {
+ get {
+ return this.quantityField;
+ }
+ set {
+ this.quantityField = value;
+ }
+ }
+
+ ///
+ public System.Guid ProductID {
+ get {
+ return this.productIDField;
+ }
+ set {
+ this.productIDField = value;
+ }
+ }
+
+ ///
+ public int VendorEconomicID {
+ get {
+ return this.vendorEconomicIDField;
+ }
+ set {
+ this.vendorEconomicIDField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.33440")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+ public partial class BuyerProxy {
+
+ private string nameField;
+
+ private string emailField;
+
+ private string loginField;
+
+ private string companyField;
+
+ private string vATField;
+
+ private bool vatInvalidField;
+
+ private string addressField;
+
+ private string countryField;
+
+ private string phoneField;
+
+ private string ipField;
+
+ private int umbracoComMemberIDField;
+
+ private System.Guid umbracoComMemberGuidField;
+
+ private int ourMemberIdField;
+
+ private System.Guid ourMemberGuidField;
+
+ private string[] groupsField;
+
+ ///
+ public string Name {
+ get {
+ return this.nameField;
+ }
+ set {
+ this.nameField = value;
+ }
+ }
+
+ ///
+ public string Email {
+ get {
+ return this.emailField;
+ }
+ set {
+ this.emailField = value;
+ }
+ }
+
+ ///
+ public string Login {
+ get {
+ return this.loginField;
+ }
+ set {
+ this.loginField = value;
+ }
+ }
+
+ ///
+ public string Company {
+ get {
+ return this.companyField;
+ }
+ set {
+ this.companyField = value;
+ }
+ }
+
+ ///
+ public string VAT {
+ get {
+ return this.vATField;
+ }
+ set {
+ this.vATField = value;
+ }
+ }
+
+ ///
+ public bool VatInvalid {
+ get {
+ return this.vatInvalidField;
+ }
+ set {
+ this.vatInvalidField = value;
+ }
+ }
+
+ ///
+ public string Address {
+ get {
+ return this.addressField;
+ }
+ set {
+ this.addressField = value;
+ }
+ }
+
+ ///
+ public string Country {
+ get {
+ return this.countryField;
+ }
+ set {
+ this.countryField = value;
+ }
+ }
+
+ ///
+ public string Phone {
+ get {
+ return this.phoneField;
+ }
+ set {
+ this.phoneField = value;
+ }
+ }
+
+ ///
+ public string IP {
+ get {
+ return this.ipField;
+ }
+ set {
+ this.ipField = value;
+ }
+ }
+
+ ///
+ public int umbracoComMemberID {
+ get {
+ return this.umbracoComMemberIDField;
+ }
+ set {
+ this.umbracoComMemberIDField = value;
+ }
+ }
+
+ ///
+ public System.Guid umbracoComMemberGuid {
+ get {
+ return this.umbracoComMemberGuidField;
+ }
+ set {
+ this.umbracoComMemberGuidField = value;
+ }
+ }
+
+ ///
+ public int ourMemberId {
+ get {
+ return this.ourMemberIdField;
+ }
+ set {
+ this.ourMemberIdField = value;
+ }
+ }
+
+ ///
+ public System.Guid ourMemberGuid {
+ get {
+ return this.ourMemberGuidField;
+ }
+ set {
+ this.ourMemberGuidField = value;
+ }
+ }
+
+ ///
+ public string[] Groups {
+ get {
+ return this.groupsField;
+ }
+ set {
+ this.groupsField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.33440")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+ public enum OrderStatus {
+
+ ///
+ Accepted,
+
+ ///
+ Refused,
+
+ ///
+ Error,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ public delegate void CreateCompletedEventHandler(object sender, CreateCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class CreateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal CreateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public OrderProxy Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((OrderProxy)(this.results[0]));
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ public delegate void GetFromEcommerceIDCompletedEventHandler(object sender, GetFromEcommerceIDCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class GetFromEcommerceIDCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal GetFromEcommerceIDCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public OrderProxy Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((OrderProxy)(this.results[0]));
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ public delegate void GetFromTransactionIDCompletedEventHandler(object sender, GetFromTransactionIDCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class GetFromTransactionIDCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal GetFromTransactionIDCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public OrderProxy Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((OrderProxy)(this.results[0]));
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ public delegate void LinkProfilesCompletedEventHandler(object sender, LinkProfilesCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class LinkProfilesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal LinkProfilesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public BuyerProxy Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((BuyerProxy)(this.results[0]));
+ }
+ }
+ }
+}
+
+#pragma warning restore 1591
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco.orders/Reference.map b/Marketplace/Web References/com.umbraco.orders/Reference.map
new file mode 100644
index 00000000..4cc526ce
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco.orders/Reference.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco.orders/orders.disco b/Marketplace/Web References/com.umbraco.orders/orders.disco
new file mode 100644
index 00000000..d3eadfb1
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco.orders/orders.disco
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco.orders/orders.wsdl b/Marketplace/Web References/com.umbraco.orders/orders.wsdl
new file mode 100644
index 00000000..3265010d
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco.orders/orders.wsdl
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco/MemberData.datasource b/Marketplace/Web References/com.umbraco/MemberData.datasource
new file mode 100644
index 00000000..9707c40e
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco/MemberData.datasource
@@ -0,0 +1,10 @@
+
+
+
+ Marketplace.com.umbraco.MemberData, Web References.com.umbraco.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco/Reference.cs b/Marketplace/Web References/com.umbraco/Reference.cs
new file mode 100644
index 00000000..a37e8a5c
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco/Reference.cs
@@ -0,0 +1,257 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.34014
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+//
+// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.34014.
+//
+#pragma warning disable 1591
+
+namespace Marketplace.com.umbraco {
+ using System;
+ using System.Web.Services;
+ using System.Diagnostics;
+ using System.Web.Services.Protocols;
+ using System.Xml.Serialization;
+ using System.ComponentModel;
+
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Web.Services.WebServiceBindingAttribute(Name="MemberLookUpSoap", Namespace="http://tempuri.org/")]
+ public partial class MemberLookUp : System.Web.Services.Protocols.SoapHttpClientProtocol {
+
+ private System.Threading.SendOrPostCallback GetMemberDataOperationCompleted;
+
+ private bool useDefaultCredentialsSetExplicitly;
+
+ ///
+ public MemberLookUp() {
+ this.Url = global::Marketplace.Properties.Settings.Default.Marketplace_com_umbraco_MemberLookUp;
+ if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
+ this.UseDefaultCredentials = true;
+ this.useDefaultCredentialsSetExplicitly = false;
+ }
+ else {
+ this.useDefaultCredentialsSetExplicitly = true;
+ }
+ }
+
+ public new string Url {
+ get {
+ return base.Url;
+ }
+ set {
+ if ((((this.IsLocalFileSystemWebService(base.Url) == true)
+ && (this.useDefaultCredentialsSetExplicitly == false))
+ && (this.IsLocalFileSystemWebService(value) == false))) {
+ base.UseDefaultCredentials = false;
+ }
+ base.Url = value;
+ }
+ }
+
+ public new bool UseDefaultCredentials {
+ get {
+ return base.UseDefaultCredentials;
+ }
+ set {
+ base.UseDefaultCredentials = value;
+ this.useDefaultCredentialsSetExplicitly = true;
+ }
+ }
+
+ ///
+ public event GetMemberDataCompletedEventHandler GetMemberDataCompleted;
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetMemberData", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public MemberData GetMemberData(string username, string password) {
+ object[] results = this.Invoke("GetMemberData", new object[] {
+ username,
+ password});
+ return ((MemberData)(results[0]));
+ }
+
+ ///
+ public void GetMemberDataAsync(string username, string password) {
+ this.GetMemberDataAsync(username, password, null);
+ }
+
+ ///
+ public void GetMemberDataAsync(string username, string password, object userState) {
+ if ((this.GetMemberDataOperationCompleted == null)) {
+ this.GetMemberDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMemberDataOperationCompleted);
+ }
+ this.InvokeAsync("GetMemberData", new object[] {
+ username,
+ password}, this.GetMemberDataOperationCompleted, userState);
+ }
+
+ private void OnGetMemberDataOperationCompleted(object arg) {
+ if ((this.GetMemberDataCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.GetMemberDataCompleted(this, new GetMemberDataCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ public new void CancelAsync(object userState) {
+ base.CancelAsync(userState);
+ }
+
+ private bool IsLocalFileSystemWebService(string url) {
+ if (((url == null)
+ || (url == string.Empty))) {
+ return false;
+ }
+ System.Uri wsUri = new System.Uri(url);
+ if (((wsUri.Port >= 1024)
+ && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
+ return true;
+ }
+ return false;
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.33440")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+ public partial class MemberData {
+
+ private int idField;
+
+ private string[] memberGroupsField;
+
+ private string companyField;
+
+ private string addressField;
+
+ private string countryField;
+
+ private string phoneField;
+
+ private string vATNumberField;
+
+ private string invoicingEmailField;
+
+ ///
+ public int Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ public string[] MemberGroups {
+ get {
+ return this.memberGroupsField;
+ }
+ set {
+ this.memberGroupsField = value;
+ }
+ }
+
+ ///
+ public string Company {
+ get {
+ return this.companyField;
+ }
+ set {
+ this.companyField = value;
+ }
+ }
+
+ ///
+ public string Address {
+ get {
+ return this.addressField;
+ }
+ set {
+ this.addressField = value;
+ }
+ }
+
+ ///
+ public string Country {
+ get {
+ return this.countryField;
+ }
+ set {
+ this.countryField = value;
+ }
+ }
+
+ ///
+ public string Phone {
+ get {
+ return this.phoneField;
+ }
+ set {
+ this.phoneField = value;
+ }
+ }
+
+ ///
+ public string VATNumber {
+ get {
+ return this.vATNumberField;
+ }
+ set {
+ this.vATNumberField = value;
+ }
+ }
+
+ ///
+ public string InvoicingEmail {
+ get {
+ return this.invoicingEmailField;
+ }
+ set {
+ this.invoicingEmailField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ public delegate void GetMemberDataCompletedEventHandler(object sender, GetMemberDataCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class GetMemberDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal GetMemberDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public MemberData Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((MemberData)(this.results[0]));
+ }
+ }
+ }
+}
+
+#pragma warning restore 1591
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco/Reference.map b/Marketplace/Web References/com.umbraco/Reference.map
new file mode 100644
index 00000000..32efed66
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco/Reference.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco/memberlookup.disco b/Marketplace/Web References/com.umbraco/memberlookup.disco
new file mode 100644
index 00000000..7f8ace35
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco/memberlookup.disco
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web References/com.umbraco/memberlookup.wsdl b/Marketplace/Web References/com.umbraco/memberlookup.wsdl
new file mode 100644
index 00000000..eaf866ca
--- /dev/null
+++ b/Marketplace/Web References/com.umbraco/memberlookup.wsdl
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web.Debug.config b/Marketplace/Web.Debug.config
new file mode 100644
index 00000000..2c6dd51a
--- /dev/null
+++ b/Marketplace/Web.Debug.config
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web.Release.config b/Marketplace/Web.Release.config
new file mode 100644
index 00000000..4122d79b
--- /dev/null
+++ b/Marketplace/Web.Release.config
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/Web.config b/Marketplace/Web.config
new file mode 100644
index 00000000..9e2fcddf
--- /dev/null
+++ b/Marketplace/Web.config
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://umbraco.com/umbraco/plugins/memberlookup/memberlookup.asmx
+
+
+ http://umbraco.com/webservices/orders.asmx
+
+
+
+
+ http://regexlib.com/WebServices.asmx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/adhoc/setalllive.aspx b/Marketplace/adhoc/setalllive.aspx
new file mode 100644
index 00000000..9dfb8301
--- /dev/null
+++ b/Marketplace/adhoc/setalllive.aspx
@@ -0,0 +1,16 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setalllive.aspx.cs" Inherits="Marketplace.adhoc.setalllive" %>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/adhoc/setalllive.aspx.cs b/Marketplace/adhoc/setalllive.aspx.cs
new file mode 100644
index 00000000..c670919b
--- /dev/null
+++ b/Marketplace/adhoc/setalllive.aspx.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.web;
+
+namespace Marketplace.adhoc
+{
+ public partial class setalllive : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+
+ var projectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ var projects = projectsProvider.GetAllListings(true, true).ToList();
+ var count = 0;
+ var liveCount = 0;
+
+ var user = new umbraco.BusinessLogic.User(0);
+ foreach (var p in projects)
+ {
+
+ if (!p.Live)
+ {
+
+ count++;
+ Document d = new Document(p.Id);
+ d.getProperty("projectLive").Value = "1";
+ d.Publish(user);
+ umbraco.library.UpdateDocumentCache(d.Id);
+ Response.Write(d.Text + "+++++++:" + d.getProperty("projectLive").Value + " ");
+ }
+
+ }
+
+ Response.Write(count + " projects updated to be live of " + projects.Count() + " ");
+ Response.Write(liveCount + " are already live");
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/adhoc/setalllive.aspx.designer.cs b/Marketplace/adhoc/setalllive.aspx.designer.cs
new file mode 100644
index 00000000..711cfa6b
--- /dev/null
+++ b/Marketplace/adhoc/setalllive.aspx.designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.adhoc
+{
+
+
+ public partial class setalllive
+ {
+
+ ///
+ /// form1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+ }
+}
diff --git a/Marketplace/library.cs b/Marketplace/library.cs
new file mode 100644
index 00000000..23a065ac
--- /dev/null
+++ b/Marketplace/library.cs
@@ -0,0 +1,143 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco;
+using our;
+using System.Text.RegularExpressions;
+using umbraco.NodeFactory;
+using System.Globalization;
+using Marketplace.Data;
+
+namespace Marketplace
+{
+ [XsltExtension("deli.library")]
+ public class library
+ {
+
+ public static bool HasVendorAccess(int pageId)
+ {
+ var page = new umbraco.NodeFactory.Node(pageId);
+
+ if (page.GetProperty("vendorOnly") != null)
+ {
+ var memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ var member = memberProvider.GetCurrentMember();
+
+ var vendorOnly = page.GetProperty("vendorOnly").Value == "1" ? true : false;
+ if (vendorOnly)
+ {
+ if (member.IsDeliVendor)
+ return true;
+ else
+ return false;
+ }
+ return true;
+ }
+ return true;
+
+ }
+
+ public static string ShortenText(string text)
+ {
+ text = Utills.StripHTML(text).Replace(" ", "");
+ if (text.Length > 210)
+ {
+
+ text = text.Substring(0, 210);
+ text = text.Substring(0, text.LastIndexOf(' '));
+ }
+
+ text = Regex.Replace(text, @"[^a-zA-Z0-9\s.?!&;]", ""); //strip all crap from the listing such as ======================================= !!!!
+ return text.Trim();
+ }
+
+
+
+ public static string GetTagsAsCSV(IEnumerable tagList)
+ {
+ var tags = string.Empty;
+ int counter = 0;
+
+ foreach (var t in tagList)
+ {
+ tags += t.Text + ", ";
+ counter++;
+
+ if (counter > 3)
+ break;
+ }
+
+ if (tags.Length > 0)
+ {
+ tags = tags.Substring(0, tags.Length - 2);
+ }
+ return tags;
+ }
+
+ public static string GetCategoryName(int projectId)
+ {
+ var node = new Node(projectId);
+ return node.Parent.Name;
+
+ }
+
+
+
+
+ public static string GetDefaultScreenshot(string prop)
+ {
+ return !String.IsNullOrEmpty(prop) ? "/umbraco/imagegen.ashx?image=" + prop + "&pad=true&width=50&height=50;" : "/css/img/package2.png";
+ }
+
+ public static string GetManufacturerName(IVendor vendor)
+ {
+ if (!string.IsNullOrEmpty(vendor.VendorCompanyName))
+ {
+ return vendor.VendorCompanyName;
+ }
+ else
+ {
+ return vendor.Member.Name;
+ }
+
+ }
+
+ public static string GetCountry(string code)
+ {
+
+
+ foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
+ {
+
+ RegionInfo ri = new RegionInfo(ci.LCID);
+ if (ri.TwoLetterISORegionName.ToLowerInvariant() == code)
+ return ri.EnglishName;
+ }
+
+ return "";
+
+ }
+
+
+ ///
+ /// Check to see if member has reported on compatibility for a package regardless of version of the package
+ ///
+ /// The members Id
+ /// The package Id
+ ///
+ public static bool HasDownloaded(int memberId, int packageId)
+ {
+ using (var ctx = new MarketplaceDataContext())
+ {
+ var downs = ctx.projectDownloads.Where(x => x.memberId == memberId && x.projectId == packageId);
+ if (downs.Count() > 0)
+ return true;
+ return false;
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/packages.config b/Marketplace/packages.config
new file mode 100644
index 00000000..8a19db24
--- /dev/null
+++ b/Marketplace/packages.config
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/uVersion/config.cs b/Marketplace/uVersion/config.cs
new file mode 100644
index 00000000..1685e5f3
--- /dev/null
+++ b/Marketplace/uVersion/config.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Xml;
+using System.IO;
+using System.Web.Caching;
+using umbraco.BusinessLogic;
+
+namespace Marketplace.uVersion
+{
+ public class config
+ {
+
+ public static XmlDocument _Settings
+ {
+ get
+ {
+ XmlDocument us = (XmlDocument)HttpRuntime.Cache["uVersionSettingsFile"];
+ if (us == null)
+ us = ensureSettingsDocument();
+ return us;
+ }
+ }
+
+ private static string _path = umbraco.GlobalSettings.FullpathToRoot + Path.DirectorySeparatorChar + "config" + Path.DirectorySeparatorChar;
+ private static string _filename = "uVersion.config";
+ private static XmlDocument ensureSettingsDocument()
+ {
+ object settingsFile = HttpRuntime.Cache["uVersionSettingsFile"];
+
+ // Check for language file in cache
+ if (settingsFile == null)
+ {
+ XmlDocument temp = new XmlDocument();
+ XmlTextReader settingsReader = new XmlTextReader(_path + _filename);
+ try
+ {
+ temp.Load(settingsReader);
+ HttpRuntime.Cache.Insert("uVersionSettingsFile", temp, new CacheDependency(_path + _filename));
+ }
+ catch (Exception e)
+ {
+ Log.Add(LogTypes.Error, new User(0), -1, "Error reading uVersion setting file: " + e.ToString());
+ }
+ settingsReader.Close();
+ return temp;
+ }
+ else
+ return (XmlDocument)settingsFile;
+ }
+
+ private static void save()
+ {
+ _Settings.Save(_path + _filename);
+ }
+
+ ///
+ /// Selects a xml node in the umbraco settings config file.
+ ///
+ /// The xpath query to the specific node.
+ /// If found, it returns the specific configuration xml node.
+ public static XmlNode GetKeyAsNode(string Key)
+ {
+ if (Key == null)
+ throw new ArgumentException("Key cannot be null");
+ ensureSettingsDocument();
+ if (_Settings == null || _Settings.DocumentElement == null)
+ return null;
+ return _Settings.DocumentElement.SelectSingleNode(Key);
+ }
+
+ ///
+ /// Gets the value of configuration xml node with the specified key.
+ ///
+ /// The key.
+ ///
+ public static string GetKey(string Key)
+ {
+ ensureSettingsDocument();
+
+ XmlNode node = _Settings.DocumentElement.SelectSingleNode(Key);
+ if (node == null || node.FirstChild == null || node.FirstChild.Value == null)
+ return string.Empty;
+ return node.FirstChild.Value;
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/uVersion/uVersion.cs b/Marketplace/uVersion/uVersion.cs
new file mode 100644
index 00000000..3fb1fc83
--- /dev/null
+++ b/Marketplace/uVersion/uVersion.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Xml;
+
+namespace Marketplace.uVersion
+{
+ public class UVersion
+ {
+ public string Name { get; set; }
+ public string Description { get; set; }
+ public bool Exists { get; set; }
+
+
+ public UVersion(string name)
+ {
+ XmlNode x = config.GetKeyAsNode("/configuration/versions/version [@voteName = '" + name + "']");
+ if (x != null) {
+ Name = x.Attributes.GetNamedItem("voteName").Value;
+ Description = x.Attributes.GetNamedItem("voteDescription").Value;
+
+
+
+ Exists = true;
+ } else
+ Exists = false;
+ }
+
+ public static List GetAllVersions() {
+ XmlNode x = config.GetKeyAsNode("/configuration/versions");
+ var l = new List();
+ foreach (XmlNode cx in x.ChildNodes) {
+ if (cx.Attributes != null && cx.Attributes.GetNamedItem("vote") != null && cx.Attributes.GetNamedItem("vote").Value == "true")
+ if (cx.Attributes.GetNamedItem("voteName") != null)
+ l.Add(new UVersion(cx.Attributes.GetNamedItem("voteName").Value));
+ }
+
+ return l;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx b/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx
new file mode 100644
index 00000000..b467c101
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx
@@ -0,0 +1,152 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrderReview.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Admin.OrderReview" %>
+Deli Orders
+Select Date Range
+
+ 1 Day
+ 3 Days
+ 7 Days
+ 14 Days
+ 30 Days
+ 60 Days
+ 90 Days
+ 120 Days
+
+
+
+
+
+<%--
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --%>
+
+
+
+
+
+
+
+ Deli Id
+ Economid Id
+ Status
+ Company
+ VAT Id
+ Invoice Email
+ Country
+ Date
+ Sub Total EUR
+ Tax Total EUR
+ Total EUR
+ Currency
+ Refunded?
+ Refund Date
+
+
+
+
+
+
+
+ ">[+]
+ <%# Eval("Id")%>
+
+
+ <%# Eval("EconomicId")%>
+
+
+ <%# Eval("Status")%>
+
+
+ <%# Eval("Company")%>
+
+
+ <%# Eval("VatID")%>
+
+
+
+
+ <%# Eval("InvoiceEmail")%>
+
+
+ <%# Eval("Country")%>
+
+
+ <%# Eval("Date")%>
+
+
+ <%# Eval("SubTotal")%>
+
+
+ <%# Eval("TaxTotal")%>
+
+
+ <%# Eval("Total")%>
+
+
+ <%# Eval("Currency")%>
+
+
+ <%# Eval("Refunded")%>
+
+
+ <%# Eval("RefundDate")%>
+
+
+">
+
+ Order details
+ These are the individual products ordered
+
+
+
+
+
+ Vendor
+ Package
+ License
+ Quantity
+ Value
+
+
+
+
+
+ <%# Eval("Vendor")%>
+ <%# Eval("Package")%>
+ <%# Eval("LicenseTypeName")%>
+ <%# Eval("Quantity")%>
+ <%# Eval("Value")%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx.cs b/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx.cs
new file mode 100644
index 00000000..1e14c175
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx.cs
@@ -0,0 +1,247 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Providers.Orders;
+using Marketplace.Providers;
+using Marketplace.Interfaces;
+using Marketplace.Providers.OrderNote;
+using Marketplace.Providers.Listing;
+using System.Globalization;
+using umbraco.BasePages;
+using System.Web.UI.HtmlControls;
+using umbraco;
+using umbraco.cms.businesslogic.member;
+
+namespace Marketplace.usercontrols.Deli.Admin
+{
+ public partial class OrderReview : System.Web.UI.UserControl
+ {
+
+ #region properties
+
+ private UmbracoEcommerceOrderProvider _orderProvider;
+ public UmbracoEcommerceOrderProvider OrderProvider
+ {
+ get
+ {
+ if (_orderProvider != null)
+ return _orderProvider;
+ else
+ {
+ _orderProvider = (UmbracoEcommerceOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ return _orderProvider;
+ }
+ }
+ }
+
+ public IOrder Order;
+
+ private IDeliOrderItemProvider _itemProvider;
+ public IDeliOrderItemProvider ItemProvider
+ {
+ get
+ {
+ if (_itemProvider != null)
+ return _itemProvider;
+ else
+ {
+ _itemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ return _itemProvider;
+ }
+ }
+ }
+
+ private ILicenseProvider _licenseProvider;
+ public ILicenseProvider LicenseProvider
+ {
+ get
+ {
+ if (_licenseProvider != null)
+ return _licenseProvider;
+ else
+ {
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ return _licenseProvider;
+ }
+ }
+ }
+
+ private IMemberLicenseProvider _memberLicenseProvider;
+ public IMemberLicenseProvider MemberLicenseProvider
+ {
+ get
+ {
+ if (_memberLicenseProvider != null)
+ return _memberLicenseProvider;
+ else
+ {
+ _memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["memberLicenseProvider"];
+ return _memberLicenseProvider;
+ }
+ }
+ }
+
+ private OrderNoteProvider _orderNoteProvider;
+ public OrderNoteProvider OrderNoteProvider
+ {
+ get
+ {
+ if (_orderNoteProvider != null)
+ return _orderNoteProvider;
+ else
+ {
+ _orderNoteProvider = (OrderNoteProvider)MarketplaceProviderManager.Providers["OrderNoteProvider"];
+ return _orderNoteProvider;
+ }
+ }
+ }
+
+ private NodeListingProvider _listingProvider;
+ public NodeListingProvider ListingProvider
+ {
+ get
+ {
+ if (_listingProvider != null)
+ return _listingProvider;
+ else
+ {
+ _listingProvider = (NodeListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ return _listingProvider;
+ }
+ }
+ }
+
+ private ITaxProvider _taxProvider;
+ public ITaxProvider TaxProvider
+ {
+ get
+ {
+ if (_taxProvider != null)
+ return _taxProvider;
+ else
+ {
+ _taxProvider = (ITaxProvider)MarketplaceProviderManager.Providers["TaxProvider"];
+ return _taxProvider;
+ }
+ }
+ }
+
+ #endregion
+
+
+ private BasePage prnt;
+
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ prnt = (BasePage)this.Page;
+ HtmlHead head = (HtmlHead)base.Page.Header;
+ HtmlLink link = new HtmlLink();
+
+ link.Attributes.Add("href", GlobalSettings.Path + "/dashboard/deli/css/deliadmin.css?v2");
+ link.Attributes.Add("type", "text/css");
+ link.Attributes.Add("rel", "stylesheet");
+ head.Controls.Add(link);
+ }
+
+ protected void RowCommand(object s, CommandEventArgs e)
+ {
+ switch (e.CommandName)
+ {
+ case "ValidateVat":
+ var but = (Button)s;
+ var lit = (Literal)but.Parent.FindControl("IsValid");
+
+ if (!string.IsNullOrEmpty((string)e.CommandArgument))
+ {
+ var valid = TaxProvider.SimpleVatValidate((string)e.CommandArgument);
+ lit.Text = valid ? "VALID " :
+ "INVALID ";
+ }
+ else
+ {
+ lit.Text = "INVALID ";
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+
+
+ protected void GetOrdersButton_Click(object sender, EventArgs e)
+ {
+ OrderView.ItemDataBound += new RepeaterItemEventHandler(OrderList_ItemDataBound);
+
+ DateTime endDate = DateTime.Now.AddDays(int.Parse(DateRangeDdl.SelectedValue) * (-1));
+ var Orders = OrderProvider.GetOrdersByDate(endDate).Select(x => new
+ {
+ Id = x.Id,
+ EconomicId = x.OrderId,
+ Status = x.Status,
+ CssClass = x.Status == OrderStatus.Confirmed ? "confirmed" : "notConfirmed",
+ Company = x.CompanyName,
+ VatID = x.Member.CompanyVATNumber,
+ InvoiceEmail = x.CompanyInvoiceEmail,
+ Country = GetCountryFromCode(x.CompanyCountry),
+ Date = x.CreateDate,
+ TaxTotal = x.TaxTotal.ToString("c", new CultureInfo("fr-FR", false)),
+ SubTotal = x.SubTotal.ToString("c", new CultureInfo("fr-FR", false)),
+ Total = x.Total.ToString("c", new CultureInfo("fr-FR", false)),
+ Currency = x.Currency,
+ Refunded = x.IsRefunded,
+ RefundDate = x.RefundDate
+ }).OrderByDescending(x => x.Id);
+
+ OrderView.DataSource = Orders;
+ OrderView.DataBind();
+ }
+
+ protected void OrderList_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ RepeaterItem ri = (RepeaterItem)e.Item;
+ if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)
+ {
+ Repeater itemRepeater = ((RepeaterItem)e.Item).FindControl("orderItemRepeater") as Repeater;
+ int rowId = Int32.Parse((((RepeaterItem)e.Item).FindControl("rowId") as HiddenField).Value);
+
+ var orderItems = ItemProvider.GetOrderItems(rowId).Select(x => new
+ {
+ Quantity = x.Quantity,
+ Package = ListingProvider.GetListing(x.ListingItemId, true).Name,
+ Vendor = new Member(ListingProvider.GetListing(x.ListingItemId, true).VendorId).Text,
+ LicenseTypeName = LicenseProvider.GetLicense(x.LicenseId).LicenseType.ToString(),
+ Value = x.NetPrice.ToString("c", new CultureInfo("fr-FR", false)),
+
+ });
+
+ itemRepeater.DataSource = orderItems;
+ itemRepeater.DataBind();
+ }
+
+ }
+
+
+ private string GetCountryFromCode(string code){
+
+ string country = "";
+ foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
+ {
+
+ RegionInfo ri = new RegionInfo(ci.LCID);
+ if(ri.TwoLetterISORegionName.ToLowerInvariant() == code.ToLowerInvariant()){
+ country = ri.EnglishName;
+ break;
+ }
+ }
+ return country;
+ }
+ }
+}
+
+
diff --git a/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx.designer.cs b/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx.designer.cs
new file mode 100644
index 00000000..6bd6d074
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/OrderReview.ascx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Admin {
+
+
+ public partial class OrderReview {
+
+ ///
+ /// DateRangeDdl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList DateRangeDdl;
+
+ ///
+ /// GetOrdersButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button GetOrdersButton;
+
+ ///
+ /// OrderView control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater OrderView;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx b/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx
new file mode 100644
index 00000000..f30de6fd
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx
@@ -0,0 +1,39 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProcessRefund.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Admin.ProcessRefund" %>
+
+Process Refund
+
+Order Id:
+
+
+Order Review
+
+
+
+
+Select an Order item to Refund (also revokes the member license)
+
+
+
+
+
+Order Notes
+
+
+
+ <%# Eval("OrderNote") %> - <%# Eval("OrderNoteDate").ToString() %>
+
+
+
+
+
+
+
+
+
+ Note : This only processes the Deli refund, please also process via
+ PayPal and E-conomic Credit Note
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx.cs b/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx.cs
new file mode 100644
index 00000000..ec73c892
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx.cs
@@ -0,0 +1,196 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Providers.Orders;
+using Marketplace.Interfaces;
+using Marketplace.Providers.Listing;
+using Marketplace.Providers;
+using Marketplace.Providers.OrderNote;
+using System.Data;
+using Marketplace.Providers.OrderItem;
+
+namespace Marketplace.usercontrols.Deli.Admin
+{
+ public partial class ProcessRefund : System.Web.UI.UserControl
+ {
+
+ #region properties
+
+ private UmbracoEcommerceOrderProvider _orderProvider;
+ public UmbracoEcommerceOrderProvider OrderProvider
+ {
+ get
+ {
+ if (_orderProvider != null)
+ return _orderProvider;
+ else
+ {
+ _orderProvider = (UmbracoEcommerceOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ return _orderProvider;
+ }
+ }
+ }
+
+ public IOrder Order;
+
+ private IDeliOrderItemProvider _itemProvider;
+ public IDeliOrderItemProvider ItemProvider
+ {
+ get
+ {
+ if (_itemProvider != null)
+ return _itemProvider;
+ else
+ {
+ _itemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ return _itemProvider;
+ }
+ }
+ }
+
+ private ILicenseProvider _licenseProvider;
+ public ILicenseProvider LicenseProvider
+ {
+ get
+ {
+ if (_licenseProvider != null)
+ return _licenseProvider;
+ else
+ {
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ return _licenseProvider;
+ }
+ }
+ }
+
+ private IMemberLicenseProvider _memberLicenseProvider;
+ public IMemberLicenseProvider MemberLicenseProvider
+ {
+ get
+ {
+ if (_memberLicenseProvider != null)
+ return _memberLicenseProvider;
+ else
+ {
+ _memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["memberLicenseProvider"];
+ return _memberLicenseProvider;
+ }
+ }
+ }
+
+ private OrderNoteProvider _orderNoteProvider;
+ public OrderNoteProvider OrderNoteProvider
+ {
+ get
+ {
+ if (_orderNoteProvider != null)
+ return _orderNoteProvider;
+ else
+ {
+ _orderNoteProvider = (OrderNoteProvider)MarketplaceProviderManager.Providers["OrderNoteProvider"];
+ return _orderNoteProvider;
+ }
+ }
+ }
+
+ private NodeListingProvider _listingProvider;
+ public NodeListingProvider ListingProvider
+ {
+ get
+ {
+ if (_listingProvider != null)
+ return _listingProvider;
+ else
+ {
+ _listingProvider = (NodeListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ return _listingProvider;
+ }
+ }
+ }
+
+ #endregion
+
+ protected void GetOrderButton_Click(object sender, EventArgs e)
+ {
+ int oId = 0;
+
+ if (int.TryParse(OrderId.Text, out oId))
+ oId = int.Parse(OrderId.Text);
+
+ if (oId > 0)
+ {
+ Order = OrderProvider.GetOrder(oId);
+
+ OrderReviewDisplay.Text = Order.Member.Name + ", Paid on: " + Order.PaymentDate.ToString() + " Amount Paid: " + Order.ProcessedTotal.ToString() + " in Currency: " + Order.Currency.ToString() + ", Order Status: " + Order.Status.ToString();
+
+ DataTable dt = new DataTable();
+ dt.Columns.Add("id");
+ dt.Columns.Add("item");
+
+ foreach (IOrderItem i in Order.Items)
+ {
+ string itemText = ListingProvider.GetListing(i.ListingItemId).Name +
+ ", License Type: " + LicenseProvider.GetLicense(i.LicenseId).LicenseType.ToString() +
+ ", Quantity: " + i.Quantity.ToString() +
+ ", Net Price: " + i.NetPrice.ToString() + " EUR, each";
+
+ dt.Rows.Add(i.Id, itemText);
+ }
+
+ OrderItems.DataSource = dt;
+ OrderItems.DataTextField = "item";
+ OrderItems.DataValueField = "id";
+ OrderItems.DataBind();
+
+ // order notes
+ IEnumerable Notes = OrderNoteProvider.GetOrderNotes(oId);
+ OrderNotesRepeater.DataSource = Notes;
+ OrderNotesRepeater.DataBind();
+
+ }
+ else
+ OrderReviewDisplay.Text = "No order with the Id: " + oId.ToString();
+
+ }
+
+ protected void ProcessRefundButton_Click(object sender, EventArgs e)
+ {
+ int oId = 0;
+ if (int.TryParse(OrderId.Text, out oId))
+ oId = int.Parse(OrderId.Text);
+
+ if (oId > 0)
+ Order = OrderProvider.GetOrder(oId);
+
+ // mark order as refunded
+ Order.Status = OrderStatus.Refunded;
+ Order.IsRefunded = true;
+ Order.RefundDate = DateTime.Now.ToUniversalTime();
+ OrderProvider.SaveOrUpdate(Order);
+
+ // mark item as refunded
+ IOrderItem item = ItemProvider.GetOrderItem(int.Parse(OrderItems.SelectedValue));
+ item.IsRefunded = true;
+ item.RefundDate = DateTime.Now.ToUniversalTime();
+ ItemProvider.SaveOrUpdate(item);
+
+ // revoke member license
+ var licenses = MemberLicenseProvider.GetLicensesByOrderItemId(item.Id);
+ foreach (var license in licenses)
+ {
+ license.IsActive = false;
+ MemberLicenseProvider.SaveOrUpdate(license);
+ }
+
+ // add order note
+ OrderNoteProvider.AddOrderNote((int)Order.Id, (int)Order.Member.Id, "Refund processed for item: " + item.Id.ToString());
+
+ RefundConfirmation.Text = "Refund processed and license revoked.";
+ }
+
+
+ }
+ }
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx.designer.cs b/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx.designer.cs
new file mode 100644
index 00000000..46a50eff
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/ProcessRefund.ascx.designer.cs
@@ -0,0 +1,78 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Admin {
+
+
+ public partial class ProcessRefund {
+
+ ///
+ /// OrderId control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox OrderId;
+
+ ///
+ /// GetOrderButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button GetOrderButton;
+
+ ///
+ /// OrderReviewDisplay control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal OrderReviewDisplay;
+
+ ///
+ /// OrderItems control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButtonList OrderItems;
+
+ ///
+ /// OrderNotesRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater OrderNotesRepeater;
+
+ ///
+ /// ProcessRefundButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button ProcessRefundButton;
+
+ ///
+ /// RefundConfirmation control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal RefundConfirmation;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx b/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx
new file mode 100644
index 00000000..9f6bfe9c
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx
@@ -0,0 +1,54 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorPayout.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Admin.VendorPayout" %>
+Vendor Payout
+
+
+
+
+
+Period ending
+
+
+
+
+
+
+
+ Vendor Name
+ Economid Id
+ Vendor Ref
+ Net Payout
+ Payout Date
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%#Eval("VendorRef").ToString() %>
+
+
+
+
+
+ <%#Eval("PayoutDate").ToString()%>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx.cs b/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx.cs
new file mode 100644
index 00000000..be6cc65e
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx.cs
@@ -0,0 +1,209 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.Security;
+
+using Marketplace.Providers.Orders;
+using Marketplace.Interfaces;
+using Marketplace.Providers.Listing;
+using Marketplace.Providers;
+using Marketplace.Providers.OrderNote;
+using Marketplace.Providers.OrderItem;
+using Marketplace.Providers.Vendor;
+using Marketplace.Providers.Payout;
+using umbraco.cms.businesslogic.member;
+
+namespace Marketplace.usercontrols.Deli.Admin
+{
+ public partial class VendorPayout : System.Web.UI.UserControl
+ {
+ #region properties
+
+ public IEnumerable PayoutList;
+ public IEnumerable Payouts;
+
+
+ private UmbracoEcommerceOrderProvider _orderProvider;
+ public UmbracoEcommerceOrderProvider OrderProvider
+ {
+ get
+ {
+ if (_orderProvider != null)
+ return _orderProvider;
+ else
+ {
+ _orderProvider = (UmbracoEcommerceOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ return _orderProvider;
+ }
+ }
+ }
+
+ private IDeliOrderItemProvider _itemProvider;
+ public IDeliOrderItemProvider ItemProvider
+ {
+ get
+ {
+ if (_itemProvider != null)
+ return _itemProvider;
+ else
+ {
+ _itemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ return _itemProvider;
+ }
+ }
+ }
+
+ private ILicenseProvider _licenseProvider;
+ public ILicenseProvider LicenseProvider
+ {
+ get
+ {
+ if (_licenseProvider != null)
+ return _licenseProvider;
+ else
+ {
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ return _licenseProvider;
+ }
+ }
+ }
+
+ private IMemberLicenseProvider _memberLicenseProvider;
+ public IMemberLicenseProvider MemberLicenseProvider
+ {
+ get
+ {
+ if (_memberLicenseProvider != null)
+ return _memberLicenseProvider;
+ else
+ {
+ _memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["memberLicenseProvider"];
+ return _memberLicenseProvider;
+ }
+ }
+ }
+
+ private OrderNoteProvider _orderNoteProvider;
+ public OrderNoteProvider OrderNoteProvider
+ {
+ get
+ {
+ if (_orderNoteProvider != null)
+ return _orderNoteProvider;
+ else
+ {
+ _orderNoteProvider = (OrderNoteProvider)MarketplaceProviderManager.Providers["OrderNoteProvider"];
+ return _orderNoteProvider;
+ }
+ }
+ }
+
+ private NodeListingProvider _listingProvider;
+ public NodeListingProvider ListingProvider
+ {
+ get
+ {
+ if (_listingProvider != null)
+ return _listingProvider;
+ else
+ {
+ _listingProvider = (NodeListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ return _listingProvider;
+ }
+ }
+ }
+
+ private MemberVendorProvider _vendorProvider;
+ public MemberVendorProvider VendorProvider
+ {
+ get
+ {
+ if (_vendorProvider != null)
+ return _vendorProvider;
+ else
+ {
+ _vendorProvider = (MemberVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ return _vendorProvider;
+ }
+ }
+ }
+
+ private PayoutProvider _payoutProvider;
+ public PayoutProvider PayoutProvider
+ {
+ get
+ {
+ if (_payoutProvider != null)
+ return _payoutProvider;
+ else
+ {
+ _payoutProvider = (PayoutProvider)MarketplaceProviderManager.Providers["PayoutProvider"];
+ return _payoutProvider;
+ }
+ }
+ }
+
+ #endregion
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ PayoutReport.ItemDataBound += new RepeaterItemEventHandler(PayoutReport_ItemDataBound);
+ }
+
+ void PayoutReport_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ // The data for this item in the repeatercontrol
+ dynamic item = e.Item.DataItem as dynamic;
+
+ if (e.Item.ItemType.ToString() != "Header" && e.Item.ItemType.ToString() != "Footer")
+ {
+ Literal VendorName = (Literal)e.Item.FindControl("VendorName");
+ Literal EconomicId = (Literal)e.Item.FindControl("EconomicId");
+ Literal NetPayout = (Literal)e.Item.FindControl("NetPayout");
+ double payoutAmount = 0;
+
+ VendorName.Text = VendorProvider.GetVendorById(item.VendorId).VendorCompanyName;
+ EconomicId.Text = VendorProvider.GetVendorById(item.VendorId).EconomicId.ToString();
+ foreach (IOrderItem i in item.OrderItems)
+ {
+ payoutAmount += (i.NetPrice * .75);
+ }
+
+ NetPayout.Text = payoutAmount.ToString();
+
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void GetPayoutButton_Click(object sender, EventArgs e)
+ {
+ // get last day of previous month
+ var last = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1).AddDays(-1);
+
+ Payouts = PayoutProvider.GetPayouts(null, true);
+ PayoutReport.DataSource = Payouts;
+ PayoutReport.DataBind();
+
+ EndDate.Text = last.ToLongDateString();
+
+ // show details
+ PayoutPlaceholder.Visible = true;
+
+ }
+
+ protected void MarkAsPaidButton_Click(object sender, EventArgs e)
+ {
+ //PayoutProvider.MarkItemsPaid(int.Parse(PayoutId.Text));
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx.designer.cs b/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx.designer.cs
new file mode 100644
index 00000000..deb8e3fd
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/VendorPayout.ascx.designer.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Admin {
+
+
+ public partial class VendorPayout {
+
+ ///
+ /// GetPayoutButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button GetPayoutButton;
+
+ ///
+ /// PayoutPlaceholder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder PayoutPlaceholder;
+
+ ///
+ /// EndDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal EndDate;
+
+ ///
+ /// PayoutReport control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater PayoutReport;
+
+ ///
+ /// MarkAsPaid control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button MarkAsPaid;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx b/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx
new file mode 100644
index 00000000..4def7ac4
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx
@@ -0,0 +1,121 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorPayoutReport.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Admin.VendorPayoutReport" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+Payout Report
+The following list shows all payouts and their status
+
+
+
+
+
+
+
+Vendor Name
+Economid Id
+Vendor Ref
+Date
+Status
+Value
+
+
+
+
+
+
+
+">[+]
+<%# ((IVendor)Eval("Vendor")).Member.Name%>
+
+
+<%# ((IVendor)Eval("Vendor")).EconomicId%>
+
+
+<%# Eval("Reference")%>
+
+
+<%# Eval("PayoutDate")%>
+
+
+<%# Eval("Status")%>
+
+
+<%# Eval("PayoutAmount")%>
+
+
+">
+
+ Payout details
+ Company Name: <%# ((IVendor)Eval("Vendor")).VendorCompanyName %>
+ Billing Email: <%# ((IVendor)Eval("Vendor")).BillingContactEmail %>
+ VAT: <%# ((IVendor)Eval("Vendor")).VATNumber%>
+ Tax ID: <%# ((IVendor)Eval("Vendor")).TaxId%>
+ Paypal: <%# ((IVendor)Eval("Vendor")).PayPalAccount%>
+ IBAN: <%# ((IVendor)Eval("Vendor")).IBAN%>
+ SWIFT: <%# ((IVendor)Eval("Vendor")).SWIFT%>
+ BSB: <%# ((IVendor)Eval("Vendor")).BSB%>
+ Account Number: <%# ((IVendor)Eval("Vendor")).AccountNumber %>
+
+
+
+
+
+
+ Package
+ License
+ Purchaser
+ Country
+ VAT #
+ Order Date
+ Payout Value*
+
+
+
+
+
+ <%# Eval("Package")%>
+ <%# Eval("LicenseTypeName")%>
+ "><%# ((IMember)Eval("Member")).Name%>
+ <%# ((IMember)Eval("Member")).CompanyCountry%>
+ <%# ((IMember)Eval("Member")).CompanyVATNumber%>
+ <%# Eval("OrderDate")%>
+ <%# Eval("PayoutAmount")%>
+
+
+
+
+
+
+
+
+
Process this Payment Request
+
Once you have processed this payment request please click the following button.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx.cs b/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx.cs
new file mode 100644
index 00000000..182d3a7d
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx.cs
@@ -0,0 +1,143 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using System.Configuration;
+using umbraco;
+using System.Web.UI.HtmlControls;
+using umbraco.BasePages;
+
+namespace Marketplace.usercontrols.Deli.Admin
+{
+ public partial class VendorPayoutReport : System.Web.UI.UserControl
+ {
+
+ private IDeliOrderItemProvider _orderItemProvider;
+ private IOrderProvider _orderProvider;
+ private IMemberProvider _memberProvider;
+ private IVendorProvider _vendorProvider;
+ private IListingProvider _listingProvider;
+ private ILicenseProvider _licenseProvider;
+ private IPayoutProvider _payoutProvider;
+ private BasePage prnt;
+
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ prnt = (BasePage)this.Page;
+ HtmlHead head = (HtmlHead)base.Page.Header;
+ HtmlLink link = new HtmlLink();
+
+ link.Attributes.Add("href", GlobalSettings.Path + "/dashboard/deli/css/deliadmin.css?v2");
+ link.Attributes.Add("type", "text/css");
+ link.Attributes.Add("rel", "stylesheet");
+ head.Controls.Add(link);
+ }
+
+
+ protected void LoadReport(object sender, EventArgs e)
+ {
+ BindListing(true);
+ }
+
+ protected void LoadProcessedReport(object sender, EventArgs e)
+ {
+ BindListing(false);
+ }
+
+ private void BindListing(bool pending)
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _orderProvider = (IOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ _payoutProvider = (IPayoutProvider)MarketplaceProviderManager.Providers["PayoutProvider"];
+
+
+ PayoutHistoryList.ItemDataBound += new RepeaterItemEventHandler(PayoutHistoryList_ItemDataBound);
+
+ var payouts = _payoutProvider.GetPayouts(null, true, pending).OrderByDescending(x => x.PayoutDate).Select(x => new
+ {
+ Id = x.Id,
+ Vendor = _vendorProvider.GetVendorById(x.VendorId),
+ PayoutDate = String.Format("{0:D}",x.PayoutDate),
+ Reference = x.VendorRef,
+ PayoutAmount = GetPayoutValue(x.OrderItems),
+ Status = (x.Processed)?"Processed":"Pending"
+ });
+
+ PayoutHistoryList.DataSource = payouts;
+ PayoutHistoryList.DataBind();
+ }
+
+ protected void PayoutHistoryList_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ RepeaterItem ri = (RepeaterItem)e.Item;
+ if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)
+ {
+ Repeater itemRepeater = ((RepeaterItem)e.Item).FindControl("payoutItemRepeater") as Repeater;
+ int rowId = Int32.Parse((((RepeaterItem)e.Item).FindControl("rowId") as HiddenField).Value);
+
+ var payout = _payoutProvider.GetPayout(rowId);
+
+ // bind the table to any order that has not been paid out and does not have a payout id
+ var items = payout.OrderItems
+ .Select(x => new
+ {
+ Id = x.Id,
+ Package = _listingProvider.GetListing(x.ListingItemId, true).Name,
+ LicenseTypeName = _licenseProvider.GetLicense(x.LicenseId).LicenseType.ToString(),
+ Member = _orderProvider.GetOrder(x.OrderId).Member,
+ PayoutAmount = x.PayoutAmount,
+ OrderDate = string.Format("{0:D}", x.CreateDate)
+ });
+
+ itemRepeater.DataSource = items;
+ itemRepeater.DataBind();
+ }
+
+ }
+
+ protected void processPayoutRow(Object sender, RepeaterCommandEventArgs e)
+ {
+
+ switch (e.CommandName)
+ {
+ case "Payout":
+ var payoutId = Int32.Parse(e.CommandArgument.ToString());
+
+ _payoutProvider = (IPayoutProvider)MarketplaceProviderManager.Providers["PayoutProvider"];
+ _payoutProvider.MarkItemsPaid(payoutId);
+
+ break;
+ default:
+ break;
+ }
+
+ BindListing(true);
+
+ }
+
+
+ private double GetPayoutValue(IEnumerable items)
+ {
+ double val = 0.00;
+ foreach (var i in items)
+ {
+ val += i.PayoutAmount;
+ }
+
+ return val;
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx.designer.cs b/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx.designer.cs
new file mode 100644
index 00000000..25053946
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Admin/VendorPayoutReport.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Admin {
+
+
+ public partial class VendorPayoutReport {
+
+ ///
+ /// PayoutHistoryList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater PayoutHistoryList;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Cart/Cart.ascx b/Marketplace/usercontrols/Deli/Cart/Cart.ascx
new file mode 100644
index 00000000..af5d74ea
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/Cart.ascx
@@ -0,0 +1,72 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Cart.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Cart.Cart" %>
+
+
+
+
+
+
+
+ Product
+ License Type
+ Price
+ Quantity
+
+ Sub-Total
+
+
+
+
+
+
+
+ <%#Eval("Name") %>
+ <%#Eval("License") %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Total:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Your cart is currently empty
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/Cart.ascx.cs b/Marketplace/usercontrols/Deli/Cart/Cart.ascx.cs
new file mode 100644
index 00000000..c4169154
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/Cart.ascx.cs
@@ -0,0 +1,186 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Accounting;
+using Marketplace.Helpers;
+
+namespace Marketplace.usercontrols.Deli.Cart
+{
+ public partial class Cart : System.Web.UI.UserControl
+ {
+
+ #region properties
+ private ICartProvider _cartProvider;
+ public ICartProvider CartProvider
+ {
+ get
+ {
+ if (_cartProvider != null)
+ {
+ return _cartProvider;
+ }
+ else
+ {
+ _cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ return _cartProvider;
+ }
+ }
+ }
+
+
+ private ICart _cart;
+ public ICart ShoppingCart
+ {
+ get
+ {
+ if (_cart != null)
+ {
+ return _cart;
+ }
+ else
+ {
+ _cart = CartProvider.GetCurrentCart();
+ return _cart;
+ }
+ }
+ set
+ {
+ _cart = value;
+ }
+ }
+
+ private Currency _currency = Currency.EUR;
+ #endregion
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ CartItems.ItemDataBound += new RepeaterItemEventHandler(CartItems_ItemDataBound);
+ CartItems.ItemCommand +=new RepeaterCommandEventHandler(CartItems_ItemCommand);
+ }
+
+ protected void Page_PreRender(object sender, EventArgs e)
+ {
+
+ if (ShoppingCart != null && ShoppingCart.CartItems.Count > 0)
+ {
+ LoadCart();
+
+ }
+ else
+ {
+ CartHolder.Visible = false;
+ CartEmptyHolder.Visible = true;
+ }
+
+ }
+
+ private void LoadCart()
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ // use cart currency
+ _currency = ShoppingCart.Currency;
+
+ //to enusre the cart rounds and adds properly we convert to localised price when its doing the subtotal step.
+ var cartItems = CartProvider.GetCartItems().Select(x => new {
+ Id = x.LicenseId,
+ Name = x.ListingItem.Name,
+ License = licenseProvider.GetLicense(x.LicenseId).LicenseType.LicenseTypeAsString(),
+ Price = _cartProvider.GetLocalizedPrice(x.NetPrice),
+ Quantity = x.Quantity,
+ SubTotal = x.Quantity * _cartProvider.GetLocalizedPrice(x.NetPrice)
+
+ });
+
+ CartItems.DataSource = cartItems;
+ CartItems.DataBind();
+
+
+ CartTotal.Text = DeliCurrency.NiceMoney((decimal)_cartProvider.GetLocalizedCartGrossValue(), DeliCurrency.FromSymbol(_currency.ToString()));
+
+ }
+
+ protected void QuantityOnChange(object sender, EventArgs e)
+ {
+ string licenseId = ((HiddenField)((TextBox)sender).Parent.FindControl("LicenseId")).Value;
+ TextBox qtyBox = (TextBox)sender;
+ int qty = 0;
+ if (!string.IsNullOrEmpty(qtyBox.Text))
+ {
+ qty = int.Parse(qtyBox.Text);
+ }
+
+ var ci = CartProvider.GetCartItems().Where(x => x.LicenseId == Int32.Parse(licenseId)).FirstOrDefault();
+ if (ci != null)
+ {
+ CartProvider.ChangeItemQuantity(ci, qty);
+ }
+
+
+ }
+
+ void CartItems_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ // The data for this item in the repeatercontrol
+ dynamic item = e.Item.DataItem as dynamic;
+
+ if (e.Item.ItemType.ToString() != "Header" && e.Item.ItemType.ToString() != "Footer")
+ {
+ Button btnDel = (Button)e.Item.FindControl("Del");
+
+ // Assign ids of items to the buttons
+ btnDel.CommandName = "delItem";
+ btnDel.CommandArgument = item.Id.ToString();
+
+ // set the price and subtotal amounts
+ Literal price = (Literal)e.Item.FindControl("price");
+ Literal subtotal = (Literal)e.Item.FindControl("subtotal");
+
+ price.Text = DeliCurrency.NiceMoney((decimal)item.Price, DeliCurrency.FromSymbol(_currency.ToString()));
+
+ //no need to localize the price for the subtotal as this is done during the datasource creation
+ subtotal.Text = DeliCurrency.NiceMoney((decimal)item.SubTotal,DeliCurrency.FromSymbol(_currency.ToString()));
+
+ }
+ }
+
+ void CartItems_ItemCommand(object source, RepeaterCommandEventArgs e)
+ {
+ string licenseId = e.CommandArgument.ToString();
+
+ switch (e.CommandName)
+ {
+ case "delItem":
+ {
+ var ci = CartProvider.GetCartItems().Where(x => x.LicenseId == Int32.Parse((string)e.CommandArgument)).FirstOrDefault();
+ if (ci != null)
+ {
+ CartProvider.RemoveItem(ci);
+ }
+ break;
+ }
+ }
+ }
+
+ protected void CartNavNext_Click(object s, EventArgs e)
+ {
+ Response.Redirect("cart-details");
+ }
+
+ protected void CartNavPrevious_Click(object s, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(Request["returnUrl"]))
+ Response.Redirect(Request["returnUrl"]);
+ else
+ Response.Redirect("/projects");
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/Cart.ascx.designer.cs b/Marketplace/usercontrols/Deli/Cart/Cart.ascx.designer.cs
new file mode 100644
index 00000000..00d87193
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/Cart.ascx.designer.cs
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Cart {
+
+
+ public partial class Cart {
+
+ ///
+ /// CartHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CartHolder;
+
+ ///
+ /// CartItems control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater CartItems;
+
+ ///
+ /// CartTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal CartTotal;
+
+ ///
+ /// CartNavPrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton CartNavPrevious;
+
+ ///
+ /// CartNavNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button CartNavNext;
+
+ ///
+ /// CartEmptyHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CartEmptyHolder;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx b/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx
new file mode 100644
index 00000000..63de7454
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx
@@ -0,0 +1,136 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CartDetails.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Cart.CartDetails" %>
+<%@ Register Assembly="Marketplace" TagPrefix="Deli" Namespace="Marketplace.Controls" %>
+<%@ Register Src="~/usercontrols/our.umbraco.org/Login_novalidationscript.ascx" TagName="Login" TagPrefix="our" %>
+
+
+
+
+
Continue without logging in
+
You can complete your purchase now, we'll create an account for you and email you a temporary password when you're done.
+
Or if you are an existing member login here
+
Your profile probably already has most of the information we need to process your purchase. Login to retrieve your details.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx.cs b/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx.cs
new file mode 100644
index 00000000..8e28bc28
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx.cs
@@ -0,0 +1,300 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using umbraco.cms.businesslogic.member;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Orders;
+using Marketplace.Providers.Members;
+using Marketplace.Providers.OrderItem;
+using System.Web.Security;
+using NotificationsCore;
+using NotificationsWeb;
+using umbraco.NodeFactory;
+
+namespace Marketplace.usercontrols.Deli.Cart
+{
+ public partial class CartDetails : System.Web.UI.UserControl
+ {
+ private ICartProvider _cartProvider;
+ public ICartProvider CartProvider
+ {
+ get
+ {
+ if (_cartProvider != null)
+ {
+ return _cartProvider;
+ }
+ else
+ {
+ _cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ return _cartProvider;
+ }
+ }
+ }
+
+ private ICart _cart;
+ public ICart ShoppingCart
+ {
+ get
+ {
+ if (_cart != null)
+ {
+ return _cart;
+ }
+ else
+ {
+ _cart = CartProvider.GetCurrentCart();
+ return _cart;
+ }
+ }
+ set
+ {
+ _cart = value;
+ }
+ }
+
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+ private IMember _member;
+ public IMember Member
+ {
+ get
+ {
+ if (_member != null)
+ return _member;
+ else
+ {
+ _member = MemberProvider.GetCurrentMember();
+ return _member;
+ }
+ }
+ }
+
+ public int RetrievePassword { get; set; }
+ public int SignUp { get; set; }
+
+ protected string RetrievePasswordPage { get; set; }
+ protected string SignUpPage { get; set; }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if(ShoppingCart.CartItems.Count > 0)
+ {
+ if (!IsPostBack && Member != null)
+ {
+ //check to see if member was created during cart process and move them to review step automatically
+ if (!string.IsNullOrEmpty(Request["ss"]))
+ {
+
+ //now that the user is authenticated set their cart currency based on their details
+ SetCurrency();
+
+ CartProvider.InvalidateVat();
+ // send to order review
+ Response.Redirect("cart-review");
+ }
+
+ //otherwise show the form
+ SetupDetails();
+ }
+ }
+ else
+ {
+ Response.Redirect("cart");
+ }
+
+ //check if the user is authenticated, otherwise present login option or continue as 'guest'
+ // can we just use... if(Member == null) for this
+ if (!HttpContext.Current.User.Identity.IsAuthenticated)
+ {
+ RetrievePasswordPage = umbraco.library.NiceUrl(RetrievePassword);
+ SignUpPage = umbraco.library.NiceUrl(SignUp);
+ MemberLogin.NextPage = Node.GetCurrent().Id;
+ NotLoggedIn.Visible = true;
+ }
+
+ }
+
+
+
+ protected void SetupDetails()
+ {
+ UserName.Text = Member.Name;
+ UserEmail.Text = Member.Email;
+ CompanyVat.Text = Member.CompanyVATNumber;
+ CompanyName.Text = Member.Company;
+ CompanyCountry.SelectedValue = Member.CompanyCountry;
+ CompanyAddress.Text = Member.CompanyAddress;
+ CompanyInvoiceEmail.Text = Member.CompanyInvoiceEmail;
+ }
+
+ protected void CreateMember()
+ {
+ string Group = "standard";
+
+ if (UserEmail.Text != null)
+ {
+ IMember m = MemberProvider.GetMemberByEmail(UserEmail.Text);
+ if (m == null)
+ {
+
+ m = new DeliMember();
+
+ m.Name = UserName.Text;
+ m.Email = UserEmail.Text;
+ // set using generate password
+ m.Password = Membership.GeneratePassword(8, 0);
+
+
+ //billing info
+ m.CompanyAddress = CompanyAddress.Text;
+ m.CompanyCountry = CompanyCountry.SelectedValue;
+
+ if (CompanyInvoiceEmail.Text.Length != 0)
+ m.CompanyInvoiceEmail = CompanyInvoiceEmail.Text;
+ else
+ m.CompanyInvoiceEmail = UserEmail.Text;
+
+ m.CompanyVATNumber = CompanyVat.Text;
+
+ //Standard values
+ m.ReputationTotal = 20;
+ m.ReputationCurrent = 20;
+ m.ForumPosts = 0;
+
+ m.IsVerified = true;
+ m.TermsOfServiceAcceptanceDate = DateTime.Now.ToUniversalTime();
+ m.CreatedByDeli = true;
+
+ //add the group
+ m.Groups = new string[] { Group };
+
+ MemberProvider.SaveOrUpdate(m);
+
+ // send welcome mail - have to do it here so we have access to the password
+ InstantNotification not = new InstantNotification();
+ not.Invoke(Config.ConfigurationFile, Config.AssemblyDir, "DeliNewMember", m, m.Password);
+
+ // redirect to force Auth cookie to establish
+ Response.Redirect(Request.RawUrl + "?ss=" + Guid.NewGuid().ToString());
+
+ }
+ }
+ }
+
+ private void SetCurrency()
+ {
+ if (Member.CompanyCountry.ToLower() != null)
+ {
+
+ switch (Member.CompanyCountry)
+ {
+ case "dk":
+ CartProvider.SetCurrency(Currency.DKK);
+ break;
+
+ case "us":
+ case "ca":
+ CartProvider.SetCurrency(Currency.USD);
+ break;
+
+ default:
+ CartProvider.SetCurrency(Currency.EUR);
+ break;
+ }
+ }
+ }
+
+ protected void CartNavNext_Click(object s, EventArgs e)
+ {
+ try
+ {
+ // create new member if not logged in
+ if (Member == null)
+ {
+ CreateMember();
+ }
+ // persist details to member
+ Member.Company = CompanyName.Text;
+ Member.CompanyVATNumber = CompanyVat.Text;
+ Member.CompanyCountry = CompanyCountry.SelectedValue;
+ Member.CompanyAddress = CompanyAddress.Text;
+
+ if (CompanyInvoiceEmail.Text.Length != 0)
+ Member.CompanyInvoiceEmail = CompanyInvoiceEmail.Text;
+ else
+ Member.CompanyInvoiceEmail = UserEmail.Text;
+
+ /*
+ * if the member changes the billing country during the order we need to update their profile billing details and change
+ * currency where applicable
+ */
+ SetCurrency();
+
+ MemberProvider.SaveOrUpdate(Member);
+
+ //invalidate the Vat Number to force recheck;
+ CartProvider.InvalidateVat();
+
+ // send to order review
+ Response.Redirect("cart-review");
+
+ }
+ catch (Exception ex)
+ {
+ // put up error and apologize
+ DeliMessage.Text = "Oops! Sorry, little help here: " + ex.Message + " " + ex.InnerException + " " + ex.StackTrace + " ";
+ }
+ }
+
+ protected void CartNavPrevious_Click(object s, EventArgs e)
+ {
+ try
+ {
+ // persist details to member
+ Member.Company = CompanyName.Text;
+ Member.CompanyVATNumber = CompanyVat.Text;
+
+ //invalidate the Vat Number to force recheck;
+ CartProvider.InvalidateVat();
+
+ Member.CompanyCountry = CompanyCountry.SelectedValue;
+ Member.CompanyAddress = CompanyAddress.Text;
+
+ if (CompanyInvoiceEmail.Text.Length != 0)
+ Member.CompanyInvoiceEmail = CompanyInvoiceEmail.Text;
+ else
+ Member.CompanyInvoiceEmail = UserEmail.Text;
+
+ MemberProvider.SaveOrUpdate(Member);
+
+ // send to order review
+ Response.Redirect("cart");
+
+ }
+ catch (Exception ex)
+ {
+ // put up error and apologize
+ DeliMessage.Text = "Oops! Sorry, little help here: " + ex.Message + " " + ex.InnerException + " " + ex.StackTrace + " ";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx.designer.cs b/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx.designer.cs
new file mode 100644
index 00000000..5b534ca0
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartDetails.ascx.designer.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Cart {
+
+
+ public partial class CartDetails {
+
+ ///
+ /// NotLoggedIn control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder NotLoggedIn;
+
+ ///
+ /// MemberLogin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.usercontrols.ourUmbraco.Login_novalidationscript MemberLogin;
+
+ ///
+ /// DetailsForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder DetailsForm;
+
+ ///
+ /// UserName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox UserName;
+
+ ///
+ /// UserEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox UserEmail;
+
+ ///
+ /// UserConfirmEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox UserConfirmEmail;
+
+ ///
+ /// CompanyName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox CompanyName;
+
+ ///
+ /// CompanyAddress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox CompanyAddress;
+
+ ///
+ /// CompanyCountry control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.Controls.CountryDropDownList CompanyCountry;
+
+ ///
+ /// CompanyPhone control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox CompanyPhone;
+
+ ///
+ /// CompanyVat control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox CompanyVat;
+
+ ///
+ /// CompanyInvoiceEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox CompanyInvoiceEmail;
+
+ ///
+ /// CartNavPrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton CartNavPrevious;
+
+ ///
+ /// CartNavNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button CartNavNext;
+
+ ///
+ /// DeliMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal DeliMessage;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx b/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx
new file mode 100644
index 00000000..dbf7b5f7
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx
@@ -0,0 +1,10 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CartProgress.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Cart.CartProgress" %>
+
+
+
+
+ "><%# Eval("StepName") %>
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx.cs b/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx.cs
new file mode 100644
index 00000000..75c23462
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Marketplace.usercontrols.Deli.Cart
+{
+ public partial class CartProgress : System.Web.UI.UserControl
+ {
+ public int CurrentStepIndex { get; set; }
+
+ private string[] stepArray;
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ stepArray = new string[] { "Your Cart", "Your Details", "Review Your Order", "Checkout", "Order Complete" };
+ var steps = stepArray.Select(x => new
+ {
+ StepName = x,
+ StepClass = GetStepClass(x)
+ });
+
+ ProgressIndicator.DataSource = steps;
+ ProgressIndicator.DataBind();
+ }
+
+ private object GetStepClass(string x)
+ {
+ var index = stepArray.ToList().IndexOf(x);
+ var cssClass = "";
+ if (index == 0)
+ {
+ cssClass += "first ";
+ }
+ if (index < CurrentStepIndex)
+ {
+ cssClass += "complete";
+ }
+ if (index == CurrentStepIndex)
+ {
+ cssClass += "current";
+ }
+ return cssClass;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx.designer.cs b/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx.designer.cs
new file mode 100644
index 00000000..81aecf80
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartProgress.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Cart {
+
+
+ public partial class CartProgress {
+
+ ///
+ /// ProgressIndicator control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ProgressIndicator;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Cart/CartReview.ascx b/Marketplace/usercontrols/Deli/Cart/CartReview.ascx
new file mode 100644
index 00000000..209d9339
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartReview.ascx
@@ -0,0 +1,86 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CartReview.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Cart.CartReview" %>
+
+
+
+
+
+
+
+ Product
+ License Type
+ Price
+ Quantity
+ SubTotal
+
+
+
+
+
+
+
+ <%#Eval("Name") %>
+ <%#Eval("License") %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tax:
+
+
+
+
+
+
+Total:
+
+
+
+
+
+
+
VAT Code not specified or is invalid or cannot be validated at this time
+
From what you have told us you live in a country that is subject to European VAT, but from what we can tell you either have not specifed a VAT code or the one you have given us is invalid.
+
If you dont have a VAT code or you can't put your hands on it right now, dont worry you can still continue with your purchase but we had to add VAT to your order.
+
If you would like to go back and give us a VAT code .
+
+
+
+
+
+Your Information
+
+
+
+ Company:
+
+
+ VAT Details:
+
+
+ Invoice Email:
+
+
+
+
+
+
+
+
+
+
Your cart is currently empty
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/CartReview.ascx.cs b/Marketplace/usercontrols/Deli/Cart/CartReview.ascx.cs
new file mode 100644
index 00000000..01f5da68
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartReview.ascx.cs
@@ -0,0 +1,241 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Helpers;
+using Marketplace.Providers.Orders;
+using Marketplace.Providers.Accounting;
+using Marketplace.Controls;
+using System.Globalization;
+
+namespace Marketplace.usercontrols.Deli.Cart
+{
+ public partial class CartReview : System.Web.UI.UserControl
+ {
+ private ICartProvider _cartProvider;
+ public ICartProvider CartProvider
+ {
+ get
+ {
+ if (_cartProvider != null)
+ {
+ return _cartProvider;
+ }
+ else
+ {
+ _cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ return _cartProvider;
+ }
+ }
+ }
+
+ private ICart _cart;
+ public ICart ShoppingCart
+ {
+ get
+ {
+ if (_cart != null)
+ {
+ return _cart;
+ }
+ else
+ {
+ _cart = CartProvider.GetCurrentCart();
+ return _cart;
+ }
+ }
+ set
+ {
+ _cart = value;
+ }
+ }
+
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+ private IMember _member;
+ public IMember Member
+ {
+ get
+ {
+ if (_member != null)
+ return _member;
+ else
+ {
+ _member = MemberProvider.GetCurrentMember();
+ return _member;
+ }
+ }
+ }
+
+ public Currency _currency = Currency.EUR;
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ CartItems.ItemDataBound += new RepeaterItemEventHandler(CartItems_ItemDataBound);
+ }
+
+ void CartItems_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ // The data for this item in the repeatercontrol
+ dynamic item = e.Item.DataItem as dynamic;
+
+ if (e.Item.ItemType.ToString() != "Header" && e.Item.ItemType.ToString() != "Footer")
+ {
+ // set the price and subtotal amounts
+ Literal price = (Literal)e.Item.FindControl("price");
+ Literal subtotal = (Literal)e.Item.FindControl("subtotal");
+
+ price.Text = DeliCurrency.NiceMoney((decimal)item.Price, DeliCurrency.FromSymbol(_currency.ToString()));
+ subtotal.Text = DeliCurrency.NiceMoney((decimal)item.SubTotal, DeliCurrency.FromSymbol(_currency.ToString()));
+
+ }
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ base.OnPreRender(e);
+ if (ShoppingCart != null && ShoppingCart.CartItems.Count > 0)
+ {
+ LoadOrderInfo();
+ LoadCart();
+
+ }
+ else
+ {
+ Response.Redirect("cart");
+ }
+ }
+
+ private void LoadOrderInfo()
+ {
+ if (Member != null)
+ {
+ var countryName = GetCountry(Member.CompanyCountry);
+ OrderMembername.Text = Member.Name;
+ OrderCompany.Text = Member.Company + " " + Member.CompanyAddress + " " + countryName;
+ OrderInvoiceEmail.Text = Member.CompanyInvoiceEmail;
+ OrderVATCode.Text = String.IsNullOrEmpty(Member.CompanyVATNumber) ? "NONE SPECIFIED" : Member.CompanyVATNumber;
+ }
+ else
+ {
+ Response.Redirect("cart");
+ }
+ }
+
+ private string GetCountry(string code)
+ {
+
+
+ foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
+ {
+
+ RegionInfo ri = new RegionInfo(ci.LCID);
+ if (ri.TwoLetterISORegionName.ToLowerInvariant() == code)
+ return ri.EnglishName;
+ }
+
+ return "";
+
+ }
+
+ private void LoadCart()
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ _currency = ShoppingCart.Currency;
+
+ var cartItems = CartProvider.GetCartItems().Select(x => new
+ {
+ Id = x.LicenseId,
+ Name = x.ListingItem.Name,
+ License = licenseProvider.GetLicense(x.LicenseId).LicenseType.LicenseTypeAsString(),
+ Price = GetLocalisedPrice(x.NetPrice),
+ Quantity = x.Quantity,
+ SubTotal = x.Quantity * GetLocalisedPrice(x.NetPrice)
+
+ });
+
+ CartItems.DataSource = cartItems;
+ CartItems.DataBind();
+
+ // tax check and calcs
+ double cartValue = 0;
+ double taxValue = 0;
+
+ var vatValid = CartProvider.IsVatValid();
+ var vatCountry = CartProvider.IsVatCountry();
+
+
+ taxValue = CartProvider.GetLocalizedTaxTotal();
+
+ cartValue = CartProvider.GetLocalizedCartNetValue();
+
+
+
+ CartTotal.Text = DeliCurrency.NiceMoney((decimal)cartValue, DeliCurrency.FromSymbol(_currency.ToString()));
+
+
+ // check to see if there is a tax value and if its a valid vat country
+ // it will always enter this if it is denmark.
+ if (taxValue > 0 && vatCountry)
+ {
+ //it will validate the vat for denmark also to display it.
+ if (!vatValid && Member.CompanyCountry.ToLower() != "dk")
+ {
+ VatBadMessage.Visible = true;
+ OrderVATCode.Text += " (NOT VALID)";
+ }
+
+ TaxRow.Visible = true;
+ TaxTotal.Text = DeliCurrency.NiceMoney((decimal)taxValue, DeliCurrency.FromSymbol(_currency.ToString()));
+ }
+ else
+ {
+ if (!vatCountry)
+ {
+ VATDetails.Visible = false;
+ }
+
+ TaxRow.Visible = false;
+ }
+
+ }
+
+ private double GetLocalisedPrice(double p)
+ {
+ // do converison if not EUR
+ if (_currency != Currency.EUR)
+ return (double)DeliCurrency.ConvertFromEuro((decimal)p, DeliCurrency.FromSymbol(_currency.ToString()));
+ else
+ return p;
+ }
+
+ protected void CartNavNext_Click(object s, EventArgs e)
+ {
+ Response.Redirect("cart-payment");
+ }
+ protected void CartNavPrevious_Click(object s, EventArgs e)
+ {
+ Response.Redirect("cart");
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/CartReview.ascx.designer.cs b/Marketplace/usercontrols/Deli/Cart/CartReview.ascx.designer.cs
new file mode 100644
index 00000000..4de51258
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/CartReview.ascx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Cart {
+
+
+ public partial class CartReview {
+
+ ///
+ /// CartHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CartHolder;
+
+ ///
+ /// CartItems control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater CartItems;
+
+ ///
+ /// TaxRow control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder TaxRow;
+
+ ///
+ /// TaxTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal TaxTotal;
+
+ ///
+ /// CartTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal CartTotal;
+
+ ///
+ /// VatBadMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder VatBadMessage;
+
+ ///
+ /// OrderMembername control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal OrderMembername;
+
+ ///
+ /// OrderCompany control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal OrderCompany;
+
+ ///
+ /// VATDetails control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder VATDetails;
+
+ ///
+ /// OrderVATCode control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal OrderVATCode;
+
+ ///
+ /// OrderInvoiceEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal OrderInvoiceEmail;
+
+ ///
+ /// CartNavPrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton CartNavPrevious;
+
+ ///
+ /// CartNavNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button CartNavNext;
+
+ ///
+ /// CartEmptyHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CartEmptyHolder;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx b/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx
new file mode 100644
index 00000000..74a0f2cc
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx
@@ -0,0 +1,4 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MicroCart.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Cart.MicroCart" %>
+
+View Cart ( )
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx.cs b/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx.cs
new file mode 100644
index 00000000..f966dc67
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Accounting;
+
+namespace Marketplace.usercontrols.Deli.Cart
+{
+ public partial class MicroCart : System.Web.UI.UserControl
+ {
+ private int _numberOfItems = 0;
+ private double _cartTotal = 0;
+ private ICart cart;
+ private Currency _currency = Currency.EUR;
+
+
+
+ protected void Page_PreRender(object sender, EventArgs e)
+ {
+
+ var cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ cart = cartProvider.GetCurrentCart();
+
+ _currency = cart.Currency;
+
+ _numberOfItems = cartProvider.GetCartItemCount();
+
+
+ this.Visible = true;
+ _cartTotal = cartProvider.GetLocalizedCartGrossValue();
+
+
+ NumItems.Text = (_numberOfItems == 1) ? _numberOfItems + " Item" : _numberOfItems + " Items";
+ CartTotal.Text = DeliCurrency.NiceMoney((decimal)_cartTotal, DeliCurrency.FromSymbol(_currency.ToString()));
+
+ if (_numberOfItems > 0)
+ {
+ microCartHolder.Visible = true;
+ }
+ else
+ {
+ microCartHolder.Visible = false;
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx.designer.cs b/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx.designer.cs
new file mode 100644
index 00000000..96ac8554
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Cart/MicroCart.ascx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Cart {
+
+
+ public partial class MicroCart {
+
+ ///
+ /// microCartHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder microCartHolder;
+
+ ///
+ /// NumItems control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal NumItems;
+
+ ///
+ /// CartTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal CartTotal;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx b/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx
new file mode 100644
index 00000000..5fd1d0a1
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx
@@ -0,0 +1,39 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorCustomers.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Customers.VendorCustomers" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+Your Customers
+The following is a list of customers who purchased your products.
+
+
+
+
+
+
+
+
+ Package
+ License
+ Purchaser
+ Email
+ Country
+ Order Date
+
+
+
+
+
+
+ <%# (Container.ItemIndex + 1) %>
+ <%# Eval("Package") %>
+ <%# Eval("LicenseTypeName") %>
+ <%# ((IMember)Eval("Member")).Name %>
+ <%# ((IMember)Eval("Member")).Email %>
+ <%# ((IMember)Eval("Member")).CompanyCountry %>
+ <%# Eval("OrderDate") %>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx.cs b/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx.cs
new file mode 100644
index 00000000..44c2b1e0
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using NotificationsCore;
+using System.Data;
+
+namespace Marketplace.usercontrols.Deli.Customers
+{
+ public partial class VendorCustomers : System.Web.UI.UserControl
+ {
+
+
+ private IDeliOrderItemProvider _orderItemProvider;
+ private IOrderProvider _orderProvider;
+ private IMemberProvider _memberProvider;
+ private IVendorProvider _vendorProvider;
+ private IListingProvider _listingProvider;
+ private ILicenseProvider _licenseProvider;
+ private IVendor vendor;
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _orderProvider = (IOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ IMember mem = _memberProvider.GetCurrentMember();
+ vendor = _vendorProvider.GetVendorByGuid(mem.UniqueId);
+
+ if (!IsPostBack)
+ {
+ BindOrderItems();
+ }
+ }
+
+ protected void BindOrderItems()
+ {
+
+
+ // bind the table to any order that has not been paid out and does not have a payout id
+ var items = _orderItemProvider.GetOrderItemsByVendor(vendor.Member.Id)
+ .Select(x => new
+ {
+ Id = x.Id,
+ Package = _listingProvider.GetListing(x.ListingItemId,true).Name,
+ LicenseTypeName = _licenseProvider.GetLicense(x.LicenseId).LicenseType.ToString(),
+ Member = _orderProvider.GetOrder(x.OrderId).Member,
+ OrderDate = string.Format("{0:D}",x.CreateDate)
+ });
+
+ CustomerList.DataSource = items;
+ CustomerList.DataBind();
+
+ }
+
+
+ protected void ExportToCSV(object s, EventArgs e)
+ {
+
+ HttpResponse response = HttpContext.Current.Response;
+
+ response.Clear();
+ response.ClearHeaders();
+ response.Buffer = true;
+ response.ContentType = "application/vnd.ms-excel";
+ response.AddHeader("Content-Disposition", "inline;filename=customers.csv");
+ response.Charset = "";
+ EnableViewState = false;
+
+ // Create the CSV file to which grid data will be exported.
+ // First we will write the headers.
+
+
+ DataTable dt = new DataTable("Subscriptions");
+
+
+ dt.Columns.Add("Package", Type.GetType("System.String"));
+ dt.Columns.Add("LicenseTypeName", Type.GetType("System.String"));
+ dt.Columns.Add("Member", Type.GetType("System.String"));
+ dt.Columns.Add("Email", Type.GetType("System.String"));
+ dt.Columns.Add("Country", Type.GetType("System.String"));
+ dt.Columns.Add("OrderDate", Type.GetType("System.String"));
+
+
+ // bind the table to any order that has not been paid out and does not have a payout id
+ var items = _orderItemProvider.GetOrderItemsByVendor(vendor.Member.Id);
+
+ foreach (var x in items)
+ {
+ var member = _orderProvider.GetOrder(x.OrderId).Member;
+
+ DataRow dr = dt.NewRow();
+
+ dr["Package"] = _listingProvider.GetListing(x.ListingItemId, true).Name;
+ dr["LicenseTypeName"] = _licenseProvider.GetLicense(x.LicenseId).LicenseType.ToString();
+ dr["Member"] = member.Name;
+ dr["Email"] = member.Email;
+ dr["Country"] = member.CompanyCountry;
+ dr["OrderDate"] = x.CreateDate.ToString();
+
+ dt.Rows.Add(dr);
+ }
+
+ int iColCount = dt.Columns.Count;
+ for (int i = 0; i < iColCount; i++)
+ {
+ response.Output.Write(dt.Columns[i]);
+ if (i < iColCount - 1)
+ {
+ response.Output.Write(",");
+ }
+ }
+ Response.Output.Write("\n");
+ // Now write all the rows.
+ foreach (DataRow dr in dt.Rows)
+ {
+ for (int i = 0; i < iColCount; i++)
+ {
+ if (!Convert.IsDBNull(dr[i]))
+ {
+ if (dr[i].ToString().Contains(","))
+ {
+ response.Output.Write("\"" + dr[i].ToString().Replace("\n", "").Replace("\r", "") + "\"");
+ }
+ else
+ {
+ response.Output.Write(dr[i].ToString().Replace("\n", "").Replace("\r", ""));
+ }
+ }
+ if (i < iColCount - 1)
+ {
+ response.Output.Write(",");
+ }
+ }
+ response.Output.Write("\n");
+ }
+ response.Output.Close();
+ response.End();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx.designer.cs b/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx.designer.cs
new file mode 100644
index 00000000..0666f678
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Customers/VendorCustomers.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Customers {
+
+
+ public partial class VendorCustomers {
+
+ ///
+ /// CustomerList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater CustomerList;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx b/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx
new file mode 100644
index 00000000..567ecb68
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx
@@ -0,0 +1,100 @@
+<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="VendorBIOverview.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Dashboard.VendorBIOverview" %>
+
+
+
+Products YTD Overview
+
+
+
+
+
+
+
+
+
+ Product
+ Page Views
+ Downloads
+ Purchases
+ Revenue
+
+
+
+
+
+
+ "><%# Eval("Name") %>
+ <%# Eval("PageViews") %>
+ <%# Eval("Downloads") %>
+ <%# Eval("Purchases") %>
+
+
+
+
+
+
+
+
+ Totals
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx.cs b/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx.cs
new file mode 100644
index 00000000..ad85c85b
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx.cs
@@ -0,0 +1,246 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Accounting;
+
+namespace Marketplace.usercontrols.Deli.Dashboard
+{
+ public enum ChartType
+ {
+ Revenue,
+ Downloads,
+ Purchases,
+ PageViews
+ }
+
+ public partial class VendorBIOverview : System.Web.UI.UserControl
+ {
+
+ public int DetailView { get; set; }
+ private IDeliOrderItemProvider _orderProvider;
+ private IVendorProvider _vendorProvider;
+ private IListingProvider _listingProvider;
+ private IMemberProvider _memberProvider;
+
+ public string RevenueScript { get; set; }
+ public string DownloadsScript { get; set; }
+ public string PageViewsScript { get; set; }
+ public string PurchasesScript { get; set; }
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ rp_productRepeater.ItemDataBound += new RepeaterItemEventHandler(rp_productRepeater_ItemDataBound);
+ }
+
+ void rp_productRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ dynamic item = e.Item.DataItem as dynamic;
+
+ if (e.Item.ItemType.ToString() != "Header" && e.Item.ItemType.ToString() != "Footer")
+ {
+ Literal revenue = (Literal)e.Item.FindControl("DetailItemRevenue");
+ revenue.Text = DeliCurrency.NiceMoney((decimal)item.Revenue, DeliCurrency.FromSymbol("EUR"));
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _orderProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+
+ BindProducts();
+ }
+
+ protected void BindProducts()
+ {
+
+ var vendor = _vendorProvider.GetVendorById(_memberProvider.GetCurrentMember().Id);
+
+ var projects = _listingProvider.GetListingsByVendor(vendor.Member.Id, false, true)
+ .Where(x => x.ListingType == ListingType.commercial)
+ .Select(x => new BIYTDOrderInfo()
+ {
+ Name = x.Name,
+ DetailView = umbraco.library.NiceUrl(DetailView) + "?id=" + x.Id.ToString(),
+ PageViews = x.ProjectViews,
+ Downloads = x.Downloads,
+ OrderItems = _orderProvider.GetOrderItemsByListingId(x.Id, true, true)
+ }).ToList();
+
+
+ BuildChart(vendor, projects, ChartType.Revenue);
+ BuildChart(vendor, projects, ChartType.Downloads);
+ BuildChart(vendor, projects, ChartType.PageViews);
+ BuildChart(vendor, projects, ChartType.Purchases);
+
+
+ rp_productRepeater.DataSource = projects;
+ rp_productRepeater.DataBind();
+
+ DownloadsTotal.Text = projects.Sum(x => x.Downloads).ToString();
+ PageViewTotal.Text = projects.Sum(x => x.PageViews).ToString();
+ PurchasesTotal.Text = projects.Sum(x => x.Purchases).ToString();
+ RevenueTotal.Text = DeliCurrency.NiceMoney((decimal)projects.Sum(x => x.Revenue), DeliCurrency.FromSymbol("EUR"));
+
+ RevenueOverview.Text = RevenueTotal.Text;
+ RefundsOverview.Text = DeliCurrency.NiceMoney((decimal)projects.Sum(x => x.Refunds), DeliCurrency.FromSymbol("EUR"));
+ }
+
+ private void BuildChart(IVendor vendor, IEnumerable projects, ChartType chartDataType)
+ {
+ var projectsList = projects.ToList();
+ var count = projects.Count();
+
+
+ var addColTemplate = "";
+ var dataTemplate = "";
+ var countTemplate = "";
+
+ switch (chartDataType)
+ {
+ case ChartType.Revenue:
+ addColTemplate = "revData.addColumn('{0}', '{1}');";
+ dataTemplate = "revData.setValue({0},{1},{2});";
+ countTemplate = string.Format("revData.addRows({0});", count);
+ RevenueScript += string.Format(addColTemplate, "string", "Product");
+ RevenueScript += string.Format(addColTemplate, "number", "Revenue");
+ RevenueScript += countTemplate;
+ break;
+ case ChartType.Downloads:
+ addColTemplate = "downData.addColumn('{0}', '{1}');";
+ dataTemplate = "downData.setValue({0},{1},{2});";
+ countTemplate = string.Format("downData.addRows({0});", count);
+ DownloadsScript += string.Format(addColTemplate, "string", "Product");
+ DownloadsScript += string.Format(addColTemplate, "number", "No. of Downloads");
+ DownloadsScript += countTemplate;
+ break;
+ case ChartType.Purchases:
+ addColTemplate = "purchasesData.addColumn('{0}', '{1}');";
+ dataTemplate = "purchasesData.setValue({0},{1},{2});";
+ countTemplate = string.Format("purchasesData.addRows({0});", count);
+ PurchasesScript += string.Format(addColTemplate, "string", "Product");
+ PurchasesScript += string.Format(addColTemplate, "number", "No. of Purchases");
+ PurchasesScript += countTemplate;
+ break;
+ case ChartType.PageViews:
+ addColTemplate = "pageViewData.addColumn('{0}', '{1}');";
+ dataTemplate = "pageViewData.setValue({0},{1},{2});";
+ countTemplate = string.Format("pageViewData.addRows({0});", count);
+ PageViewsScript += string.Format(addColTemplate, "string", "Product");
+ PageViewsScript += string.Format(addColTemplate, "number", "No. of Page Views");
+ PageViewsScript += countTemplate;
+ break;
+ default:
+ break;
+ }
+
+ for(var i=0; i < projectsList.Count();i++)
+ {
+
+ switch (chartDataType)
+ {
+ case ChartType.Revenue:
+ RevenueScript += string.Format(dataTemplate, i, 0, "'" + projectsList[i].Name + "'");
+ RevenueScript += string.Format(dataTemplate, i, 1, projectsList[i].Revenue);
+ break;
+ case ChartType.Downloads:
+ DownloadsScript += string.Format(dataTemplate, i, 0, "'" + projectsList[i].Name + "'");
+ DownloadsScript += string.Format(dataTemplate, i, 1, projectsList[i].Downloads);
+ break;
+ case ChartType.Purchases:
+ PurchasesScript += string.Format(dataTemplate, i, 0, "'" + projectsList[i].Name + "'");
+ PurchasesScript += string.Format(dataTemplate, i, 1, projectsList[i].Purchases);
+ break;
+ case ChartType.PageViews:
+ PageViewsScript += string.Format(dataTemplate, i, 0, "'" + projectsList[i].Name + "'");
+ PageViewsScript += string.Format(dataTemplate, i, 1, projectsList[i].PageViews);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ private IEnumerable GetOrderItems(int id)
+ {
+ return _orderProvider.GetOrderItemsByListingId(id, true, true);
+
+ }
+
+ }
+
+ public class BIYTDOrderInfo
+ {
+ public string Name { get; set; }
+ public string DetailView { get; set; }
+ public int PageViews { get; set; }
+ public int Downloads { get; set; }
+ public double Revenue
+ {
+ get
+ {
+ return GetProductRevenue(OrderItems);
+ }
+ }
+ public int Purchases
+ {
+ get
+ {
+ return GetProductPurchases(OrderItems);
+ }
+ }
+ public double Refunds
+ {
+ get
+ {
+ return GetProductRefunds(OrderItems);
+ }
+ }
+ public IEnumerable OrderItems { get; set; }
+
+
+ private double GetProductRevenue(IEnumerable x)
+ {
+ var orderItems = x.Where(y => !y.IsRefunded);
+ var total = 0.00;
+ foreach (var i in orderItems)
+ {
+ total += (i.NetPrice * i.Quantity);
+ }
+ return total;
+
+ }
+
+ private double GetProductRefunds(IEnumerable x)
+ {
+ var orderItems = x.Where(y => y.IsRefunded);
+ var total = 0.00;
+ foreach (var i in orderItems)
+ {
+ total += (i.NetPrice * i.Quantity);
+ }
+
+ return total;
+
+ }
+
+ private int GetProductPurchases(IEnumerable x)
+ {
+ var orderItems = x.Where(y => !y.IsRefunded);
+ var count = 0;
+ foreach (var i in orderItems)
+ {
+ count += i.Quantity;
+ }
+ return count;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx.designer.cs b/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx.designer.cs
new file mode 100644
index 00000000..941d5be5
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Dashboard/VendorBIOverview.ascx.designer.cs
@@ -0,0 +1,78 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Dashboard {
+
+
+ public partial class VendorBIOverview {
+
+ ///
+ /// RevenueOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal RevenueOverview;
+
+ ///
+ /// RefundsOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal RefundsOverview;
+
+ ///
+ /// rp_productRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater rp_productRepeater;
+
+ ///
+ /// PageViewTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal PageViewTotal;
+
+ ///
+ /// DownloadsTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal DownloadsTotal;
+
+ ///
+ /// PurchasesTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal PurchasesTotal;
+
+ ///
+ /// RevenueTotal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal RevenueTotal;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx b/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx
new file mode 100644
index 00000000..3043eeaa
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx
@@ -0,0 +1,104 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorProjectBI.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Dashboard.VendorProjectBI" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+Stats for
+
+
+Usage
+
+
+
Page Views Last 7 Days
+
+
+
+
+
+Licenses
+
+
+
+
+
+
<%# (Eval("LicensesSold") as IEnumerable).Count().ToString()%> Sold
+
<%# (Eval("LicensesSold") as IEnumerable).Where(x => x.IsActive).Count().ToString()%> Configured
+
+
<%# Eval("TypeSold")%>
+
+
+
+
+
+
+Orders
+
+
+
+
+
+ Order Id.
+ License Type
+ Member
+ Date
+ Quantity
+ Refunded
+ Order Value
+
+
+
+
+">
+ <%# ((IOrder)Eval("Order")).OrderId%>
+ <%# Eval("LicenseSold")%>
+ <%# ((IOrder)Eval("Order")).Member.Name %>
+ <%# ((IOrder)Eval("Order")).CreateDate.ToString("D")%>
+ <%# Eval("Quantity")%>
+ <%# Eval("Refunded")%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx.cs b/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx.cs
new file mode 100644
index 00000000..1add6ea8
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx.cs
@@ -0,0 +1,237 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Data;
+using Marketplace.Providers.Accounting;
+using System.Diagnostics;
+
+namespace Marketplace.usercontrols.Deli.Dashboard
+{
+ public partial class VendorProjectBI : System.Web.UI.UserControl
+ {
+
+ private int _projectId;
+ public int ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+ private List _orderItems;
+ public List OrderItems
+ {
+ get
+ {
+ if (_orderItems == null)
+ _orderItems = _orderItemProvider.GetOrderItemsByListingId(_projectId, true, true).ToList();
+ return _orderItems;
+ }
+ }
+
+ public string PageViewsScript { get; set; }
+
+ private ILicenseProvider _licenseProvider;
+ private IMemberLicenseProvider _memberLicenseProvider;
+ private IDeliOrderItemProvider _orderItemProvider;
+ private IOrderProvider _orderProvider;
+ private IVendorProvider _vendorProvider;
+ private IListingProvider _listingProvider;
+ private IMemberProvider _memberProvider;
+ private IListingItem _project;
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ _orderProvider = (IOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ _memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ _project = _listingProvider.GetListing(ProjectId);
+ LoadProjectBI();
+ }
+
+ protected void LoadProjectBI()
+ {
+ ProjectName.Text = _project.Name;
+ RevenueOverview.Text = DeliCurrency.NiceMoney((decimal)GetProductRevenue(ProjectId), DeliCurrency.FromSymbol("EUR"));
+ RefundOverview.Text = DeliCurrency.NiceMoney((decimal)GetProductRefunds(ProjectId), DeliCurrency.FromSymbol("EUR"));
+ DownloadsOverview.Text = _project.Downloads.ToString();
+ PurchasesOverview.Text = GetProductPurchases(ProjectId).ToString();
+ PageViewOverview.Text = _project.ProjectViews.ToString();
+
+ Stopwatch stopWatch = new Stopwatch();
+ stopWatch.Start();
+ BindLicenseStats();
+ stopWatch.Stop();
+ TimeSpan ts = stopWatch.Elapsed;
+
+ // Format and display the TimeSpan value.
+ string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
+ ts.Hours, ts.Minutes, ts.Seconds,
+ ts.Milliseconds / 10);
+ Debug.WriteLine("BindLicense Stats RunTime:- " + elapsedTime);
+
+ stopWatch.Start();
+ BindOrdersTable();
+ stopWatch.Stop();
+ ts = stopWatch.Elapsed;
+ elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
+ ts.Hours, ts.Minutes, ts.Seconds,
+ ts.Milliseconds / 10);
+ Debug.WriteLine("BindOrdersTable RunTime:- " + elapsedTime);
+
+ BuildChartPageView(DateTime.Now.AddDays(-7), DateTime.Now);
+
+ }
+
+ protected void repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ dynamic item = e.Item.DataItem as dynamic;
+
+ if (e.Item.ItemType.ToString() != "Header" && e.Item.ItemType.ToString() != "Footer")
+ {
+ Literal revenue = (Literal)e.Item.FindControl("DetailItemRevenue");
+ revenue.Text = DeliCurrency.NiceMoney((decimal)item.Revenue, DeliCurrency.FromSymbol("EUR"));
+ }
+ }
+
+
+ protected void BindLicenseStats()
+ {
+ var licenses = _licenseProvider.GetProjectLicenses(_project.ProjectGuid).Select(x => new LicenseStatObj()
+ {
+ TypeSold = x.LicenseType.ToString(),
+ LicensesSold = GetSold(x.Id),
+ Revenue = GetRevenue(x.Id)
+ });
+
+ LicensesSold.DataSource = licenses;
+ LicensesSold.DataBind();
+ }
+
+ private double GetRevenue(int p)
+ {
+ return OrderItems.Where(x =>!x.IsRefunded)
+ .Where(x => x.LicenseId == p)
+ .Sum(x => x.NetPrice);
+ }
+
+ private void BindOrdersTable()
+ {
+ var orderItems = OrderItems.Select(x => new
+ {
+ OrderId = x.OrderId,
+ Order = _orderProvider.GetOrder(x.OrderId,true),
+ LicenseSold = _licenseProvider.GetLicense(x.LicenseId).LicenseType.ToString(),
+ Quantity = x.Quantity,
+ Refunded = x.IsRefunded,
+ Revenue = x.NetPrice,
+ CssClass = x.IsRefunded ? "refund" : ""
+ }).OrderByDescending(x => x.Order.PaymentDate).ToList();
+
+ OrdersRepeater.DataSource = orderItems;
+ OrdersRepeater.DataBind();
+ }
+
+
+ private IEnumerable GetSold(int licenseId)
+ {
+ return _memberLicenseProvider.GetLicensesByLicenseTypeId(licenseId);
+ }
+
+
+ private double GetProductRevenue(int p)
+ {
+ var orderItems = OrderItems.Where(x=>!x.IsRefunded);
+ var total = 0.00;
+ foreach (var i in orderItems)
+ {
+ total += (i.NetPrice * i.Quantity);
+ }
+ return total;
+
+ }
+
+ private double GetProductRefunds(int p)
+ {
+ var orderItems = OrderItems.Where(x => x.IsRefunded);
+ var total = 0.00;
+ foreach (var i in orderItems)
+ {
+ total += (i.NetPrice * i.Quantity);
+ }
+
+ return total;
+
+ }
+
+ private int GetProductPurchases(int p)
+ {
+ var orderItems = OrderItems.Where(x => !x.IsRefunded);
+ var count = 0;
+ foreach (var i in orderItems)
+ {
+ count += i.Quantity;
+ }
+ return count;
+ }
+
+ private void BuildChartPageView(DateTime startDate, DateTime endDate)
+ {
+
+ var ctx = new MarketplaceDataContext();
+ var pageViews = ctx.DeliProjectViews.Where(x => x.ProjectId == _projectId && x.CreateDate >= startDate && x.CreateDate <= endDate).OrderBy(x => x.CreateDate).ToList();
+ var timeSpan = (endDate - startDate).TotalDays;
+
+
+ var addColTemplate = "";
+ var dataTemplate = "";
+ var countTemplate = "";
+
+
+ addColTemplate = "data.addColumn('{0}', '{1}');";
+ dataTemplate = "data.setValue({0},{1},{2});";
+ countTemplate = string.Format("data.addRows({0});", timeSpan);
+ PageViewsScript += string.Format(addColTemplate, "string", "Date");
+ PageViewsScript += string.Format(addColTemplate, "number", "Page Views");
+ PageViewsScript += countTemplate;
+
+ for (var i = 0; i < timeSpan; i++)
+ {
+ var thisDate = (startDate.AddDays(i+1));
+ PageViewsScript += string.Format(dataTemplate, i, 0, "'" + thisDate.ToString("d") + "'");
+ var valForDate = pageViews.Where(x => x.CreateDate.ToShortDateString() == thisDate.ToShortDateString()).Count();
+ PageViewsScript += string.Format(dataTemplate, i, 1, valForDate);
+ }
+
+ }
+
+
+ }
+
+ public class LicenseStatObj
+ {
+ public string TypeSold { get; set; }
+ public IEnumerable LicensesSold { get; set; }
+ public double Revenue { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx.designer.cs b/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx.designer.cs
new file mode 100644
index 00000000..2bc90280
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Dashboard/VendorProjectBI.ascx.designer.cs
@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Dashboard {
+
+
+ public partial class VendorProjectBI {
+
+ ///
+ /// ProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectName;
+
+ ///
+ /// RevenueOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal RevenueOverview;
+
+ ///
+ /// RefundOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal RefundOverview;
+
+ ///
+ /// PageViewOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal PageViewOverview;
+
+ ///
+ /// DownloadsOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal DownloadsOverview;
+
+ ///
+ /// PurchasesOverview control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal PurchasesOverview;
+
+ ///
+ /// LicensesSold control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater LicensesSold;
+
+ ///
+ /// OrdersRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater OrdersRepeater;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/FeaturedProject.ascx b/Marketplace/usercontrols/Deli/FeaturedProject.ascx
new file mode 100644
index 00000000..657b7b88
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/FeaturedProject.ascx
@@ -0,0 +1,51 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FeaturedProject.ascx.cs" Inherits="Marketplace.usercontrols.Deli.FeaturedProject" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+<%@ Import Namespace="Marketplace.Providers.Helpers" %>
+
+
+ ">
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%# Eval("Karma") %>
+ Karma
+
+
+ <%# Eval("Downloads") %>
+ Downloads
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/FeaturedProject.ascx.cs b/Marketplace/usercontrols/Deli/FeaturedProject.ascx.cs
new file mode 100644
index 00000000..c48ffad4
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/FeaturedProject.ascx.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class FeaturedProject : System.Web.UI.UserControl
+ {
+ public int projectId { get; set; }
+ public string FeatureImage { get; set; }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (projectId != 0)
+ {
+ var projectList = new List();
+
+
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = provider.GetListing(projectId);
+ projectList.Add(project);
+
+ ProjectList.DataSource = projectList;
+ ProjectList.DataBind();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/FeaturedProject.ascx.designer.cs b/Marketplace/usercontrols/Deli/FeaturedProject.ascx.designer.cs
new file mode 100644
index 00000000..b680e438
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/FeaturedProject.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class FeaturedProject {
+
+ ///
+ /// ProjectList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ProjectList;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx b/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx
new file mode 100644
index 00000000..31b04e48
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx
@@ -0,0 +1,8 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HQStaffPickProjects.ascx.cs" Inherits="Marketplace.usercontrols.Deli.HQStaffPickProjects" %>
+
+
+"><%# Eval("Name") %>
+<%--<%# Marketplace.library.GetManufacturerName(((Marketplace.Interfaces.IVendor)Eval("Vendor"))) %> --%>
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx.cs b/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx.cs
new file mode 100644
index 00000000..18239927
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class HQStaffPickProjects : System.Web.UI.UserControl
+ {
+ public string PickedProjects { get; set; }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(PickedProjects))
+ {
+ var idArray = PickedProjects.Split(',');
+ var listProject = new List();
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ foreach (var id in idArray)
+ {
+ try
+ {
+ var listing = provider.GetListing(Int32.Parse(id),true);
+ listProject.Add(listing);
+
+ }
+ catch
+ {
+ // do nothing the item doesnt exist;
+ }
+ }
+
+
+ Listing.DataSource = listProject;
+ Listing.DataBind();
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx.designer.cs b/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx.designer.cs
new file mode 100644
index 00000000..273f94cf
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/HQStaffPickProjects.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class HQStaffPickProjects {
+
+ ///
+ /// Listing control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater Listing;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx b/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx
new file mode 100644
index 00000000..cf86d3c4
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx
@@ -0,0 +1,149 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyLicenses.ascx.cs" Inherits="Marketplace.usercontrols.Deli.License.Member.MyLicenses" %>
+
+Manage your licenses
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Found with term
+
+
+
+
+
+
+
+ Product
+ License Type
+ Configured For
+ License File
+
+
+
+
+
+
+
+ <%#((Marketplace.Interfaces.IListingItem)Eval("Product")).Name %>
+ <%#((Marketplace.Interfaces.IListingItem)Eval("Product")).Vendor.VendorCompanyName %>
+
+
+ <%# Eval("LicType") %>
+
+
+ Dev: <%# Eval("DevConfig") %>
+ Staging: <%# Eval("StagingConfig") %>
+ Production: <%# Eval("ProductionConfig")%>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx.cs b/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx.cs
new file mode 100644
index 00000000..ff61f59c
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx.cs
@@ -0,0 +1,263 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using Marketplace.Providers.Helpers;
+using our;
+using Marketplace.Providers.MemberLicense;
+using System.Text.RegularExpressions;
+
+namespace Marketplace.usercontrols.Deli.License.Member
+{
+ public partial class MyLicenses : System.Web.UI.UserControl
+ {
+
+ public int SupportFormLocation { get; set; }
+
+ protected string supportFormUrl;
+ private IMemberProvider _memberProvider;
+ private IMemberLicenseProvider _memberLicenseProvider;
+ private ILicenseProvider _licenseProvider;
+ private IListingProvider _listingProvider;
+ private IMember _m;
+
+
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+
+ RP_Licenses.ItemDataBound += new RepeaterItemEventHandler(OnLicenseBound);
+ RP_Licenses.ItemCommand += new RepeaterCommandEventHandler(OnLicenseCommand);
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ _memberLicenseProvider= (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ _m = _memberProvider.GetCurrentMember();
+
+ //setup the location of the support form
+ supportFormUrl = umbraco.library.NiceUrl(SupportFormLocation);
+
+
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ base.OnPreRender(e);
+
+
+
+
+ if (!IsPostBack)
+ {
+ BindLicenses(string.Empty);
+ }
+
+
+ }
+
+ private void BindLicenses(string term)
+ {
+ var licenses = (!string.IsNullOrEmpty(term))
+ ? _memberLicenseProvider.GetAllLicensesContaining(_m.Id, term)
+ : _memberLicenseProvider.GetAllLicensesByMember(_m.Id);
+
+
+ var memberLicenses = licenses.Select(x => new
+ {
+ Id = x.Id,
+ Product = GetProduct(x.LicenseId),
+ LicType = _licenseProvider.GetLicense(x.LicenseId).LicenseType.LicenseTypeAsString(),
+ DevConfig= x.DevConfig,
+ StagingConfig = x.StagingConfig,
+ ProductionConfig = x.ProductionConfig,
+ Lic = x
+ });
+
+ RP_Licenses.DataSource = memberLicenses;
+ RP_Licenses.DataBind();
+ }
+
+
+ private IListingItem GetProduct(int p)
+ {
+ var product = _listingProvider.GetListing(_licenseProvider.GetLicense(p).ProjectGuid, false);
+ return product;
+ }
+
+ protected void OnLicenseBound(object sender, RepeaterItemEventArgs e)
+ {
+ if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
+ {
+ dynamic row = e.Item.DataItem as dynamic;
+ var lic = row.Lic;
+ Button _action = (Button)e.Item.FindControl("BT_Action");
+ LinkButton _download = (LinkButton)e.Item.FindControl("LNK_Download");
+
+ _download.CommandArgument = lic.Id.ToString();
+ _download.CommandName = "Download";
+
+
+ //set up the configure and download buttons
+ _action.CommandArgument = lic.Id.ToString();
+
+ if (lic.DateGenerated != null)
+ {
+ _action.Visible = false;
+ }
+ else
+ {
+ _action.CommandName = "Configure";
+ _action.Text = "Configure";
+ _action.CommandArgument = lic.Id.ToString();
+ _download.Visible = false;
+ }
+
+ }
+ }
+
+ protected void OnLicenseCommand(object sender, RepeaterCommandEventArgs e)
+ {
+ //load the license
+ string licenseId = e.CommandArgument.ToString();
+
+ var lic = _memberLicenseProvider.GetLicenseById(Int32.Parse(licenseId));
+ var licType = _licenseProvider.GetLicense(lic.LicenseId);
+ var licenseTypeProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ switch (e.CommandName)
+ {
+
+
+ case "Configure":
+ Create_LicenseError.Visible = false;
+ ConfigurationForm.Visible = true;
+
+
+ ConfigurationLicenseType.Text = licType.LicenseType.ToString() + " License ";
+ ConfigurationMemberName.Text = lic.Member.Name;
+ ConfigurationProjectName.Text = GetProduct(lic.LicenseId).Name;
+
+ if (licType.LicenseType != LicenseType.Unlimited)
+ {
+ Configure_DevConfig.Text = lic.DevConfig;
+ Configure_StagingConfig.Text = lic.StagingConfig;
+ Configure_ProductionConfig.Text = lic.ProductionConfig;
+
+ //set the validation class for the fields to validate correct setup.
+ switch (licType.LicenseType)
+ {
+ case LicenseType.Domain:
+ Configure_DevConfig.CssClass += " onlyDomainName";
+ Configure_StagingConfig.CssClass += " onlyDomainName";
+ Configure_ProductionConfig.CssClass += " onlyDomainName";
+ break;
+ case LicenseType.IP:
+ Configure_DevConfig.CssClass += " onlyIpAddress";
+ Configure_StagingConfig.CssClass += " onlyIpAddress";
+ Configure_ProductionConfig.CssClass += " onlyIpAddress";
+ break;
+ case LicenseType.Unlimited:
+ break;
+ case LicenseType.SourceCode:
+ break;
+ default:
+ break;
+ }
+
+ DomainIpConfig.Visible = true;
+ UnlimitedConfig.Visible = false;
+ }
+ else
+ {
+
+ DomainIpConfig.Visible = false;
+ UnlimitedConfig.Visible = true;
+ }
+ Configure_Id.Value = licenseId;
+ break;
+
+
+ case "Download":
+ ConfigurationForm.Visible = false;
+ Create_LicenseError.Visible = false;
+ var project = _listingProvider.GetListing(_licenseProvider.GetLicense(lic.LicenseId).ProjectGuid);
+ var filename = Regex.Replace(project.Vendor.VendorCompanyName, @"[\W]", "");
+ filename += Regex.Replace(project.Name, @"[\W]", "");
+ HttpContext context = HttpContext.Current;
+ context.Response.Clear();
+ context.Response.Write(lic.GeneratedLicense);
+ context.Response.ContentType = "application/octet-steam";
+ context.Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + ".lic");
+ context.Response.End();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+
+ protected void UpdateLicense_Click(object server, EventArgs e)
+ {
+ Create_LicenseError.Visible = false;
+
+ if (Configure_DevConfig.Text.Contains("*") || Configure_StagingConfig.Text.Contains("*") || Configure_ProductionConfig.Text.Contains("*"))
+ {
+ LicenseErrorMessage.Text = " Wildcards are not allowed in domains, they are automatically added; e.g. *.mydomain.com. Please remove any '*' characters are retry";
+ Create_LicenseError.Visible = true;
+ }
+ else
+ {
+
+ var licenseId = Int32.Parse(Configure_Id.Value);
+ var license = _memberLicenseProvider.GetLicenseById(licenseId);
+
+ var licenseType = _licenseProvider.GetLicense(license.LicenseId);
+
+ if (licenseType.LicenseType != LicenseType.Unlimited)
+ {
+ license.DevConfig = Configure_DevConfig.Text;
+ license.StagingConfig = Configure_StagingConfig.Text;
+ license.ProductionConfig = Configure_ProductionConfig.Text;
+ }
+ else
+ {
+ license.DevConfig = "Unlimited";
+ license.StagingConfig = "Unlimited";
+ license.ProductionConfig = "Unlimited";
+ }
+ license.IsActive = true;
+
+ _memberLicenseProvider.SaveOrUpdate(license);
+ _memberLicenseProvider.GenerateLicenseFile(license);
+
+ if (string.IsNullOrEmpty(license.GeneratedLicense))
+ {
+ LicenseErrorMessage.Text = license.GeneratedLicense + " Please contact the license vendor for assistance";
+ Create_LicenseError.Visible = true;
+ }
+ else
+ {
+ Response.Redirect(Request.Url.OriginalString);
+ }
+ }
+ }
+
+ protected void Find_LicenseSubmit_Click(object sender, EventArgs e)
+ {
+ var term = Find_LicenseTerm.Text;
+ Find_Filter.Text = Find_LicenseTerm.Text;
+ FilteringByMessage.Visible = true;
+ Create_LicenseError.Visible = false;
+ ConfigurationForm.Visible = false;
+ BindLicenses(term);
+ Find_RecordsFound.Text = RP_Licenses.Items.Count.ToString();
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx.designer.cs b/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx.designer.cs
new file mode 100644
index 00000000..a1c06e86
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/License/Member/MyLicenses.ascx.designer.cs
@@ -0,0 +1,213 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.License.Member {
+
+
+ public partial class MyLicenses {
+
+ ///
+ /// Create_LicenseError control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder Create_LicenseError;
+
+ ///
+ /// LicenseErrorMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LicenseErrorMessage;
+
+ ///
+ /// ConfigurationForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ConfigurationForm;
+
+ ///
+ /// ConfigurationLicenseType control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ConfigurationLicenseType;
+
+ ///
+ /// ConfigurationProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ConfigurationProjectName;
+
+ ///
+ /// ConfigurationMemberName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ConfigurationMemberName;
+
+ ///
+ /// Configure_Id control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField Configure_Id;
+
+ ///
+ /// DomainIpConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder DomainIpConfig;
+
+ ///
+ /// Label1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Configure_DevConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Configure_DevConfig;
+
+ ///
+ /// Label2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Configure_StagingConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Configure_StagingConfig;
+
+ ///
+ /// Label3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// Configure_ProductionConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Configure_ProductionConfig;
+
+ ///
+ /// UnlimitedConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder UnlimitedConfig;
+
+ ///
+ /// bt_Configure control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_Configure;
+
+ ///
+ /// Find_LicenseTerm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Find_LicenseTerm;
+
+ ///
+ /// Find_LicenseSubmit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button Find_LicenseSubmit;
+
+ ///
+ /// FilteringByMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder FilteringByMessage;
+
+ ///
+ /// Find_RecordsFound control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal Find_RecordsFound;
+
+ ///
+ /// Find_Filter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal Find_Filter;
+
+ ///
+ /// RP_Licenses control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater RP_Licenses;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx b/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx
new file mode 100644
index 00000000..f1ef856d
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx
@@ -0,0 +1,205 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProjectLicenses.ascx.cs" Inherits="Marketplace.usercontrols.Deli.License.Vendor.ProjectLicenses" %>
+
+Manage Licenses for
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Found with term
+
+
+
+
+
+
+
+ License Type
+ Configured For
+ Member
+ License File
+
+
+
+
+
+
+
+ <%# Eval("LicType") %>
+
+
+ Dev: <%# Eval("DevConfig") %>
+ Staging: <%# Eval("StagingConfig") %>
+ Production: <%# Eval("ProductionConfig")%>
+
+
+
+ <%# Eval("MemberName") %>
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx.cs b/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx.cs
new file mode 100644
index 00000000..2553b283
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx.cs
@@ -0,0 +1,381 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using Marketplace.Providers.Helpers;
+using our;
+using Marketplace.Providers.MemberLicense;
+using System.Text.RegularExpressions;
+
+namespace Marketplace.usercontrols.Deli.License.Vendor
+{
+ public partial class ProjectLicenses : System.Web.UI.UserControl
+ {
+ private Guid _projectGuid;
+
+ private int? _projectId;
+ public int? ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+
+ RP_Licenses.ItemDataBound += new RepeaterItemEventHandler(OnLicenseBound);
+ RP_Licenses.ItemCommand += new RepeaterCommandEventHandler(OnLicenseCommand);
+
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ base.OnPreRender(e);
+ if (umbraco.library.IsLoggedOn() && ProjectId != null)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ IMember mem = memberProvider.GetCurrentMember();
+ IListingItem project = provider.GetListing((int)ProjectId);
+
+ ProjectName.Text = project.Name;
+ _projectGuid = project.ProjectGuid;
+
+ if ((project.Vendor.Member.Id == mem.Id) ||
+ Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+ {
+ if (!IsPostBack)
+ {
+ BindLicenses(string.Empty);
+ BindDropdowns();
+ }
+ }
+ else
+ {
+ //this project does not belong to this member so kick them back to the project list in their profile.
+ Response.Redirect("~/member/profile/projects/");
+ }
+ }
+ }
+
+ private void BindLicenses(string term)
+ {
+ var licenseTypeProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var licenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+
+ var licenses = (!string.IsNullOrEmpty(term))
+ ?licenseProvider.GetAllLicensesContaining(term, (int)ProjectId)
+ :licenseProvider.GetAllLicensesByProject(_projectGuid);
+
+ var memberLicenses = licenses.Select(x => new
+ {
+ Id = x.Id,
+ LicType = licenseTypeProvider.GetLicense(x.LicenseId).LicenseType.LicenseTypeAsString(),
+ DevConfig= x.DevConfig,
+ StagingConfig = x.StagingConfig,
+ ProductionConfig = x.ProductionConfig,
+ MemberName = x.Member.Name + " (" + x.Member.Email + ")",
+ Lic = x
+ });
+
+ RP_Licenses.DataSource = memberLicenses;
+ RP_Licenses.DataBind();
+ }
+
+ protected void OnLicenseBound(object sender, RepeaterItemEventArgs e)
+ {
+ if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
+ {
+ dynamic row = e.Item.DataItem as dynamic;
+ var lic = row.Lic;
+ Button _action = (Button)e.Item.FindControl("BT_Action");
+ Button _enable = (Button)e.Item.FindControl("BT_EnableDisable");
+ LinkButton _download = (LinkButton)e.Item.FindControl("LNK_Download");
+
+ _download.CommandArgument = lic.Id.ToString();
+ _download.CommandName = "Download";
+
+ //setup the enable disable button
+ _enable.CommandArgument = lic.Id.ToString();
+ _enable.CommandName = "EnableDisable";
+ _enable.Text = lic.IsActive ? "Disable" : "Enable";
+
+
+ //set up the configure and download buttons
+ _action.CommandArgument = lic.Id.ToString();
+
+ if (lic.DateGenerated != null)
+ {
+ _action.CommandName = "Configure";
+ _action.CommandArgument = lic.Id.ToString();
+ _action.Text = "Configure";
+ }
+ else
+ {
+ _action.CommandName = "Configure";
+ _action.Text = "Configure";
+ _action.CommandArgument = lic.Id.ToString();
+ _download.Visible = false;
+ }
+
+ }
+ }
+
+ protected void OnLicenseCommand(object sender, RepeaterCommandEventArgs e)
+ {
+ //load the license
+ string licenseId = e.CommandArgument.ToString();
+ var licenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ var lic = licenseProvider.GetLicenseById(Int32.Parse(licenseId));
+
+ var licenseTypeProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ switch (e.CommandName)
+ {
+
+
+ case "Configure":
+
+
+
+ //get its type to set the headings
+ var licenseType = licenseTypeProvider.GetLicense(lic.LicenseId);
+ var licType = licenseType.LicenseType.LicenseTypeAsString();
+
+ Create_LicenseError.Visible = false;
+ CreateNewForm.Visible = false;
+ ConfigurationForm.Visible = true;
+ CreateNew.Visible = true;
+
+
+ ConfigurationLicenseType.Text = licType + " License ";
+ ConfigurationMemberName.Text = lic.Member.Name;
+ ConfigurationProjectName.Text = ProjectName.Text;
+
+ if (licenseType.LicenseType != LicenseType.Unlimited)
+ {
+ Configure_DevConfig.Text = lic.DevConfig;
+ Configure_StagingConfig.Text = lic.StagingConfig;
+ Configure_ProductionConfig.Text = lic.ProductionConfig;
+ DomainIpConfig.Visible = true;
+ UnlimitedConfig.Visible = false;
+ }
+ else
+ {
+ DomainIpConfig.Visible = false;
+ UnlimitedConfig.Visible = true;
+ }
+ Configure_Id.Value = licenseId;
+ break;
+
+ case "EnableDisable":
+
+ ConfigurationForm.Visible = false;
+ Create_LicenseError.Visible = false;
+ CreateNewForm.Visible = false;
+ CreateNew.Visible = true;
+
+ lic.IsActive = lic.IsActive ? false : true;
+ licenseProvider.SaveOrUpdate(lic);
+ break;
+
+ case "Download":
+
+ ConfigurationForm.Visible = false;
+ Create_LicenseError.Visible = false;
+ CreateNewForm.Visible = false;
+ CreateNew.Visible = true;
+
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = provider.GetListing(licenseTypeProvider.GetLicense(lic.LicenseId).ProjectGuid);
+ var filename = Regex.Replace(project.Vendor.VendorCompanyName, @"[\W]", "");
+ filename += Regex.Replace(project.Name, @"[\W]", "");
+ HttpContext context = HttpContext.Current;
+ context.Response.Clear();
+ context.Response.Write(lic.GeneratedLicense);
+ context.Response.ContentType = "application/octet-steam";
+ context.Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + ".lic");
+ context.Response.End();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+
+ private void BindDropdowns()
+ {
+ var licenseTypeProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ var licTypes = licenseTypeProvider.GetProjectLicenses(_projectGuid).Select(x => new
+ {
+ Text = x.LicenseType.LicenseTypeAsString(),
+ Value = x.Id
+ });
+
+ Create_LicenseType.DataTextField = "Text";
+ Create_LicenseType.DataValueField = "Value";
+ Create_LicenseType.DataSource = licTypes;
+ Create_LicenseType.DataBind();
+
+
+ }
+
+ protected void CreateNew_Click(object sender, EventArgs e)
+ {
+ CreateNew.Visible = false;
+ CreateNewForm.Visible = true;
+ ConfigurationForm.Visible = false;
+ if (Create_LicenseType.SelectedItem.Text.ToLower() == "unlimited" || Create_LicenseType.SelectedItem.Text.ToLower() == "sourcecode")
+ {
+ CreateUnlimitedConfig.Visible = true;
+ CreateDomainIpConfig.Visible = false;
+ }
+ else
+ {
+ CreateUnlimitedConfig.Visible = false;
+ CreateDomainIpConfig.Visible = true;
+ }
+ }
+
+
+ protected void UpdateLicense_Click(object server, EventArgs e)
+ {
+ Create_LicenseError.Visible = false;
+ CreateNew.Visible = true;
+
+ var licenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ var licenseId = Int32.Parse(Configure_Id.Value);
+ var license = licenseProvider.GetLicenseById(licenseId);
+
+ var licenseTypeProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var licenseType = licenseTypeProvider.GetLicense(license.LicenseId);
+
+ if (licenseType.LicenseType != LicenseType.Unlimited)
+ {
+ license.DevConfig = Configure_DevConfig.Text;
+ license.StagingConfig = Configure_StagingConfig.Text;
+ license.ProductionConfig = Configure_ProductionConfig.Text;
+ }
+ else
+ {
+ license.DevConfig = "Unlimited";
+ license.StagingConfig = "Unlimited";
+ license.ProductionConfig = "Unlimited";
+ }
+ license.IsActive = true;
+
+ licenseProvider.SaveOrUpdate(license);
+ licenseProvider.GenerateLicenseFile(license);
+
+ if (string.IsNullOrEmpty(license.GeneratedLicense))
+ {
+ LicenseErrorMessage.Text = license.GeneratedLicense + " Please contact support for assistance";
+ Create_LicenseError.Visible = true;
+ }
+ else
+ {
+ Response.Redirect(Request.Url.OriginalString);
+ }
+ }
+
+ protected void CreateTypeChanged(object sender, EventArgs e)
+ {
+ var ddl = sender as DropDownList;
+ if (ddl.SelectedItem.Text.ToLower() == "unlimited" || ddl.SelectedItem.Text.ToLower() == "sourcecode")
+ {
+ CreateUnlimitedConfig.Visible = true;
+ CreateDomainIpConfig.Visible = false;
+ }
+ else
+ {
+ CreateUnlimitedConfig.Visible = false;
+ CreateDomainIpConfig.Visible = true;
+ }
+ }
+
+ protected void CreateLicense_Click(object server, EventArgs e)
+ {
+ Create_LicenseError.Visible = false;
+
+ var memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ var licenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ var licenseTypeProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+
+ var license = new MemberLicense();
+
+ //bit nasty but I cant think of a better way to catch an invalid member.
+ try {
+ var member = memberProvider.GetMemberByEmail(Create_MemberEmail.Text);
+ license.Member = member;
+ license.LicenseId = Convert.ToInt32(Create_LicenseType.SelectedValue);
+ license.ListingItemId = (int)ProjectId;
+
+ var licenseType = licenseTypeProvider.GetLicense(license.LicenseId);
+
+ if (licenseType.LicenseType != LicenseType.Unlimited)
+ {
+ license.DevConfig = Create_DevConfig.Text;
+ license.StagingConfig = Create_StagingConfig.Text;
+ license.ProductionConfig = Create_ProductionConfig.Text;
+ }
+ else
+ {
+ license.DevConfig = "Unlimited";
+ license.StagingConfig = "Unlimited";
+ license.ProductionConfig = "Unlimited";
+ }
+ license.CreateDate = DateTime.Now.ToUniversalTime();
+ license.IsActive = true;
+
+ licenseProvider.SaveOrUpdate(license);
+ licenseProvider.GenerateLicenseFile(license);
+ if (string.IsNullOrEmpty(license.GeneratedLicense))
+ {
+ LicenseErrorMessage.Text = license.GeneratedLicense + " Please contact support for assistance";
+ Create_LicenseError.Visible = true;
+ }
+ else
+ {
+ Create_LicenseError.Visible = false;
+ Create_InvalidMember.Visible = false;
+ Response.Redirect(Request.Url.OriginalString);
+ }
+ }
+ catch
+ {
+ Create_InvalidMember.Visible = true;
+ }
+ }
+
+ protected void Find_LicenseSubmit_Click(object sender, EventArgs e)
+ {
+ var term = Find_LicenseTerm.Text;
+ Find_Filter.Text = Find_LicenseTerm.Text;
+ FilteringByMessage.Visible = true;
+ Create_LicenseError.Visible = false;
+ CreateNew.Visible = true;
+ ConfigurationForm.Visible = false;
+ CreateNewForm.Visible = false;
+ BindLicenses(term);
+ Find_RecordsFound.Text = RP_Licenses.Items.Count.ToString();
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx.designer.cs b/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx.designer.cs
new file mode 100644
index 00000000..41d282fe
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/License/Vendor/ProjectLicenses.ascx.designer.cs
@@ -0,0 +1,366 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.License.Vendor {
+
+
+ public partial class ProjectLicenses {
+
+ ///
+ /// ProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectName;
+
+ ///
+ /// CreateNew control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button CreateNew;
+
+ ///
+ /// Create_LicenseError control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder Create_LicenseError;
+
+ ///
+ /// LicenseErrorMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LicenseErrorMessage;
+
+ ///
+ /// ConfigurationForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ConfigurationForm;
+
+ ///
+ /// ConfigurationLicenseType control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ConfigurationLicenseType;
+
+ ///
+ /// ConfigurationProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ConfigurationProjectName;
+
+ ///
+ /// ConfigurationMemberName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ConfigurationMemberName;
+
+ ///
+ /// Configure_Id control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField Configure_Id;
+
+ ///
+ /// DomainIpConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder DomainIpConfig;
+
+ ///
+ /// Label1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Configure_DevConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Configure_DevConfig;
+
+ ///
+ /// Label2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Configure_StagingConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Configure_StagingConfig;
+
+ ///
+ /// Label3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// Configure_ProductionConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Configure_ProductionConfig;
+
+ ///
+ /// UnlimitedConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder UnlimitedConfig;
+
+ ///
+ /// bt_Configure control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_Configure;
+
+ ///
+ /// CreateNewForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CreateNewForm;
+
+ ///
+ /// Label4 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// Create_LicenseType control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList Create_LicenseType;
+
+ ///
+ /// Label5 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// Create_MemberEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Create_MemberEmail;
+
+ ///
+ /// Create_InvalidMember control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder Create_InvalidMember;
+
+ ///
+ /// CreateDomainIpConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CreateDomainIpConfig;
+
+ ///
+ /// Label6 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label6;
+
+ ///
+ /// Create_DevConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Create_DevConfig;
+
+ ///
+ /// Label7 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label7;
+
+ ///
+ /// Create_StagingConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Create_StagingConfig;
+
+ ///
+ /// Label8 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label8;
+
+ ///
+ /// Create_ProductionConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Create_ProductionConfig;
+
+ ///
+ /// CreateUnlimitedConfig control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CreateUnlimitedConfig;
+
+ ///
+ /// bt_Create control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_Create;
+
+ ///
+ /// Find_LicenseTerm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Find_LicenseTerm;
+
+ ///
+ /// Find_LicenseSubmit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button Find_LicenseSubmit;
+
+ ///
+ /// FilteringByMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder FilteringByMessage;
+
+ ///
+ /// Find_RecordsFound control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal Find_RecordsFound;
+
+ ///
+ /// Find_Filter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal Find_Filter;
+
+ ///
+ /// RP_Licenses control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater RP_Licenses;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/ListPagination.ascx b/Marketplace/usercontrols/Deli/ListPagination.ascx
new file mode 100644
index 00000000..7c54d646
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ListPagination.ascx
@@ -0,0 +1 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListPagination.ascx.cs" Inherits="Marketplace.usercontrols.Deli.ListPagination" %>
diff --git a/Marketplace/usercontrols/Deli/ListPagination.ascx.cs b/Marketplace/usercontrols/Deli/ListPagination.ascx.cs
new file mode 100644
index 00000000..18836b8f
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ListPagination.ascx.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class ListPagination : System.Web.UI.UserControl
+ {
+ public int NumberOfPages { get; set; }
+ public int WindowSize { get; set; }
+
+ protected void Page_PreRender(object sender, EventArgs e)
+ {
+ if (NumberOfPages > 0)
+ {
+ if (WindowSize == 0)
+ {
+ WindowSize = 5;
+ }
+ //list to hold the generated links
+ List linklist = new List();
+ //get currentpage
+ int? currentPageNumber = 1;
+ if (!string.IsNullOrEmpty(Request.QueryString["page"]))
+ currentPageNumber = Int32.Parse(Request.QueryString["page"]);
+
+ //Create the new href retaining the current querystrings
+ string url = Request.Url.ToString();
+ if (!url.Contains("page"))
+ {
+ if (url.Contains('?')) url += "&page=";
+ else url += "?page=";
+ }
+ else
+ url = url.Replace("page=" + currentPageNumber, "page=");
+
+
+ if (String.IsNullOrEmpty(Request["ViewAll"]))
+ {
+ //Create the numerical links to be added to the place holder
+ int start = 1;
+ int end = NumberOfPages;
+
+ //int midPage = (int)currentPageNumber;
+ //midPage = Math.Max(midPage, (WindowSize / 2) + (WindowSize % 2 == 0 ? 0 : 1));
+ //// make sure the middle of the view is not too close to the start.
+ //midPage = Math.Min(midPage, NumberOfPages - (WindowSize / 2));
+ //// make sure the middle of the view is not too close to the end.
+ //end = midPage + (WindowSize / 2);
+ //midPage += ((WindowSize % 2 == 0) ? 1 : 0); // this has to be incremented before calculating the From.
+ //start = midPage - (WindowSize / 2);
+
+ //start = Math.Max(start, 1);
+
+ if (currentPageNumber > 1)
+ {
+ HyperLink prevLink = new HyperLink();
+ prevLink.Text = " < Previous ";
+ prevLink.NavigateUrl = url.Replace("page=", "page=" + (currentPageNumber - 1));
+ linklist.Add(prevLink);
+ }
+
+
+
+
+ //HyperLink startlink = CreateLink(url, 1, "first");
+ //linklist.Add(startlink);
+
+
+
+ for (int? i = start; i <= end; i++)
+ {
+ HyperLink PageLink = CreateLink(url, i);
+ linklist.Add(PageLink);
+
+
+ }
+
+ //HyperLink endlink = CreateLink(url, NumberOfPages, "last");
+ //linklist.Add(endlink);
+
+
+
+ //check for next
+ if (currentPageNumber < NumberOfPages)
+ {
+ HyperLink nextLink = new HyperLink();
+ nextLink.Text = " Next > ";
+ nextLink.NavigateUrl = url.Replace("page=", "page=" + (currentPageNumber + 1));
+ linklist.Add(nextLink);
+ }
+
+ Controls.Add(new Literal() { Text = "" });
+
+ foreach (HyperLink hl in linklist)
+ {
+ Controls.Add(new Literal() { Text = "" });
+ Controls.Add(hl);
+ Controls.Add(new Literal() { Text = " " });
+ }
+ Controls.Add(new Literal() { Text = " " });
+ }
+ else
+ {
+ Controls.Add(new Literal() { Text = "" });
+ Controls.Add(new Literal() { Text = "" });
+ Controls.Add(new HyperLink() { Text = "Paged Results", NavigateUrl = url.Replace("&page=", "").Replace("ViewAll=true", "page=1") });
+ Controls.Add(new Literal() { Text = " " });
+ Controls.Add(new Literal() { Text = " " });
+ }
+ }
+ }
+
+ private HyperLink CreateLink(string url, int? i, string text ="")
+ {
+ HyperLink PageLink = new HyperLink();
+ if (!string.IsNullOrEmpty(text))
+ PageLink.Text = " " + text + " ";
+ else
+ PageLink.Text = " " + i + " ";
+
+ PageLink.NavigateUrl = url.Replace("page=", "page=" + i.ToString());
+
+ //Check to see if link is current
+ if (!string.IsNullOrEmpty(Request.QueryString["page"]))
+ {
+ if (Int32.Parse(Request.QueryString["page"]) == i)
+ {
+ PageLink.Attributes.Add("class", "selected");
+ }
+ }
+ else if (i == 1)
+ {
+ PageLink.Attributes.Add("class", "selected");
+ }
+ return PageLink;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/ListPagination.ascx.designer.cs b/Marketplace/usercontrols/Deli/ListPagination.ascx.designer.cs
new file mode 100644
index 00000000..071ff174
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ListPagination.ascx.designer.cs
@@ -0,0 +1,15 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class ListPagination {
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/NewestProjects.ascx b/Marketplace/usercontrols/Deli/NewestProjects.ascx
new file mode 100644
index 00000000..7218e5aa
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/NewestProjects.ascx
@@ -0,0 +1,79 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NewestProjects.ascx.cs" Inherits="Marketplace.usercontrols.Deli.NewestProjects" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+<%@ Import Namespace="Marketplace.Providers.Helpers" %>
+<%@ Register Src="~/usercontrols/Deli/ListPagination.ascx" TagPrefix="deli" TagName="paging" %>
+
+
+
+
+
+
+
+
There are no listings that meet your filter criteria
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/NewestProjects.ascx.cs b/Marketplace/usercontrols/Deli/NewestProjects.ascx.cs
new file mode 100644
index 00000000..ffcf544e
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/NewestProjects.ascx.cs
@@ -0,0 +1,147 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class NewestProjects : UserControl
+ {
+ public int TotalListings { get; set; }
+ public int PageStartListingNumber { get; set; }
+ public int PageEndListingNumber { get; set; }
+
+ private string _listingType = "";
+ public string ListingType
+ {
+ get { return _listingType; }
+ set { _listingType = value; }
+ }
+
+ private int _maxPageSize = 20;
+ public int MaxPageSize
+ {
+ get { return _maxPageSize; }
+ set { _maxPageSize = value; }
+ }
+
+ private int _pageNumber;
+ public int PageNumber
+ {
+ get
+ {
+ if (_pageNumber > 0)
+ return _pageNumber - 1;
+
+ return _pageNumber;
+ }
+ set
+ {
+ _pageNumber = value;
+ }
+ }
+
+ public bool paged { get; set; }
+
+ protected void Page_PreRender(object sender, EventArgs e)
+ {
+ Bind_Data();
+ }
+
+ protected void Bind_Data()
+ {
+ var projectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ var skip = PageNumber * _maxPageSize;
+ var take = _maxPageSize;
+
+ IEnumerable projects;
+
+ if (paged == false)
+ {
+ switch (_listingType)
+ {
+ case "free":
+ projects = projectsProvider.GetListingsByLatest(0, take, Interfaces.ListingType.free, true);
+ break;
+
+ case "commercial":
+ projects = projectsProvider.GetListingsByLatest(0, take, Interfaces.ListingType.commercial, true);
+ break;
+
+ default:
+ projects = projectsProvider.GetListingsByLatest(0, take, true);
+ break;
+ }
+
+ ListingOpen.Visible = false;
+ ListingClose.Visible = false;
+ ProjectCounter.Visible = false;
+ paging.Visible = false;
+ }
+ else
+ {
+ int count;
+
+ switch (_listingType)
+ {
+ case "free":
+ projects = projectsProvider.GetListingsByLatest(skip, take, Interfaces.ListingType.free, true);
+ count = projectsProvider.Count(Interfaces.ListingType.free);
+ break;
+
+ case "commercial":
+ projects = projectsProvider.GetListingsByLatest(skip, take, Interfaces.ListingType.commercial, true);
+ count = projectsProvider.Count(Interfaces.ListingType.commercial);
+ break;
+
+ default:
+ projects = projectsProvider.GetListingsByLatest(skip, take, true);
+ count = projectsProvider.Count();
+ break;
+ }
+
+ if (count > _maxPageSize)
+ {
+ paging.Visible = true;
+
+ var numPages = (count / (decimal)_maxPageSize);
+ var intNumPages = Convert.ToInt32(numPages);
+
+ if (numPages % 1 > 0 && numPages % 1 <= (decimal)0.5)
+ {
+ intNumPages += 1;
+ }
+
+ paging.NumberOfPages = intNumPages;
+ }
+
+ var projectCount = projects.Count();
+
+ if (projectCount > 0)
+ {
+ ProjectCounter.Visible = true;
+ TotalListings = count;
+ PageStartListingNumber = skip + 1;
+ PageEndListingNumber = skip + projectCount;
+ }
+ else
+ {
+ ProjectCounter.Visible = false;
+ Listing.Visible = false;
+ NoListings.Visible = true;
+ }
+
+ ListingOpen.Visible = true;
+ ListingClose.Visible = true;
+ WidgetTitle.Visible = false;
+ WidgetFeatures.Visible = false;
+ }
+
+ Listing.DataSource = projects;
+ Listing.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/NewestProjects.ascx.designer.cs b/Marketplace/usercontrols/Deli/NewestProjects.ascx.designer.cs
new file mode 100644
index 00000000..58409b66
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/NewestProjects.ascx.designer.cs
@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class NewestProjects {
+
+ ///
+ /// ListingOpen control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ListingOpen;
+
+ ///
+ /// WidgetTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder WidgetTitle;
+
+ ///
+ /// WidgetFeatures control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder WidgetFeatures;
+
+ ///
+ /// ProjectCounter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ProjectCounter;
+
+ ///
+ /// Listing control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater Listing;
+
+ ///
+ /// ListingClose control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ListingClose;
+
+ ///
+ /// NoListings control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder NoListings;
+
+ ///
+ /// paging control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.usercontrols.Deli.ListPagination paging;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Package/Editor.ascx b/Marketplace/usercontrols/Deli/Package/Editor.ascx
new file mode 100644
index 00000000..ab9a8c5c
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Editor.ascx
@@ -0,0 +1,14 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Editor.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Package.Editor" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Package/Editor.ascx.cs b/Marketplace/usercontrols/Deli/Package/Editor.ascx.cs
new file mode 100644
index 00000000..438f1ce7
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Editor.ascx.cs
@@ -0,0 +1,168 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using umbraco.IO;
+using Marketplace.BusinessLogic.ListingCreator;
+using Marketplace.BusinessLogic.ListingCreator.StepDefinitions;
+using Marketplace.Providers;
+using Marketplace.Interfaces;
+using umbraco.cms.businesslogic.member;
+using our;
+
+namespace Marketplace.usercontrols.Deli.Package
+{
+ public partial class Editor : System.Web.UI.UserControl
+ {
+ private string _currentStep = "";
+ private static IVendor _vendor;
+ private static IListingItem _project;
+ public string _currentStepClass = "current";
+
+ private int? _projectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ return Int32.Parse(Request["id"]);
+ }
+ return null;
+ }
+ }
+
+
+ protected void Page_Load(object sender, System.EventArgs e)
+ {
+ StepNavigation.DataSource = ListingSteps().Values;
+ StepNavigation.DataBind();
+ }
+
+
+ private void loadContent(ListingCreatorStep currentStep)
+ {
+ StepPlaceHolder.Controls.Clear();
+ var controlToLoad = new System.Web.UI.UserControl().LoadControl(IOHelper.ResolveUrl(currentStep.UserControl));
+
+ if (currentStep.Alias == "details")
+ ((Marketplace.usercontrols.Deli.Package.Steps.Details)controlToLoad).IsDeliVendor = _vendor.Member.IsDeliVendor;
+
+ StepPlaceHolder.Controls.Add(controlToLoad);
+ Step.Value = currentStep.Alias;
+ _currentStep = currentStep.Alias;
+ }
+
+ int stepCounter = 0;
+
+
+ protected void bindStep(object sender, RepeaterItemEventArgs e)
+ {
+
+ if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
+ {
+ ListingCreatorStep i = (ListingCreatorStep)e.Item.DataItem;
+
+ if (!i.HideFromNavigation)
+ {
+ Literal _class = (Literal)e.Item.FindControl("lt_class");
+ Literal _name = (Literal)e.Item.FindControl("lt_name");
+
+ if (i.Alias == _currentStep)
+ _class.Text = _currentStepClass;
+
+
+ stepCounter++;
+ _name.Text = i.Name;
+
+
+ //setup links to move back and forward through steps
+ if (_projectId != null)
+ {
+ _name.Text = string.Format("{0} ", _name.Text);
+ }
+ }
+ else
+ e.Item.Visible = false;
+ }
+ }
+
+
+ public void GotoNextStep(string currentStep, int projectId)
+ {
+ ListingSteps().Get(currentStep).Completed = true;
+ ListingCreatorStep _s = ListingSteps().GotoNextStep(currentStep);
+ Response.Redirect("edit?editorStep=" + _s.Alias + "&id=" + projectId);
+ }
+
+ public void GoToPreviousStep(string currentStep, int projectId)
+ {
+ ListingCreatorStep _s = ListingSteps().GotoPreviousStep(currentStep);
+ Response.Redirect("edit?editorStep=" + _s.Alias + "&id=" + projectId);
+ }
+
+
+ #region Web Form Designer generated code
+ override protected void OnInit(EventArgs e)
+ {
+ InitializeComponent();
+ base.OnInit(e);
+
+
+
+ _vendor = ((IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"]).GetVendorById(Member.GetCurrentMember().Id);
+
+ if (_projectId != null)
+ {
+ _project = ((IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"]).GetListing((int)_projectId);
+
+
+ //check security to make sure the project belongs to the vendor
+ if (!((_project.Vendor.Member.Id == _vendor.Member.Id) || Utills.IsProjectContributor(_vendor.Member.Id, (int)_projectId)))
+ {
+ //this project does not belong to this member so kick them back to the project list in their profile.
+ Response.Redirect("~/member/profile/projects/");
+ }
+ }
+
+ _currentStep = umbraco.helper.Request("editorStep");
+
+ ListingCreatorStep _s;
+
+ if (string.IsNullOrEmpty(_currentStep))
+ _s = ListingSteps()["details"];
+ else
+ _s = ListingSteps()[_currentStep];
+
+ loadContent(_s);
+ }
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+
+ }
+ #endregion
+
+
+
+ private static ListingCreatorStepCollection ListingSteps()
+ {
+ ListingCreatorStepCollection lcs = new ListingCreatorStepCollection();
+ lcs.Add(new Details(), _vendor.Member.IsDeliVendor);
+ lcs.Add(new Files(), _vendor.Member.IsDeliVendor);
+ lcs.Add(new Screenshots(), _vendor.Member.IsDeliVendor);
+
+ //only add the licensing step is the project is commercial
+ if (_project != null)
+ lcs.Add(new Licenses(), (_project.ListingType == ListingType.commercial && _vendor.Member.IsDeliVendor));
+
+ lcs.Add(new Complete(), _vendor.Member.IsDeliVendor);
+ return lcs;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Editor.ascx.designer.cs b/Marketplace/usercontrols/Deli/Package/Editor.ascx.designer.cs
new file mode 100644
index 00000000..cadbd376
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Editor.ascx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Package {
+
+
+ public partial class Editor {
+
+ ///
+ /// StepNavigation control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater StepNavigation;
+
+ ///
+ /// Step control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ public global::System.Web.UI.HtmlControls.HtmlInputHidden Step;
+
+ ///
+ /// StepPlaceHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder StepPlaceHolder;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx b/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx
new file mode 100644
index 00000000..8655149d
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx
@@ -0,0 +1,22 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Complete.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Package.Steps.Complete" %>
+
+
+Complete and Send Live
+
+
+
+
+
+ Make " " public
+ By checking the following box your project will become public as long as you have met all of the terms & conditions of listing. If there are any problems displayed above please recitify and try again.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx.cs b/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx.cs
new file mode 100644
index 00000000..db528ede
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.BusinessLogic;
+using Marketplace.Helpers;
+
+namespace Marketplace.usercontrols.Deli.Package.Steps
+{
+ public partial class Complete : System.Web.UI.UserControl
+ {
+ public string NotificationClass;
+
+ private int? _projectId;
+ public int? ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ IListingItem project = provider.GetListing((int)ProjectId);
+ var eligible = Listing.CheckEligibility(project);
+ NotificationMessage.Text = eligible.Message;
+ NotificationClass = (eligible.IsEligible) ? "eligible" : "notEligible";
+
+ ProjectName.Text = project.Name;
+
+ Live.Checked = project.Live;
+
+
+ if (!eligible.IsEligible)
+ {
+ MoveNext.Enabled = false;
+ }
+ }
+
+
+ }
+
+ protected void Complete_Click(object sender, EventArgs e)
+ {
+ var ProjectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = ProjectsProvider.GetListing((int)ProjectId);
+ project.Live = Live.Checked;
+ ProjectsProvider.SaveOrUpdate(project);
+ Response.Redirect(project.NiceUrl);
+ }
+
+ protected void MoveLast(object sender, EventArgs e)
+ {
+ //move to the license / screenshot step
+ ProjectCreatorHelper.MoveToPreviousStep(this, (int)ProjectId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx.designer.cs b/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx.designer.cs
new file mode 100644
index 00000000..c8e01c36
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Complete.ascx.designer.cs
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Package.Steps {
+
+
+ public partial class Complete {
+
+ ///
+ /// eligibilityNotice control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder eligibilityNotice;
+
+ ///
+ /// NotificationMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal NotificationMessage;
+
+ ///
+ /// ProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectName;
+
+ ///
+ /// Live control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox Live;
+
+ ///
+ /// MovePrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton MovePrevious;
+
+ ///
+ /// MoveNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button MoveNext;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx b/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx
new file mode 100644
index 00000000..ebf65837
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx
@@ -0,0 +1,148 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Details.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Package.Steps.Details" %>
+
+Project Details
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx.cs b/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx.cs
new file mode 100644
index 00000000..299d45aa
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Providers.Helpers;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.ListingItem;
+using Marketplace.BusinessLogic.ListingCreator;
+using umbraco.cms.businesslogic.member;
+using Marketplace.BusinessLogic;
+using Marketplace.Helpers;
+using umbraco.NodeFactory;
+using System.Text.RegularExpressions;
+
+namespace Marketplace.usercontrols.Deli.Package.Steps
+{
+ public partial class Details : System.Web.UI.UserControl
+ {
+
+ public bool IsDeliVendor { get; set; }
+
+ private bool _editMode
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ return true;
+ }
+ return false;
+ }
+ }
+
+
+ private int? _projectId;
+ public int? ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+ protected override void OnInit(EventArgs e)
+ {
+ ((umbraco.UmbracoDefault)this.Page).ValidateRequest = false;
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ umbraco.library.RegisterJavaScriptFile("tinyMce", "/scripts/tiny_mce/tiny_mce_src.js");
+ if (!IsPostBack)
+ {
+ SetupTags();
+ BindCategories();
+
+ //if the user is a registered deli vendor show them the commercial options
+ CommercialOption.Visible = IsDeliVendor;
+
+
+ if (_editMode)
+ {
+ MoveNext.Text = "Save";
+ LoadProject();
+ }
+ else
+ {
+ MoveNext.Text = "Next";
+ }
+
+
+ }
+
+
+ }
+
+ private void SetupTags()
+ {
+ string taglist = string.Empty;
+ var tagProvider = ((IProjectTagProvider)MarketplaceProviderManager.Providers["TagProvider"]);
+ var tags = tagProvider.GetAllTags();
+ foreach(var t in tags)
+ {
+ taglist += "\"" + t.Text + "\",";
+ }
+
+ ScriptManager.RegisterStartupScript(
+ this,
+ this.GetType(),
+ "inittagsuggest",
+ " $(document).ready(function() { $('#projecttagger').autocomplete([" + taglist + "],{max: 8,scroll: true,scrollHeight: 300}); enableTagger();});",
+ true);
+ }
+
+
+ private void BindCategories()
+ {
+ var Categories = ((ICategoryProvider)MarketplaceProviderManager.Providers["CategoryProvider"]).GetAllCategories().Where(x => !x.HQOnly);
+ Category.DataSource = Categories;
+ Category.DataValueField = "Id";
+ Category.DataTextField = "Name";
+ Category.DataBind();
+ }
+
+ protected void LoadProject()
+ {
+ var ProjectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = ProjectsProvider.GetListing((int)ProjectId);
+
+ Title.Text = project.Name;
+ Description.Text = project.Description;
+ CurrentVersion.Text = project.CurrentVersion;
+ DevStatus.Text = project.DevelopmentStatus;
+ Stable.Checked = project.Stable;
+ CommercialOrFree.SelectedValue = project.ListingType.ListingTypeAsString();
+ LicenseName.Text = project.LicenseName;
+ LicenseUrl.Text = project.LicenseUrl;
+ ProjectUrl.Text = project.ProjectUrl;
+ SourceCodeUrl.Text = project.SourceCodeUrl;
+ DemoUrl.Text = project.DemonstrationUrl;
+ Category.SelectedValue = project.CategoryId.ToString();
+ SupportUrl.Text = project.SupportUrl;
+ GaCode.Text = project.GACode;
+ Collab.Checked = project.OpenForCollab;
+ Terms.Checked = project.TermsAgreementDate != new DateTime();
+
+
+
+ var tagProvider = ((IProjectTagProvider)MarketplaceProviderManager.Providers["TagProvider"]);
+ var projecttags = tagProvider.GetTagsByProjectId((int)ProjectId);
+
+ if (projecttags.Count() > 0)
+ {
+ string stags = string.Empty;
+ foreach (var tag in projecttags)
+ {
+ stags += tag.Text + ",";
+ }
+
+ stags = stags.Substring(0, stags.Length - 1);
+
+ ScriptManager.RegisterStartupScript(
+ this,
+ this.GetType(),
+ "inittags",
+ " $(document).ready(function() {$('#projecttagger').addTag('" + stags + "');});",
+ true);
+ }
+
+
+
+ }
+
+
+ protected void SaveStep(object sender, EventArgs e)
+ {
+ var ProjectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = (_editMode) ? ProjectsProvider.GetListing((int)ProjectId) : new ListingItem(null,null,null);
+
+ project.Name = Title.Text;
+ project.Description = Description.Text;
+ project.CurrentVersion = CurrentVersion.Text;
+ project.DevelopmentStatus = DevStatus.Text;
+ project.Stable = Stable.Checked;
+ project.LicenseName = LicenseName.Text;
+ project.LicenseUrl = LicenseUrl.Text;
+ project.ProjectUrl = ProjectUrl.Text;
+ project.SourceCodeUrl = SourceCodeUrl.Text;
+ project.DemonstrationUrl = DemoUrl.Text;
+ project.CategoryId = Int32.Parse(Category.SelectedValue);
+ project.SupportUrl = SupportUrl.Text;
+
+ if (!_editMode)
+ {
+ project.Vendor = ((IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"]).GetVendorById(Member.GetCurrentMember().Id);
+ }
+
+ project.OpenForCollab = Collab.Checked;
+ project.GACode = GaCode.Text;
+ project.ProjectGuid = (project.ProjectGuid == Guid.Empty)?Guid.NewGuid():project.ProjectGuid; //this is used as the Unique project ID.
+ project.ListingType = (CommercialOption.Visible) ? (ListingType)Enum.Parse(typeof(ListingType), (string)CommercialOrFree.SelectedValue, true) : ListingType.free;
+
+ project.TermsAgreementDate = DateTime.Now.ToUniversalTime();
+
+ ProjectsProvider.SaveOrUpdate(project);
+ ProjectId = project.Id;
+
+ if (Request["projecttags[]"] != null)
+ {
+ var tagProvider = ((IProjectTagProvider)MarketplaceProviderManager.Providers["TagProvider"]);
+ tagProvider.SetTags(project.Id, Request["projecttags[]"].ToString());
+ project.Tags = tagProvider.GetTagsByProjectId(project.Id);
+ ProjectsProvider.SaveOrUpdate(project);
+ }
+
+ //move to the file upload step
+ ProjectCreatorHelper.MoveToNextStep(this, (int)ProjectId);
+
+
+ }
+
+ protected string[] GetSelected(ListBox lb)
+ {
+ var strArr = "";
+ foreach(ListItem li in lb.Items){
+ if(li.Selected) strArr+=li.Value + ",";
+ }
+
+ return strArr.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx.designer.cs b/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx.designer.cs
new file mode 100644
index 00000000..fcb3f1cf
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Details.ascx.designer.cs
@@ -0,0 +1,186 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Package.Steps {
+
+
+ public partial class Details {
+
+ ///
+ /// Title control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Title;
+
+ ///
+ /// DevStatus control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox DevStatus;
+
+ ///
+ /// CommercialOption control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CommercialOption;
+
+ ///
+ /// CommercialOrFree control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList CommercialOrFree;
+
+ ///
+ /// CurrentVersion control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox CurrentVersion;
+
+ ///
+ /// Stable control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox Stable;
+
+ ///
+ /// Category control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList Category;
+
+ ///
+ /// Description control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox Description;
+
+ ///
+ /// LicenseName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox LicenseName;
+
+ ///
+ /// LicenseUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox LicenseUrl;
+
+ ///
+ /// ProjectUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox ProjectUrl;
+
+ ///
+ /// DemoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox DemoUrl;
+
+ ///
+ /// SourceCodeUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox SourceCodeUrl;
+
+ ///
+ /// SupportUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox SupportUrl;
+
+ ///
+ /// GaCode control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox GaCode;
+
+ ///
+ /// Collab control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox Collab;
+
+ ///
+ /// LegalDisplay control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder LegalDisplay;
+
+ ///
+ /// Terms control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox Terms;
+
+ ///
+ /// MoveNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button MoveNext;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx b/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx
new file mode 100644
index 00000000..da91000e
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx
@@ -0,0 +1,237 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Files.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Package.Steps.Files" %>
+Files
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx.cs b/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx.cs
new file mode 100644
index 00000000..69bcd500
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx.cs
@@ -0,0 +1,315 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using our;
+using Marketplace.BusinessLogic;
+using Marketplace.Umbraco.BusinessLogic;
+using Marketplace.Providers.Helpers;
+using Marketplace.Helpers;
+using Marketplace.Providers.MediaFile;
+
+namespace Marketplace.usercontrols.Deli.Package.Steps
+{
+ public partial class Files : System.Web.UI.UserControl
+ {
+
+ public string MemberGuid = "";
+ public string ProjectGuid = "";
+
+ private int? _projectId;
+ public int? ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+ private string _defaultFile
+ {
+ get;
+ set;
+ }
+
+
+ //called after upload.
+ private void RebindFiles()
+ {
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+ var files = fileProvider.GetMediaFilesByProjectId((int)ProjectId).Where(x => x.FileType != FileType.screenshot);
+ if (string.IsNullOrEmpty(_defaultFile))
+ {
+ var defaultFile = files.OrderByDescending(x => x.CreateDate).FirstOrDefault();
+
+ if (defaultFile != null)
+ {
+ MarkFileAsCurrent(defaultFile.Id.ToString());
+ }
+ }
+
+
+ rp_packagefiles.DataSource = files;
+ rp_packagefiles.Visible = (files.Count() > 0);
+ rp_packagefiles.DataBind();
+ }
+
+
+ protected void DeleteFile(object sender, CommandEventArgs e)
+ {
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+ var f = fileProvider.GetFileById(int.Parse(e.CommandArgument.ToString()));
+
+ var mem = Member.GetCurrentMember();
+
+ if (f.CreatedBy == mem.Id || Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+
+ //if the file is the default file we need to clear it out of the system to stop it showing as the default download
+ if (f.Id.ToString() == _defaultFile)
+ {
+ _defaultFile = string.Empty;
+ var listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = listingProvider.GetListing((int)ProjectId);
+ project.CurrentReleaseFile = _defaultFile;
+ listingProvider.SaveOrUpdate(project);
+
+ }
+ fileProvider.Remove(f);
+
+ RebindFiles();
+ }
+
+ protected void ArchiveFile(object sender, CommandEventArgs e)
+ {
+
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+ var f = fileProvider.GetFileById(int.Parse(e.CommandArgument.ToString()));
+
+ if (e.CommandName == "Unarchive")
+ {
+ f.Archived = false;
+ }
+ else
+ {
+ f.Archived = true;
+ }
+
+ fileProvider.SaveOrUpdate(f);
+ RebindFiles();
+ }
+
+ protected void OnFileBound(object sender, RepeaterItemEventArgs e)
+ {
+ if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
+ {
+ IMediaFile f = (IMediaFile)e.Item.DataItem;
+ Literal _name = (Literal)e.Item.FindControl("lt_name");
+ Literal _date = (Literal)e.Item.FindControl("lt_date");
+ Button _delete = (Button)e.Item.FindControl("bt_delete");
+ Literal _type = (Literal)e.Item.FindControl("lt_type");
+ Literal _version = (Literal)e.Item.FindControl("lt_version");
+ Literal _dotNetVersion = (Literal)e.Item.FindControl("lt_dotNetVersion");
+ Literal _trustLevel = (Literal)e.Item.FindControl("lt_trustlevel");
+ Literal _currentRelease = (Literal)e.Item.FindControl("lt_currentRelease");
+
+ Button _defaultPackageFile = (Button)e.Item.FindControl("bt_default");
+ if (f.FileType == FileType.package)
+ {
+ if (f.Id.ToString() == _defaultFile)
+ {
+ _defaultPackageFile.Visible = false;
+ _currentRelease.Visible = true;
+ _currentRelease.Text = "Current";
+ }
+ else
+ {
+ _defaultPackageFile.Text = "Make Current";
+ _defaultPackageFile.CommandArgument = f.Id.ToString();
+ _currentRelease.Visible = false;
+ }
+ }
+ else
+ {
+ _defaultPackageFile.Visible = false;
+ _currentRelease.Visible = false;
+
+ }
+
+
+ Button _archive = (Button)e.Item.FindControl("bt_archive");
+ _archive.CommandArgument = f.Id.ToString();
+
+
+ if (f.Archived)
+ {
+ _archive.Text = "Unarchive";
+ _archive.CommandName = "Unarchive";
+ }
+ else
+ {
+ _archive.Text = "Archive";
+ _archive.CommandName = "Archive";
+ }
+
+ if (f.FileType == FileType.screenshot)
+ {
+ _archive.Visible = false;
+ }
+
+ if (f.UmbVersion != null)
+ _version.Text = f.UmbVersion.ToVersionString();
+
+ if (f.DotNetVersion != null)
+ _dotNetVersion.Text = f.DotNetVersion;
+
+ _trustLevel.Text = (f.SupportsMediumTrust)?"Medium":"Full";
+
+
+ switch (f.FileType)
+ {
+ case FileType.screenshot:
+ _type.Text = "Screenshot";
+ break;
+ case FileType.package:
+ _type.Text = "Package";
+ break;
+ case FileType.hotfix:
+ _type.Text = "Hot Fix";
+ break;
+ case FileType.docs:
+ _type.Text = "Document";
+ break;
+ case FileType.source:
+ _type.Text = "Source";
+ break;
+ default:
+ break;
+ }
+
+ _name.Text = "" + f.Name + " ";
+ _date.Text = f.CreateDate.ToShortDateString() + " - " + f.CreateDate.ToShortTimeString();
+ _delete.CommandArgument = f.Id.ToString();
+
+ }
+ }
+
+ protected void SetDefaultPackage(object sender, CommandEventArgs e)
+ {
+ var releaseFile = e.CommandArgument.ToString();
+ MarkFileAsCurrent(releaseFile);
+ RebindFiles();
+ }
+
+ private void MarkFileAsCurrent(string releaseFile)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ IListingItem project = provider.GetListing((int)ProjectId);
+ project.CurrentReleaseFile = releaseFile;
+ provider.SaveOrUpdate(project);
+ _defaultFile = project.CurrentReleaseFile;
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+
+ if (umbraco.library.IsLoggedOn() && ProjectId != null)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ Member mem = Member.GetCurrentMember();
+ IListingItem project = provider.GetListing((int)ProjectId);
+ _defaultFile = project.CurrentReleaseFile;
+
+
+
+
+ if ((project.Vendor.Member.Id == mem.Id) ||
+ Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+ {
+ holder.Visible = true;
+ RebindFiles();
+
+ umbraco.library.RegisterJavaScriptFile("swfUpload", "/scripts/swfupload/SWFUpload.js");
+ umbraco.library.RegisterJavaScriptFile("swfUpload_cb", "/scripts/swfupload/callbacks.js");
+ umbraco.library.RegisterJavaScriptFile("swfUpload_progress", "/scripts/swfupload/fileprogress.js");
+
+ MemberGuid = mem.UniqueId.ToString();
+ ProjectGuid = project.ProjectGuid.ToString();
+
+ string defaultVersion = UmbracoVersion.DefaultVersion().Version;
+ string umboptions = "";
+
+ foreach (UmbracoVersion uv in UmbracoVersion.AvailableVersions().Values)
+ {
+ string selected = "checked='true'";
+ if (uv.Version != defaultVersion)
+ selected = "";
+ umboptions += string.Format(" {1}", uv.Version, uv.Name, selected);
+ }
+
+ lt_versions.Text = umboptions;
+
+
+ string[] dotnetversions = {"2.0","3.5","4.0"};
+ string dotnetoptions = string.Empty;
+
+ foreach (var opt in dotnetversions)
+ {
+ string selected = "selected='true'";
+ if (opt != "4.0")
+ selected = "";
+ dotnetoptions += string.Format("{1} ", opt, opt, selected);
+
+ }
+
+ lt_dotnetversions.Text = dotnetoptions;
+
+
+ string[] trustlevels = { "Full", "Medium" };
+ string trustoptions = string.Empty;
+
+ foreach (var opt in trustlevels)
+ {
+ string selected = "selected='true'";
+ if (opt != "Full")
+ selected = "";
+ trustoptions += string.Format("{1} ", opt, opt, selected);
+
+ }
+
+ lt_trustlevels.Text = trustoptions;
+
+
+
+ }
+
+
+ }
+
+ }
+
+ protected void SaveStep(object sender, EventArgs e)
+ {
+ //move to the file upload step
+ ProjectCreatorHelper.MoveToNextStep(this,(int)ProjectId);
+ }
+ protected void MoveLast(object sender, EventArgs e)
+ {
+ //move to the details step
+ ProjectCreatorHelper.MoveToPreviousStep(this, (int)ProjectId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx.designer.cs b/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx.designer.cs
new file mode 100644
index 00000000..93ac7b64
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Files.ascx.designer.cs
@@ -0,0 +1,78 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Package.Steps {
+
+
+ public partial class Files {
+
+ ///
+ /// holder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder holder;
+
+ ///
+ /// rp_packagefiles control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater rp_packagefiles;
+
+ ///
+ /// lt_versions control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lt_versions;
+
+ ///
+ /// lt_dotnetversions control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lt_dotnetversions;
+
+ ///
+ /// lt_trustlevels control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lt_trustlevels;
+
+ ///
+ /// MovePrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton MovePrevious;
+
+ ///
+ /// MoveNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button MoveNext;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx b/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx
new file mode 100644
index 00000000..fbf445fd
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx
@@ -0,0 +1,138 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Licenses.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Package.Steps.Licenses" %>
+Licenses
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx.cs b/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx.cs
new file mode 100644
index 00000000..435f751a
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx.cs
@@ -0,0 +1,267 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using our;
+using Marketplace.Providers.License;
+using Marketplace.Providers.Helpers;
+using Marketplace.Helpers;
+using Marketplace.Providers.Accounting;
+using System.Text.RegularExpressions;
+
+namespace Marketplace.usercontrols.Deli.Package.Steps
+{
+ public partial class Licenses : System.Web.UI.UserControl
+ {
+ private Guid _projectGuid;
+
+
+ private bool _editMode
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["projectId"]))
+ {
+ return true;
+ }
+ return false;
+ }
+ }
+
+ private int? _projectId;
+ public int? ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+
+ private void ReBindLicenses()
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var licenses = licenseProvider.GetProjectLicenses(_projectGuid);
+ rp_licenses.DataSource = licenses;
+ rp_licenses.Visible = (licenses.Count() > 0);
+ rp_licenses.DataBind();
+ }
+
+ protected void EditLicense(object sender, CommandEventArgs e)
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var license = licenseProvider.GetLicense(int.Parse(e.CommandArgument.ToString()));
+ EditForm.Visible = true;
+ CreateForm.Visible = false;
+ EditLicenseType.Text = license.LicenseType.ToString();
+ EditLicensePrice.Text = license.Price.ToString();
+ UpdateLicense.CommandArgument = license.Id.ToString();
+ }
+
+ protected void UpdateLicense_Click(object sender, EventArgs e)
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var updateButton = sender as Button;
+ var licenseId = Int32.Parse(updateButton.CommandArgument);
+
+ var license = licenseProvider.GetLicense(licenseId);
+
+ license.Price = Double.Parse(EditLicensePrice.Text);
+ licenseProvider.SaveOrUpdate(license);
+ EditForm.Visible = false;
+ CreateForm.Visible = true;
+
+ ReBindLicenses();
+
+ }
+
+
+ protected void DeleteLicense(object sender, CommandEventArgs e)
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var license = licenseProvider.GetLicense(int.Parse(e.CommandArgument.ToString()));
+
+ var memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ if (memberLicenseProvider.GetLicensesByLicenseTypeId(license.Id).Count() == 0)
+ {
+ licenseProvider.Remove(license);
+ }
+
+ //var mem = Member.GetCurrentMember();
+ //if (license.CreatedBy == mem.Id || Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+
+
+
+ ReBindLicenses();
+ }
+
+ protected void DisableEnableLicense(object sender, CommandEventArgs e)
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var license = licenseProvider.GetLicense(int.Parse(e.CommandArgument.ToString()));
+
+ license.IsActive = (license.IsActive) ? false : true;
+
+ licenseProvider.SaveOrUpdate(license);
+
+ ReBindLicenses();
+ }
+
+ protected void OnLicenseBound(object sender, RepeaterItemEventArgs e)
+ {
+ if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
+ {
+
+ ILicense lic = (ILicense)e.Item.DataItem;
+ Button _delete = (Button)e.Item.FindControl("bt_delete");
+ Button _edit = (Button)e.Item.FindControl("bt_edit");
+ Button _disable = (Button)e.Item.FindControl("bt_disableEnable");
+ Literal _type = (Literal)e.Item.FindControl("lt_type");
+ Literal _price = (Literal)e.Item.FindControl("lt_price");
+
+ switch (lic.LicenseType)
+ {
+ case LicenseType.Domain:
+ _type.Text = "Domain";
+ break;
+ case LicenseType.IP:
+ _type.Text = "IP";
+ break;
+ case LicenseType.Unlimited:
+ _type.Text = "Unlimited";
+ break;
+ case LicenseType.SourceCode:
+ _type.Text = "Source Code";
+ break;
+ default:
+ break;
+ }
+
+ _price.Text = DeliCurrency.NiceMoney((decimal)lic.Price, DeliCurrency.FromSymbol("EUR"));
+
+ _delete.CommandArgument = lic.Id.ToString();
+ _disable.CommandArgument = lic.Id.ToString();
+ _edit.CommandArgument = lic.Id.ToString();
+
+ if (lic.IsActive)
+ {
+ _disable.Text = "Disable";
+ }
+ else
+ {
+ _disable.Text = "Enable";
+ }
+
+ var memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["MemberLicenseProvider"];
+ if (memberLicenseProvider.GetLicensesByLicenseTypeId(lic.Id).Count() == 0)
+ {
+ _delete.Visible = true;
+ }
+
+ }
+ }
+
+
+
+ protected void SaveLicense_Click(object sender, EventArgs e)
+ {
+ var lic = new Marketplace.Providers.License.License();
+ lic.LicenseType = (LicenseType)Enum.Parse(typeof(LicenseType), (string)licenseTypes.SelectedValue, true);
+ lic.Price = double.Parse(price.Text);
+ lic.ProjectGuid = _projectGuid;
+
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ licenseProvider.SaveOrUpdate(lic);
+
+ ReBindLicenses();
+
+ }
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (umbraco.library.IsLoggedOn() && ProjectId != null)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ Member mem = Member.GetCurrentMember();
+ IListingItem project = provider.GetListing((int)ProjectId);
+
+ DownloadKeyPlaceHolder.Visible = !string.IsNullOrEmpty(project.LicenseKey);
+ GenKeyPlaceHolder.Visible = string.IsNullOrEmpty(project.LicenseKey);
+
+ _projectGuid = project.ProjectGuid;
+
+ if ((project.Vendor.Member.Id == mem.Id) ||
+ Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+ {
+ holder.Visible = true;
+ ReBindLicenses();
+ uniqueId.Text = _projectGuid.ToString();
+ }
+ }
+ }
+
+ protected void GenKey_Click(object sender, EventArgs e)
+ {
+ GenKeyPlaceHolder.Visible = false;
+ DownloadKeyPlaceHolder.Visible = true;
+
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = provider.GetListing(_projectGuid);
+
+ var licenseGenerator = new Marketplace.Providers.MemberLicense.MemberLicenseGenerator();
+ var projectName = Regex.Replace(project.Vendor.VendorCompanyName, @"[\W]", "")
+ + Regex.Replace(project.Name, @"[\W]", "");
+ project.LicenseKey = licenseGenerator.GenerateXMLKey(projectName.ToLower(), project.ProjectGuid.ToString());
+ provider.SaveOrUpdate(project);
+ }
+
+ protected void DownloadKey_Click(object sender, EventArgs e)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var project = provider.GetListing(_projectGuid);
+
+ if (!string.IsNullOrEmpty(project.LicenseKey))
+ {
+ var licenseGenerator = new Marketplace.Providers.MemberLicense.MemberLicenseGenerator();
+ var licenseKey = licenseGenerator.GenerateVendorKey(project.LicenseKey);
+
+ // the license key file name
+ var projectName = Regex.Replace(project.Vendor.VendorCompanyName, @"[\W]", "")
+ + Regex.Replace(project.Name, @"[\W]", "");
+
+ HttpContext context = HttpContext.Current;
+ context.Response.Clear();
+ context.Response.Write(licenseKey);
+ context.Response.ContentType = "text/xml";
+ context.Response.AppendHeader("Content-Disposition", "attachment; filename=" + projectName.ToLower() + ".ils");
+ context.Response.End();
+ }
+ }
+
+ protected void SaveStep(object sender, EventArgs e)
+ {
+ //move to the license step
+ ProjectCreatorHelper.MoveToNextStep(this, (int)ProjectId);
+ }
+
+ protected void MoveLast(object sender, EventArgs e)
+ {
+ //move to the screenshots step
+ ProjectCreatorHelper.MoveToPreviousStep(this, (int)ProjectId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx.designer.cs b/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx.designer.cs
new file mode 100644
index 00000000..41f492fe
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Licenses.ascx.designer.cs
@@ -0,0 +1,168 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Package.Steps {
+
+
+ public partial class Licenses {
+
+ ///
+ /// holder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder holder;
+
+ ///
+ /// EditForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder EditForm;
+
+ ///
+ /// EditLicenseType control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox EditLicenseType;
+
+ ///
+ /// EditLicensePrice control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox EditLicensePrice;
+
+ ///
+ /// UpdateLicense control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button UpdateLicense;
+
+ ///
+ /// rp_licenses control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater rp_licenses;
+
+ ///
+ /// CreateForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CreateForm;
+
+ ///
+ /// licenseTypes control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList licenseTypes;
+
+ ///
+ /// price control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox price;
+
+ ///
+ /// btn_SaveLicense control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btn_SaveLicense;
+
+ ///
+ /// GenKeyPlaceHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder GenKeyPlaceHolder;
+
+ ///
+ /// GenKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton GenKey;
+
+ ///
+ /// DownloadKeyPlaceHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder DownloadKeyPlaceHolder;
+
+ ///
+ /// DownloadKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton DownloadKey;
+
+ ///
+ /// uniqueId control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal uniqueId;
+
+ ///
+ /// MovePrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton MovePrevious;
+
+ ///
+ /// MoveNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button MoveNext;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx b/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx
new file mode 100644
index 00000000..8febd29d
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx
@@ -0,0 +1,150 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Screenshots.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Package.Steps.Screenshots" %>
+Screenshots
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx.cs b/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx.cs
new file mode 100644
index 00000000..94fba52d
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx.cs
@@ -0,0 +1,197 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using our;
+using Marketplace.Umbraco.BusinessLogic;
+using Marketplace.Providers.Helpers;
+using Marketplace.Helpers;
+
+namespace Marketplace.usercontrols.Deli.Package.Steps
+{
+ public partial class Screenshots : System.Web.UI.UserControl
+ {
+
+ public string MemberGuid = "";
+ public string ProjectGuid = "";
+
+
+ private int? _projectId;
+ public int? ProjectId
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Request["id"]))
+ {
+ _projectId = Int32.Parse(Request["id"]);
+ }
+ return _projectId;
+ }
+ set
+ {
+ _projectId = value;
+ }
+ }
+
+ private string _defaultFile
+ {
+ get;
+ set;
+ }
+
+ private void RebindFiles()
+ {
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+ var files = fileProvider.GetMediaFilesByProjectId((int)ProjectId).Where(x=>x.FileType == FileType.screenshot);
+
+ if (string.IsNullOrEmpty(_defaultFile))
+ {
+ var defaultFile = files.OrderByDescending(x => x.CreateDate).FirstOrDefault();
+
+ if (defaultFile != null)
+ {
+ MarkFileAsCurrent(defaultFile.Path);
+ }
+ }
+
+ rp_screenshots.DataSource = files;
+ rp_screenshots.Visible = (files.Count() > 0);
+ rp_screenshots.DataBind();
+ }
+
+
+ protected void DeleteFile(object sender, CommandEventArgs e)
+ {
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+ var f = fileProvider.GetFileById(int.Parse(e.CommandArgument.ToString()));
+ _defaultFile = string.Empty;
+
+ //update the project
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ IListingItem project = provider.GetListing((int)ProjectId);
+ project.DefaultScreenshot = _defaultFile;
+ provider.SaveOrUpdate(project);
+
+
+
+ var mem = Member.GetCurrentMember();
+
+ if (f.CreatedBy == mem.Id || Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+ fileProvider.Remove(f);
+
+ RebindFiles();
+ }
+
+ protected void ArchiveFile(object sender, CommandEventArgs e)
+ {
+
+ var fileProvider = (IMediaProvider)MarketplaceProviderManager.Providers["MediaProvider"];
+ var f = fileProvider.GetFileById(int.Parse(e.CommandArgument.ToString()));
+
+ if (e.CommandName == "Unarchive")
+ {
+ f.Archived = false;
+ }
+ else
+ {
+ f.Archived = true;
+ }
+
+ fileProvider.SaveOrUpdate(f);
+ RebindFiles();
+ }
+
+ protected void OnFileBound(object sender, RepeaterItemEventArgs e)
+ {
+ if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
+ {
+ IMediaFile f = (IMediaFile)e.Item.DataItem;
+ Image _image = (Image)e.Item.FindControl("img_image");
+ Literal _date = (Literal)e.Item.FindControl("lt_date");
+ Button _delete = (Button)e.Item.FindControl("bt_delete");
+ Literal _defaultScreenshot = (Literal)e.Item.FindControl("lt_default");
+
+ Button _defaultScreenshotButton = (Button)e.Item.FindControl("bt_default");
+
+ if (f.Path == _defaultFile)
+ {
+ _defaultScreenshotButton.Visible = false;
+ _defaultScreenshot.Visible = true;
+ _defaultScreenshot.Text = "Default";
+ }
+ else
+ {
+ _defaultScreenshotButton.Text = "Make Default";
+ _defaultScreenshotButton.CommandArgument = f.Path;
+ _defaultScreenshot.Visible = false;
+ }
+
+ _image.ImageUrl = "/umbraco/imagegen.ashx?image=" + f.Path + "&height=100";
+ _date.Text = f.CreateDate.ToShortDateString() + " - " + f.CreateDate.ToShortTimeString();
+ _delete.CommandArgument = f.Id.ToString();
+
+ }
+ }
+
+ protected void SetDefaultImage(object sender, CommandEventArgs e)
+ {
+ var defaultScreenshot = e.CommandArgument.ToString();
+ MarkFileAsCurrent(defaultScreenshot);
+ RebindFiles();
+ }
+
+ private void MarkFileAsCurrent(string defaultScreenshot)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ IListingItem project = provider.GetListing((int)ProjectId);
+ project.DefaultScreenshot = defaultScreenshot;
+ provider.SaveOrUpdate(project);
+ _defaultFile = project.DefaultScreenshot;
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+
+ if (umbraco.library.IsLoggedOn() && ProjectId != null)
+ {
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ Member mem = Member.GetCurrentMember();
+ IListingItem project = provider.GetListing((int)ProjectId);
+ _defaultFile = project.DefaultScreenshot;
+
+
+ if ((project.Vendor.Member.Id == mem.Id) ||
+ Utills.IsProjectContributor(mem.Id, (int)ProjectId))
+ {
+ holder.Visible = true;
+ RebindFiles();
+
+ umbraco.library.RegisterJavaScriptFile("swfUpload", "/scripts/swfupload/SWFUpload.js");
+ umbraco.library.RegisterJavaScriptFile("swfUpload_cb", "/scripts/swfupload/callbacks.js");
+ umbraco.library.RegisterJavaScriptFile("swfUpload_progress", "/scripts/swfupload/fileprogress.js");
+
+ MemberGuid = mem.UniqueId.ToString();
+ ProjectGuid = project.ProjectGuid.ToString();
+ }
+ }
+ }
+
+ protected void SaveStep(object sender, EventArgs e)
+ {
+ //move to the license step
+ ProjectCreatorHelper.MoveToNextStep(this,(int)ProjectId);
+ }
+
+ protected void MoveLast(object sender, EventArgs e)
+ {
+ //move to the files step
+ ProjectCreatorHelper.MoveToPreviousStep(this, (int)ProjectId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx.designer.cs b/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx.designer.cs
new file mode 100644
index 00000000..deea0bf0
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Package/Steps/Screenshots.ascx.designer.cs
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Package.Steps {
+
+
+ public partial class Screenshots {
+
+ ///
+ /// holder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder holder;
+
+ ///
+ /// rp_screenshots control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater rp_screenshots;
+
+ ///
+ /// MovePrevious control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton MovePrevious;
+
+ ///
+ /// MoveNext control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button MoveNext;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx b/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx
new file mode 100644
index 00000000..232acb03
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx
@@ -0,0 +1,121 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorPayout.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Payout.VendorPayout" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+
+Eligable Orders
+Payouts are given on orders occured in the previous month and have not been refunded.
+To view past payout requests View your payout history .
+
+
+
+
+* your profit after any vouchers & fees have been removed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%--
+ // temporary notification code.
+ umbraco.library.SendMail("nh@umbraco.dk", "nh@umbraco.dk", "Payout requested", "Hey Niels, There's a payout requested. Check our.umbraco.org/umbraco/ ",true);
+
+ --%>
+
+
+
+
+Payout Submitted
+
+
Your payout request has been sent for processing. All payouts are processed on the 20th of the month. View your payout history
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx.cs b/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx.cs
new file mode 100644
index 00000000..18b70945
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx.cs
@@ -0,0 +1,137 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using NotificationsCore;
+
+namespace Marketplace.usercontrols.Deli.Payout
+{
+ public partial class VendorPayout : System.Web.UI.UserControl
+ {
+
+
+ public int PayoutHistoryPage { get; set; }
+ protected string HistoryPage;
+
+ private IDeliOrderItemProvider _orderItemProvider;
+ private IOrderProvider _orderProvider;
+ private IMemberProvider _memberProvider;
+ private IVendorProvider _vendorProvider;
+ private IListingProvider _listingProvider;
+ private ILicenseProvider _licenseProvider;
+ private IPayoutProvider _payoutProvider;
+ private IVendor vendor;
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _orderProvider = (IOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ _payoutProvider = (IPayoutProvider)MarketplaceProviderManager.Providers["PayoutProvider"];
+
+ IMember mem = _memberProvider.GetCurrentMember();
+ vendor = _vendorProvider.GetVendorByGuid(mem.UniqueId);
+
+ HistoryPage = umbraco.library.NiceUrl(PayoutHistoryPage);
+
+ if (!IsPostBack)
+ {
+ BindOrderItems();
+ }
+ }
+
+ protected void BindOrderItems()
+ {
+
+
+ DateTime now = DateTime.Now;
+
+ DateTime lastDayLastMonth = new DateTime(now.Year, now.Month, 1);
+ lastDayLastMonth = lastDayLastMonth.AddDays(-1);
+
+
+ // bind the table to any order that has not been paid out and does not have a payout id
+ var items = _orderItemProvider.GetOrderItemsForPayout(vendor.Member.Id, lastDayLastMonth)
+ .Where(x => x.PayoutId == null)
+ .Select(x => new
+ {
+ Id = x.Id,
+ Package = _listingProvider.GetListing(x.ListingItemId,true).Name,
+ LicenseTypeName = _licenseProvider.GetLicense(x.LicenseId).LicenseType.ToString(),
+ Member = _orderProvider.GetOrder(x.OrderId).Member,
+ PayoutAmount = x.PayoutAmount,
+ OrderDate = string.Format("{0:D}",x.CreateDate)
+ });
+
+
+ if (items.Count() > 0)
+ {
+ PayoutList.DataSource = items;
+ PayoutList.DataBind();
+ payoutForm.Visible = true;
+ NoPayouts.Visible = false;
+ }
+ else
+ {
+ payoutForm.Visible = false;
+ NoPayouts.Visible = true;
+ }
+ }
+
+ protected void PayoutRequest_Click(object s, EventArgs e)
+ {
+ // Create the new payout
+ var payout = new Marketplace.Providers.Payout.Payout();
+ payout.VendorRef = vendor_reference.Text;
+ payout.Guid = Guid.NewGuid();
+ payout.PayoutDate = DateTime.Now;
+ payout.VendorId = vendor.Member.Id;
+ payout.Processed = false;
+ _payoutProvider.SaveOrUpdate(payout);
+
+
+ //grab the list of orderitems that this payout applies to
+
+ List items = new List();
+ foreach (RepeaterItem ri in PayoutList.Items)
+ {
+ if (ri.ItemType != ListItemType.Header || ri.ItemType != ListItemType.Footer)
+ {
+ var check = (CheckBox)ri.FindControl("RowCheckbox");
+ if (check.Checked)
+ {
+ var itemID = Int32.Parse(((HiddenField)ri.FindControl("RowId")).Value);
+ var orderItem = _orderItemProvider.GetOrderItem(itemID);
+
+ //set the payout id for the order items
+ orderItem.PayoutId = payout.Id;
+ _orderItemProvider.SaveOrUpdate(orderItem);
+
+ //add to the list of the order items for the payout
+ items.Add(orderItem);
+ }
+ }
+ }
+
+ payout.OrderItems = items;
+
+ //send notification to Niels :)
+ InstantNotification not = new InstantNotification();
+ not.Invoke(NotificationsWeb.Config.ConfigurationFile, NotificationsWeb.Config.AssemblyDir, "DeliPayoutRequest", payout);
+
+ //rebind the table to remove any that have been set as paid out
+ payoutHolder.Visible = false;
+ PayoutThanks.Visible = true;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx.designer.cs b/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx.designer.cs
new file mode 100644
index 00000000..7d1e7753
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Payout/VendorPayout.ascx.designer.cs
@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Payout {
+
+
+ public partial class VendorPayout {
+
+ ///
+ /// payoutHolder control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder payoutHolder;
+
+ ///
+ /// payoutForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder payoutForm;
+
+ ///
+ /// PayoutList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater PayoutList;
+
+ ///
+ /// Label1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// vendor_reference control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox vendor_reference;
+
+ ///
+ /// bt_submit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_submit;
+
+ ///
+ /// NoPayouts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder NoPayouts;
+
+ ///
+ /// PayoutThanks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder PayoutThanks;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx b/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx
new file mode 100644
index 00000000..717f75dc
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx
@@ -0,0 +1,93 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorPayoutHistory.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Payout.VendorPayoutHistory" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+Payout History
+The following list shows all your past and payouts and their status
+
+
+
+
+
+
+Date
+Reference
+Status
+Value
+
+
+
+
+
+
+
+">[+]
+<%# Eval("PayoutDate") %>
+
+
+<%# Eval("Reference") %>
+
+
+<%# Eval("Status") %>
+
+
+€<%# Eval("PayoutAmount") %>
+
+
+">
+
+ Payout details
+
+
+
+
+ Package
+ License
+ Purchaser
+ Country
+ VAT #
+ Order Date
+ Payout Value*
+
+
+
+
+ <%# Eval("Package") %>
+ <%# Eval("LicenseTypeName") %>
+ "><%# ((IMember)Eval("Member")).Name %>
+ <%# ((IMember)Eval("Member")).CompanyCountry %>
+ <%# ((IMember)Eval("Member")).CompanyVATNumber %>
+ <%# Eval("OrderDate") %>
+ €<%# Eval("PayoutAmount") %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx.cs b/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx.cs
new file mode 100644
index 00000000..b1d3ea29
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using System.Configuration;
+
+namespace Marketplace.usercontrols.Deli.Payout
+{
+ public partial class VendorPayoutHistory : System.Web.UI.UserControl
+ {
+
+ private IDeliOrderItemProvider _orderItemProvider;
+ private IOrderProvider _orderProvider;
+ private IMemberProvider _memberProvider;
+ private IVendorProvider _vendorProvider;
+ private IListingProvider _listingProvider;
+ private ILicenseProvider _licenseProvider;
+ private IPayoutProvider _payoutProvider;
+ private IVendor vendor;
+ private IMember mem;
+
+
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ _vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ _listingProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ _orderProvider = (IOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ _payoutProvider = (IPayoutProvider)MarketplaceProviderManager.Providers["PayoutProvider"];
+
+
+ PayoutHistoryList.ItemDataBound += new RepeaterItemEventHandler(PayoutHistoryList_ItemDataBound);
+
+ mem = _memberProvider.GetCurrentMember();
+ vendor = _vendorProvider.GetVendorByGuid(mem.UniqueId);
+
+ BindListing();
+ }
+
+
+ private void BindListing()
+ {
+ var payouts = _payoutProvider.GetPayoutsByVendor(mem.Id, null, true).OrderByDescending(x => x.PayoutDate).Select(x => new
+ {
+ Id = x.Id,
+ PayoutDate = String.Format("{0:D}",x.PayoutDate),
+ Reference = x.VendorRef,
+ PayoutAmount = GetPayoutValue(x.OrderItems),
+ Status = (x.OrderItems.FirstOrDefault().IsPaidOut)?"Processed":"Pending"
+ });
+
+ PayoutHistoryList.DataSource = payouts;
+ PayoutHistoryList.DataBind();
+ }
+
+ protected void PayoutHistoryList_ItemDataBound(object sender, RepeaterItemEventArgs e)
+ {
+ RepeaterItem ri = (RepeaterItem)e.Item;
+ if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)
+ {
+ Repeater itemRepeater = ((RepeaterItem)e.Item).FindControl("payoutItemRepeater") as Repeater;
+ int rowId = Int32.Parse((((RepeaterItem)e.Item).FindControl("rowId") as HiddenField).Value);
+
+ var payout = _payoutProvider.GetPayout(rowId);
+
+ // bind the table to any order that has not been paid out and does not have a payout id
+ var items = payout.OrderItems
+ .Select(x => new
+ {
+ Id = x.Id,
+ Package = _listingProvider.GetListing(x.ListingItemId, true).Name,
+ LicenseTypeName = _licenseProvider.GetLicense(x.LicenseId).LicenseType.ToString(),
+ Member = _orderProvider.GetOrder(x.OrderId).Member,
+ PayoutAmount = x.PayoutAmount,
+ OrderDate = string.Format("{0:D}", x.CreateDate)
+ });
+
+ itemRepeater.DataSource = items;
+ itemRepeater.DataBind();
+ }
+
+ }
+
+ private double GetPayoutValue(IEnumerable items)
+ {
+ double val = 0.00;
+ foreach (var i in items)
+ {
+ val += i.PayoutAmount;
+ }
+
+ return val;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx.designer.cs b/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx.designer.cs
new file mode 100644
index 00000000..aababbfa
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Payout/VendorPayoutHistory.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Payout {
+
+
+ public partial class VendorPayoutHistory {
+
+ ///
+ /// PayoutHistoryList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater PayoutHistoryList;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/PopularProjects.ascx b/Marketplace/usercontrols/Deli/PopularProjects.ascx
new file mode 100644
index 00000000..334e581b
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/PopularProjects.ascx
@@ -0,0 +1,83 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PopularProjects.ascx.cs" Inherits="Marketplace.usercontrols.Deli.PopularProjects" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+<%@ Import Namespace="Marketplace.Providers.Helpers" %>
+<%@ Register Src="~/usercontrols/Deli/ListPagination.ascx" TagPrefix="deli" TagName="paging" %>
+
+
+
+
+
+
+
+
There are no listings that meet your filter criteria
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/PopularProjects.ascx.cs b/Marketplace/usercontrols/Deli/PopularProjects.ascx.cs
new file mode 100644
index 00000000..d677b9e8
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/PopularProjects.ascx.cs
@@ -0,0 +1,151 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class PopularProjects : UserControl
+ {
+
+ public int TotalListings { get; set; }
+ public int PageStartListingNumber { get; set; }
+ public int PageEndListingNumber { get; set; }
+
+ private string _listingType = "";
+ public string ListingType
+ {
+ get { return _listingType; }
+ set { _listingType = value; }
+ }
+
+ private int _maxPageSize = 20;
+ public int MaxPageSize
+ {
+ get { return _maxPageSize; }
+ set { _maxPageSize = value; }
+ }
+
+ private int _pageNumber;
+ public int PageNumber
+ {
+ get
+ {
+ if (_pageNumber > 0)
+ return _pageNumber - 1;
+
+ return _pageNumber;
+ }
+ set
+ {
+ _pageNumber = value;
+ }
+ }
+
+ public bool paged { get; set; }
+
+ protected void Page_PreRender(object sender, EventArgs e)
+ {
+ Bind_Data();
+ }
+
+ protected void Bind_Data()
+ {
+ var projectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ var skip = PageNumber * _maxPageSize;
+ var take = _maxPageSize;
+
+ IEnumerable projects;
+
+ if (paged == false)
+ {
+ switch (_listingType)
+ {
+ case "free":
+ projects = projectsProvider.GetListingsByPopularity(0, 0, true).Where(x => x.ListingType == Interfaces.ListingType.free).Take(take);
+ break;
+
+ case "commercial":
+ projects = projectsProvider.GetTopPaidListings(0, 8, true);
+ break;
+
+ default:
+ projects = projectsProvider.GetListingsByPopularity(0, take, true);
+ break;
+ }
+
+ ListingOpen.Visible = false;
+ ListingClose.Visible = false;
+ ProjectCounter.Visible = false;
+ paging.Visible = false;
+ }
+ else
+ {
+ int count;
+
+ if (_listingType == "commercial")
+ {
+ projects = projectsProvider.GetTopPaidListings(skip, take, true);
+ count = projectsProvider.Count(Interfaces.ListingType.commercial);
+ }
+ else
+ {
+ projects = projectsProvider.GetListingsByPopularity(0, 0, true).ToList();
+ if (_listingType == "free")
+ {
+ count = projects.Count(x => x.ListingType == Interfaces.ListingType.free);
+ projects = projects.Where(x => x.ListingType == Interfaces.ListingType.free).Skip(skip).Take(take);
+ }
+ else
+ {
+ count = projects.Count();
+ projects = projects.Skip(skip).Take(take);
+ }
+ }
+
+ if (count > _maxPageSize)
+ {
+ paging.Visible = true;
+
+ var numPages = (count / (decimal)_maxPageSize);
+ var intNumPages = Convert.ToInt32(numPages);
+
+
+ if (numPages % 1 > 0 && numPages % 1 <= (decimal)0.5)
+ {
+ intNumPages += 1;
+ }
+
+ paging.NumberOfPages = intNumPages;
+ }
+
+ var projectCount = projects.Count();
+
+ if (projectCount > 0)
+ {
+ ProjectCounter.Visible = true;
+ TotalListings = count;
+ PageStartListingNumber = skip + 1;
+ PageEndListingNumber = skip + projectCount;
+ }
+ else
+ {
+ ProjectCounter.Visible = false;
+ Listing.Visible = false;
+ NoListings.Visible = true;
+ }
+
+ ListingOpen.Visible = true;
+ ListingClose.Visible = true;
+ WidgetTitle.Visible = false;
+ WidgetFeatures.Visible = false;
+ }
+
+ Listing.DataSource = projects;
+ Listing.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/PopularProjects.ascx.designer.cs b/Marketplace/usercontrols/Deli/PopularProjects.ascx.designer.cs
new file mode 100644
index 00000000..f69aaae0
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/PopularProjects.ascx.designer.cs
@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class PopularProjects {
+
+ ///
+ /// ListingOpen control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ListingOpen;
+
+ ///
+ /// WidgetTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder WidgetTitle;
+
+ ///
+ /// WidgetFeatures control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder WidgetFeatures;
+
+ ///
+ /// ProjectCounter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ProjectCounter;
+
+ ///
+ /// Listing control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater Listing;
+
+ ///
+ /// ListingClose control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ListingClose;
+
+ ///
+ /// NoListings control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder NoListings;
+
+ ///
+ /// paging control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.usercontrols.Deli.ListPagination paging;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx b/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx
new file mode 100644
index 00000000..a59699e4
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx
@@ -0,0 +1,24 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MemberDataLookup.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Profile.MemberDataLookup" %>
+
+
+
+ E-mail:
+
+ Password:
+
+
+
+
+
+
+
+ Couldn't connect to umbraco.com
+ This could be because your credentials are wrong or because you're not online.
"
+
+
+
+ We retrieved the following data from umbraco.com
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx.cs b/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx.cs
new file mode 100644
index 00000000..9096e8c0
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+
+namespace Marketplace.usercontrols.Deli.Profile
+{
+ public partial class MemberDataLookup : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void getMemberData_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ lookupFailed.Visible = false;
+ com.umbraco.MemberLookUp service = new com.umbraco.MemberLookUp();
+ com.umbraco.MemberData md = service.GetMemberData(tb_login.Text, tb_password.Text);
+
+ var memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+
+ Member current = new Member(memberProvider.GetCurrentMember().Id);
+ if (current != null)
+ {
+ current.getProperty("umbracoDotComID").Value = md.Id;
+
+ if (!string.IsNullOrEmpty(md.Address))
+ {
+ lt_data.Text += "Company Address: " + md.Address + " ";
+ current.getProperty("companyAddress").Value = md.Address;
+
+ }
+
+ if (!string.IsNullOrEmpty(md.Country))
+ {
+ lt_data.Text += "Company Country: " + md.Country+ " ";
+ current.getProperty("companyCountry").Value = md.Country;
+ }
+
+ if (!string.IsNullOrEmpty(md.VATNumber))
+ {
+ lt_data.Text += "Company VAT Number: " + md.VATNumber + " ";
+ current.getProperty("companyVATNumber").Value = md.VATNumber;
+ }
+
+ if (!string.IsNullOrEmpty(md.InvoicingEmail))
+ {
+ lt_data.Text += "Company Invoice Email: " + md.VATNumber + " ";
+ current.getProperty("companyInvoiceEmail").Value = md.InvoicingEmail;
+ }
+
+ string groups = string.Empty;
+ foreach (string mg in md.MemberGroups)
+ {
+
+
+ MemberGroup g = MemberGroup.GetByName(mg);
+ if (g != null)
+ {
+ groups += mg + ", ";
+ current.AddGroup(g.Id);
+ }
+ }
+
+ if (!string.IsNullOrEmpty(groups))
+ {
+ lt_data.Text += "Groups: " + groups.Substring(0, groups.Length - 2);
+ }
+ }
+
+
+
+ lookupSuccess.Visible = true;
+ lookupLogin.Visible = false;
+
+ }
+ catch
+ {
+ lookupFailed.Visible = true;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx.designer.cs b/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx.designer.cs
new file mode 100644
index 00000000..0db5d941
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/MemberDataLookup.ascx.designer.cs
@@ -0,0 +1,78 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Profile {
+
+
+ public partial class MemberDataLookup {
+
+ ///
+ /// lookupLogin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel lookupLogin;
+
+ ///
+ /// tb_login control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_login;
+
+ ///
+ /// tb_password control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_password;
+
+ ///
+ /// bt_getMemberData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_getMemberData;
+
+ ///
+ /// lookupFailed control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel lookupFailed;
+
+ ///
+ /// lookupSuccess control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel lookupSuccess;
+
+ ///
+ /// lt_data control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lt_data;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx b/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx
new file mode 100644
index 00000000..d36b8cab
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx
@@ -0,0 +1,96 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyProjects.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Profile.MyProjects" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+
+
Your existing projects
+
+
+
+
+
+ &pad=true&width=50&height=50" alt="<%# Eval("Name") %>" class="projectIcon" style="border:1px solid #ddd"/>
+
+ <%# ((DateTime)Eval("CreateDate")).ToString("D")%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Project where you are contributor
+
+
+
+
+ &pad=true&width=50&height=50" alt="<%# Eval("Name") %>" class="projectIcon" style="border:1px solid #ddd"/>
+
+ <%# ((DateTime)Eval("CreateDate")).ToString("D") %>
+ Owner: "><%# ((IVendor)Eval("Vendor")).Member.Name %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx.cs b/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx.cs
new file mode 100644
index 00000000..0d69ff78
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli.Profile
+{
+ public partial class MyProjects : System.Web.UI.UserControl
+ {
+ public int edit { get; set; }
+ public int forum { get; set; }
+ public int licenses { get; set; }
+ public int team { get; set; }
+
+ protected string editUrl;
+ protected string forumUrl;
+ protected string licenseUrl;
+ protected string teamUrl;
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ editUrl = umbraco.library.NiceUrl(edit);
+ forumUrl = umbraco.library.NiceUrl(forum);
+ licenseUrl = umbraco.library.NiceUrl(licenses);
+ teamUrl = umbraco.library.NiceUrl(team);
+
+
+ var memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ var member = memberProvider.GetCurrentMember();
+ var provider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+
+ var projects = provider.GetListingsByVendor(member.Id, true, true);
+ myProjects.DataSource = projects;
+ myProjects.DataBind();
+
+ var contribProjects = provider.GetListingsForContributor(member.Id);
+ myTeamProjects.DataSource = contribProjects;
+ myTeamProjects.DataBind();
+ }
+
+ protected string GetIcon(string defaultIcon)
+ {
+ if (!string.IsNullOrEmpty(defaultIcon))
+ {
+ return defaultIcon;
+ }
+ return "/css/img/package2.png";
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx.designer.cs b/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx.designer.cs
new file mode 100644
index 00000000..99e4d945
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/MyProjects.ascx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Profile {
+
+
+ public partial class MyProjects {
+
+ ///
+ /// myProjects control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater myProjects;
+
+ ///
+ /// myTeamProjects control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater myTeamProjects;
+
+ ///
+ /// LoginView1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LoginView LoginView1;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Profile/Signup.ascx b/Marketplace/usercontrols/Deli/Profile/Signup.ascx
new file mode 100644
index 00000000..39ac09fa
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/Signup.ascx
@@ -0,0 +1,312 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Signup.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Profile.Signup" %>
+<%@ Register Assembly="Marketplace" TagPrefix="Deli" Namespace="Marketplace.Controls" %>
+
+
+
+ Basic Profile
+ Vendor Profile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Profile/Signup.ascx.cs b/Marketplace/usercontrols/Deli/Profile/Signup.ascx.cs
new file mode 100644
index 00000000..ffdf6f6a
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/Signup.ascx.cs
@@ -0,0 +1,297 @@
+using System;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using umbraco.cms.businesslogic.member;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Members;
+using System.Web.UI.HtmlControls;
+
+namespace Marketplace.usercontrols.Deli.Profile
+{
+ public partial class Signup : System.Web.UI.UserControl {
+
+ public string Group { get; set; }
+ public string memberType { get; set; }
+ public int NextPage { get; set; }
+
+ private IMemberProvider mp;
+ private IMember m;
+
+ protected void Page_Init(object sender,EventArgs e){
+ mp = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ m = mp.GetCurrentMember();
+
+ if (m == null || !m.IsDeliVendor)
+ {
+ ProfileNavigation.Visible = false;
+ }
+ }
+
+
+ protected void Page_Load(object sender, EventArgs e) {
+ //lazyloading the needed javascript for validation. (addded it to the master template as our ahah forms need it aswel)
+ //umbraco.library.RegisterJavaScriptFile("jquery.validation", "/scripts/jquery.validation.js");
+
+ if(!Page.IsPostBack){
+ ((HtmlGenericControl)profileNav.Parent).Attributes.Add("class","current");
+ }
+
+
+ if (!Page.IsPostBack && m != null) {
+ tb_name.Text = m.Name;
+ tb_email.Text = m.Email;
+
+ //make sure that it is not required to enter the password..
+ tb_password.CssClass = "title";
+
+ //hack on the save button...
+ bt_submit.Text = "Save";
+
+ //treshold and newsletter
+
+ cb_bugMeNot.Checked = m.BugMeNot;
+
+
+ tb_treshold.Text = m.Threshold.ToString();
+
+ //optional..
+ tb_twitter.Text = m.Twitter;
+ tb_flickr.Text = m.Flickr;
+ tb_company.Text = m.Company;
+ tb_bio.Text = m.Profile;
+
+ //Location
+ tb_lat.Value = m.Latitude;
+ tb_lng.Value = m.Longitude;
+ tb_location.Text = m.Location;
+
+ //billing details
+ tb_companyAddress.Text = m.CompanyAddress;
+ dd_companyCountry.SelectedValue = m.CompanyCountry;
+ tb_companyBillingEmail.Text = m.CompanyInvoiceEmail;
+ tb_companyVatNumber.Text = m.CompanyVATNumber;
+
+ if (m.IsDeliVendor)
+ {
+ var vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ var vendor = vendorProvider.GetVendorById(m.Id);
+
+
+ tb_vendorCompany.Text = vendor.VendorCompanyName;
+ dd_vendorCountry.SelectedValue = vendor.VendorCountry;
+ tb_vendorDescription.Text = vendor.VendorDescription;
+
+ tb_vendorUrl.Text = vendor.VendorUrl;
+ tb_vendorSupportUrl.Text = vendor.SupportUrl;
+ tb_vendorBillingEmail.Text = vendor.BillingContactEmail;
+ tb_vendorSupportEmail.Text = vendor.SupportContactEmail;
+ tb_vendorIban.Text = vendor.IBAN;
+ tb_vendorSwift.Text = vendor.SWIFT;
+ tb_vendorBsb.Text = vendor.BSB;
+ tb_vendorAccount.Text = vendor.AccountNumber;
+ tb_vendorPayPal.Text = vendor.PayPalAccount;
+ tb_vendorBaseCurrency.Text = vendor.BaseCurrency;
+ tb_vendorTaxId.Text = vendor.TaxId;
+ tb_vendorVatNumber.Text = vendor.VATNumber;
+
+ //check to see if the box is checked. If it is dont allow it to be rechecked
+ if (vendor.DeliTermsAgreementDate != DateTime.MinValue && vendor.DeliTermsAgreementDate != null)
+ {
+ cb_vendorTerms.Checked = true;
+ cb_vendorTerms.Enabled = false;
+ }
+
+ }
+
+ }
+
+ }
+
+ protected void createMember(object sender, EventArgs e) {
+
+ //Member is already logged in, and we just need to save his new data...
+ if (m != null) {
+ m.Name = tb_name.Text;
+ m.Email = tb_email.Text;
+
+ if (tb_password.Text != "")
+ m.Password = tb_password.Text;
+
+ //optional..
+ m.Twitter = tb_twitter.Text;
+ m.Flickr = tb_flickr.Text;
+ m.Company = tb_company.Text;
+ m.Profile = tb_bio.Text;
+
+ //location
+ m.Location = tb_location.Text;
+ m.Latitude = tb_lat.Value;
+ m.Longitude = tb_lng.Value;
+
+ //billing info
+ m.CompanyAddress = tb_companyAddress.Text;
+ m.CompanyCountry = dd_companyCountry.SelectedValue;
+ m.CompanyInvoiceEmail = tb_companyBillingEmail.Text;
+ m.CompanyVATNumber = tb_companyVatNumber.Text;
+
+ var cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ if (m.CompanyCountry.ToLower() != null)
+ {
+ switch (m.CompanyCountry)
+ {
+ case "dk":
+ cartProvider.SetCurrency(Currency.DKK);
+ break;
+
+ case "us":
+ case "ca":
+ cartProvider.SetCurrency(Currency.USD);
+ break;
+
+ default:
+ cartProvider.SetCurrency(Currency.EUR);
+ break;
+ }
+ }
+
+
+ //treshold + newsletter
+ m.Threshold = Int32.Parse(tb_treshold.Text);
+ m.BugMeNot = cb_bugMeNot.Checked;
+
+ mp.SaveOrUpdate(m);
+
+ Response.Redirect(umbraco.library.NiceUrl(NextPage));
+
+ } else {
+ if (tb_email.Text != "") {
+ m = mp.GetMemberByEmail(tb_email.Text);
+ if (m == null) {
+
+ m = new DeliMember();
+
+ m.Name = tb_name.Text;
+ m.Email = tb_email.Text;
+ m.Password = tb_password.Text;
+
+
+ //Location
+ m.Location = tb_location.Text;
+ m.Latitude = tb_lat.Value;
+ m.Longitude = tb_lng.Value;
+
+ //billing info
+ m.CompanyAddress = tb_companyAddress.Text;
+ m.CompanyCountry = dd_companyCountry.SelectedValue;
+ m.CompanyInvoiceEmail = tb_companyBillingEmail.Text;
+ m.CompanyVATNumber = tb_companyVatNumber.Text;
+
+
+ var cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ if (m.CompanyCountry.ToLower() != null)
+ {
+ switch (m.CompanyCountry)
+ {
+ case "dk":
+ cartProvider.SetCurrency(Currency.DKK);
+ break;
+
+ case "us":
+ case "ca":
+ cartProvider.SetCurrency(Currency.USD);
+ break;
+
+ default:
+ cartProvider.SetCurrency(Currency.EUR);
+ break;
+ }
+ }
+
+ //optional..
+ m.Twitter = tb_twitter.Text;
+ m.Flickr = tb_flickr.Text;
+ m.Company = tb_company.Text;
+ m.Profile = tb_bio.Text;
+
+ //treshold + newsletter
+ m.Threshold = Int32.Parse(tb_treshold.Text);
+ m.BugMeNot = cb_bugMeNot.Checked;
+
+ //Standard values
+ m.ReputationTotal = 20;
+ m.ReputationCurrent = 20;
+ m.ForumPosts = 0;
+
+ //add the group
+ m.Groups = new string[] { Group };
+
+ mp.SaveOrUpdate(m);
+
+ Response.Redirect(umbraco.library.NiceUrl(NextPage));
+ }
+ }
+ }
+ }
+
+ protected void updateVendor(object sender, EventArgs e)
+ {
+ var vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ var vendor = vendorProvider.GetVendorById(m.Id);
+
+ vendor.VendorCompanyName = tb_vendorCompany.Text;
+ vendor.VendorCountry = dd_vendorCountry.SelectedValue;
+ vendor.VendorDescription = tb_vendorDescription.Text;
+
+ vendor.VendorUrl = tb_vendorUrl.Text;
+ vendor.SupportUrl = tb_vendorSupportUrl.Text;
+ vendor.BillingContactEmail = tb_vendorBillingEmail.Text;
+ vendor.SupportContactEmail = tb_vendorSupportEmail.Text;
+ vendor.IBAN = tb_vendorIban.Text;
+ vendor.SWIFT = tb_vendorSwift.Text;
+ vendor.BSB = tb_vendorBsb.Text;
+ vendor.AccountNumber = tb_vendorAccount.Text;
+ vendor.PayPalAccount = tb_vendorPayPal.Text;
+ vendor.BaseCurrency = tb_vendorBaseCurrency.Text;
+ vendor.TaxId = tb_vendorTaxId.Text;
+ vendor.VATNumber = tb_vendorVatNumber.Text;
+
+ if (cb_vendorTerms.Enabled && cb_vendorTerms.Checked)
+ {
+ vendor.DeliTermsAgreementDate = DateTime.Now.ToUniversalTime();
+ }
+
+ vendorProvider.SaveOrUpdate(vendor);
+
+ Response.Redirect(umbraco.library.NiceUrl(NextPage));
+ }
+
+ protected void ChangeProfile(object sender, EventArgs e)
+ {
+ var b = sender as LinkButton;
+ var parentControl = b.Parent as HtmlGenericControl;
+
+ switch (b.CommandArgument)
+ {
+ case "Basic":
+
+ SignupBasicProfile.Visible = true;
+ VendorProfile.Visible = false;
+ parentControl.Attributes.Add("class", "current");
+ ((HtmlGenericControl)vendorNav.Parent).Attributes.Add("class", "");
+ break;
+ case "Vendor":
+ SignupBasicProfile.Visible = false;
+ VendorProfile.Visible = true;
+ parentControl.Attributes.Add("class", "current");
+ ((HtmlGenericControl)profileNav.Parent).Attributes.Add("class", "");
+ break;
+ default:
+ break;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Profile/Signup.ascx.designer.cs b/Marketplace/usercontrols/Deli/Profile/Signup.ascx.designer.cs
new file mode 100644
index 00000000..e749c3ce
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Profile/Signup.ascx.designer.cs
@@ -0,0 +1,465 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Profile {
+
+
+ public partial class Signup {
+
+ ///
+ /// ProfileNavigation control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ProfileNavigation;
+
+ ///
+ /// profileNav control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton profileNav;
+
+ ///
+ /// vendorNav control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton vendorNav;
+
+ ///
+ /// SignupBasicProfile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder SignupBasicProfile;
+
+ ///
+ /// Label1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// tb_name control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_name;
+
+ ///
+ /// Label2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// tb_company control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_company;
+
+ ///
+ /// Label3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// tb_email control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_email;
+
+ ///
+ /// Label4 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// tb_password control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_password;
+
+ ///
+ /// Label10 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label10;
+
+ ///
+ /// tb_bio control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_bio;
+
+ ///
+ /// tb_companyVatNumber control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_companyVatNumber;
+
+ ///
+ /// tb_companyAddress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_companyAddress;
+
+ ///
+ /// dd_companyCountry control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.Controls.CountryDropDownList dd_companyCountry;
+
+ ///
+ /// tb_companyBillingEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_companyBillingEmail;
+
+ ///
+ /// Label5 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// tb_twitter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_twitter;
+
+ ///
+ /// Label6 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label6;
+
+ ///
+ /// tb_flickr control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_flickr;
+
+ ///
+ /// tb_emailConfirm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_emailConfirm;
+
+ ///
+ /// Label7 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label7;
+
+ ///
+ /// tb_treshold control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_treshold;
+
+ ///
+ /// Label9 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label9;
+
+ ///
+ /// cb_bugMeNot control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox cb_bugMeNot;
+
+ ///
+ /// Label8 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label8;
+
+ ///
+ /// tb_location control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_location;
+
+ ///
+ /// tb_lat control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField tb_lat;
+
+ ///
+ /// tb_lng control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField tb_lng;
+
+ ///
+ /// bt_submit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_submit;
+
+ ///
+ /// VendorProfile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder VendorProfile;
+
+ ///
+ /// tb_vendorCompany control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorCompany;
+
+ ///
+ /// tb_vendorDescription control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorDescription;
+
+ ///
+ /// tb_vendorUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorUrl;
+
+ ///
+ /// tb_vendorSupportUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorSupportUrl;
+
+ ///
+ /// tb_vendorBillingEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorBillingEmail;
+
+ ///
+ /// tb_vendorSupportEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorSupportEmail;
+
+ ///
+ /// dd_vendorCountry control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.Controls.CountryDropDownList dd_vendorCountry;
+
+ ///
+ /// tb_vendorBaseCurrency control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorBaseCurrency;
+
+ ///
+ /// tb_vendorIban control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorIban;
+
+ ///
+ /// tb_vendorSwift control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorSwift;
+
+ ///
+ /// tb_vendorBsb control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorBsb;
+
+ ///
+ /// tb_vendorAccount control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorAccount;
+
+ ///
+ /// tb_vendorPayPal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorPayPal;
+
+ ///
+ /// tb_vendorTaxId control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorTaxId;
+
+ ///
+ /// tb_vendorVatNumber control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_vendorVatNumber;
+
+ ///
+ /// cb_vendorTerms control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox cb_vendorTerms;
+
+ ///
+ /// bt_vendorSubmit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_vendorSubmit;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/ProjectView.ascx b/Marketplace/usercontrols/Deli/ProjectView.ascx
new file mode 100644
index 00000000..e0ef621c
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ProjectView.ascx
@@ -0,0 +1,429 @@
+<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="ProjectView.ascx.cs"
+ Inherits="Marketplace.usercontrols.Deli.ProjectView" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+
+
+
+
+
Edit
+
+ started this project on
+
+ it's current version is
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hot fix / Upgrade Files
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/ProjectView.ascx.cs b/Marketplace/usercontrols/Deli/ProjectView.ascx.cs
new file mode 100644
index 00000000..c23b1b51
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ProjectView.ascx.cs
@@ -0,0 +1,553 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using Marketplace.Helpers;
+using Marketplace.Providers.Cart;
+using Marketplace.Providers.Accounting;
+using Marketplace.Providers.MediaFile;
+using System.Text;
+using Marketplace.Data;
+using Marketplace.uVersion;
+
+
+namespace Marketplace.usercontrols.Deli
+{
+
+
+ public partial class ProjectView : System.Web.UI.UserControl
+ {
+
+ public IListingItem Project { get; set; }
+ private IListingProvider projectProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ private Currency _currency = Currency.EUR;
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ Project = projectProvider.GetCurrentListing();
+ if (!IsPostBack)
+ {
+ projectProvider.IncrementProjectViews(Project);
+ SetSecurables();
+ SetupProject();
+ }
+ SetupAnalytics();
+ }
+
+ private void SetupProject()
+ {
+
+ #region Memberbadge
+
+ MemberPosts.Text = Project.Vendor.Member.ForumPosts.ToString();
+ MemberKarma.Text = Project.Vendor.Member.ReputationCurrent.ToString();
+
+ #endregion
+
+ #region Standard Features
+
+ ProjectName.Text = Project.Name;
+ ProjectCreateDate.Text = String.Format("{0:D}", Project.CreateDate);
+ ProjectCurrentVersion.Text = Project.CurrentVersion;
+ VendorLink.Text = Project.Vendor.Member.Name;
+ VendorLink.NavigateUrl = "/member/" + Project.Vendor.Member.Id;
+
+ //description
+ if (Project.Description.Contains('<'))
+ ProjectDescrition.Text = uForum.Library.Xslt.ResolveLinks(Project.Description);
+ else
+ ProjectDescrition.Text = uForum.Library.Xslt.ResolveLinks(umbraco.library.ReplaceLineBreaks(Project.Description));
+
+ #endregion
+
+ #region Screenshots
+ //screenshots
+ if (Project.ScreenShots.Count() > 0)
+ {
+ ScreenshotRepeater.DataSource = Project.ScreenShots;
+ ScreenshotRepeater.DataBind();
+ }
+ else
+ {
+ ScreenshotRepeater.Visible = false;
+ }
+
+ #endregion
+
+ #region Resources
+
+ //resources
+ var resouceFormat = "{1} ";
+
+ if (!string.IsNullOrEmpty(Project.ProjectUrl))
+ ProjectResources.Text += string.Format(resouceFormat, Project.ProjectUrl, "Project Website");
+
+ if(!string.IsNullOrEmpty(Project.DemonstrationUrl))
+ ProjectResources.Text += string.Format(resouceFormat, Project.DemonstrationUrl, "View a Demonstration");
+
+ if (!string.IsNullOrEmpty(Project.SourceCodeUrl))
+ ProjectResources.Text += string.Format(resouceFormat, Project.SourceCodeUrl, "Download Source Code");
+
+ if (!string.IsNullOrEmpty(Project.SupportUrl))
+ ProjectResources.Text += string.Format(resouceFormat, Project.SupportUrl, "Support & Issues");
+
+ if (!string.IsNullOrEmpty(Project.LicenseUrl))
+ ProjectResources.Text += string.Format(resouceFormat, Project.LicenseUrl, "Read the License");
+
+ #endregion
+
+ #region Files
+ //files
+
+ var vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+
+ var files = Project.PackageFile.Where(x => !x.Archived).OrderByDescending(x => x.CreateDate).Select(x => new
+ {
+ Id = x.Id,
+ Name = x.Name,
+ FileType = x.FileType.FileTypeAsString(),
+ Member = new Member(x.CreatedBy),
+ UmbracoVersion = x.UmbVersion.ToVersionNameString(), //x.UmbVersion.Description,
+ DotNetVersion = x.DotNetVersion,
+ MediumTrust = (x.SupportsMediumTrust)?"Supports Medium Trust":"Full Trust Required",
+ CreateDate = x.CreateDate.ToShortDateString()
+
+ });
+
+ if (files.Count() > 0)
+ {
+ ProjectFileRepeater.DataSource = files;
+ ProjectFileRepeater.DataBind();
+ }
+ else
+ {
+ ProjectFileRepeater.Visible = false;
+ }
+
+ var hotFixes = Project.HotFixes.Where(x => !x.Archived).OrderByDescending(x => x.CreateDate).Select(x => new
+ {
+ Id = x.Id,
+ Name = x.Name,
+ FileType = x.FileType.FileTypeAsString(),
+ Member = new Member(x.CreatedBy),
+ UmbracoVersion = x.UmbVersion.ToVersionNameString(), //x.UmbVersion.Description,
+ DotNetVersion = x.DotNetVersion,
+ MediumTrust = (x.SupportsMediumTrust) ? "Supports Medium Trust" : "Full Trust Required",
+ CreateDate = x.CreateDate.ToShortDateString()
+
+ });
+
+ if (hotFixes.Count() > 0)
+ {
+ HotFixRepeater.DataSource = hotFixes;
+ HotFixRepeater.DataBind();
+ }
+ else
+ {
+ HotFixRepeater.Visible = false;
+ }
+
+ var sourceFiles = Project.SourceFile.Where(x => !x.Archived).OrderByDescending(x => x.CreateDate).Select(x => new
+ {
+ Id = x.Id,
+ Name = x.Name,
+ FileType = x.FileType.FileTypeAsString(),
+ Member = new Member(x.CreatedBy),
+ UmbracoVersion = x.UmbVersion.ToVersionNameString(), // "TBI",//x.UmbVersion.Description,
+ DotNetVersion = x.DotNetVersion,
+ MediumTrust = (x.SupportsMediumTrust) ? "Supports Medium Trust" : "Full Trust Required",
+ CreateDate = x.CreateDate.ToShortDateString()
+
+ });
+
+ if (sourceFiles.Count() > 0)
+ {
+ SourceRepeater.DataSource = sourceFiles;
+ SourceRepeater.DataBind();
+ }
+ else
+ {
+ SourceRepeater.Visible = false;
+ }
+
+
+ #endregion
+
+ #region Documentation
+ //Documenation
+
+ var docs = Project.DocumentationFile.Where(x => !x.Archived).Select(x => new
+ {
+ Id = x.Id,
+ Name = x.Name,
+ FileType = x.FileType.FileTypeAsString(),
+ CreateDate = x.CreateDate,
+ Member = new Member(x.CreatedBy)
+ });
+
+
+ if (docs.Count() > 0)
+ {
+ ProjectDocRepeater.DataSource = docs;
+ ProjectDocRepeater.DataBind();
+ }
+ else
+ {
+ ProjectDocRepeater.Visible = false;
+ }
+
+ #endregion
+
+ #region Archive
+
+ //Archived Files
+ var archive = new List();
+
+ var packageArchive = Project.PackageFile.Where(x => x.Archived);
+ var docArchive = Project.DocumentationFile.Where(x => x.Archived);
+
+ archive.AddRange(packageArchive);
+ archive.AddRange(docArchive);
+
+ if (archive.Count() > 0)
+ {
+ ArchiveRepeater.DataSource = archive.Select(x => new
+ {
+ Id = x.Id,
+ Name = x.Name,
+ FileType = x.FileType.FileTypeAsString(),
+ Member = new Member(x.CreatedBy),
+ UmbracoVersion = x.UmbVersion.ToVersionString(), //x.UmbVersion.Description,
+ DotNetVersion = x.DotNetVersion,
+ MediumTrust = (x.SupportsMediumTrust) ? "Supports Medium Trust" : "Full Trust Required",
+ CreateDate = x.CreateDate.ToShortDateString()
+ });
+
+ ArchiveRepeater.DataBind();
+ }
+ else
+ {
+ ArchiveRepeater.Visible = false;
+ }
+
+ #endregion
+
+ #region Sidebar
+
+ //download box
+ if (!string.IsNullOrEmpty(Project.CurrentReleaseFile))
+ {
+ //ProjectNameDownload.Text = Project.Name;
+ //ProjectCurrentVersionDownload.Text = Project.CurrentVersion;
+
+ var file = Project.PackageFile.Where(x => x.Id == Int32.Parse(Project.CurrentReleaseFile)).FirstOrDefault();
+ if (file != null)
+ {
+
+ var uVersions = UVersion.GetAllVersions();
+
+ using (var ctx = new MarketplaceDataContext())
+ {
+ var count = 0;
+ var verCount = 0;
+ var ct = "This project has been reported to be compatible with ";
+
+ foreach (var ver in uVersions)
+ {
+ var reports = ctx.DeliVersionCompatibilities.Where(x => x.version == ver.Name && x.projectId == Project.Id);
+
+ if (reports.Count() > 0)
+ {
+ float compats = reports.Where(x => x.isCompatible).Count();
+ float numReps = reports.Count();
+ var perc = Convert.ToInt32(((compats / numReps) * 100));
+
+ if (perc >= 80)
+ {
+ verCount++;
+ if (count < 2)
+ {
+ count++;
+ ct += ver.Name + ", ";
+ }
+ }
+ }
+
+ }
+
+ if (count == 0)
+ ct = "No compatible versions have been reported, be the first!";
+ else
+ {
+ if (verCount > 2)
+ {
+ ct += "and " + (verCount - 2) + " other versions.";
+ }
+ else
+ ct = ct.Trim().TrimEnd(',');
+ }
+ ProjectCompatitbleWithUmbraco.Text = ct;
+ }
+
+
+ // file.UmbVersion.Description;
+
+ ////////////////////////////////////////////////////////////////
+ // moved to versionCompatibilityReport.cshtml for AJAXifCation//
+ ////////////////////////////////////////////////////////////////
+
+ //var compatDetails = "This project is compatible with the following versions as reported by community members who have downloaded this package: ";
+
+ //var uVersions = UVersion.GetAllVersions();
+
+ //using (var ctx = new MarketplaceDataContext())
+ //{
+ // foreach (var ver in uVersions)
+ // {
+ // var reports = ctx.DeliVersionCompatibilities.Where(x => x.version == ver.Name && x.projectId == Project.Id);
+
+ // if (reports.Count() > 0)
+ // {
+ // float compats = reports.Where(x => x.isCompatible).Count();
+ // float numReps = reports.Count();
+ // var perc = Convert.ToInt32(((compats / numReps) * 100));
+
+ // var smiley = "unhappy";
+
+ // if (perc >= 95)
+ // smiley = "joyous";
+ // else if (perc < 95 && perc >= 80)
+ // smiley = "happy";
+ // else if (perc < 80 && perc >= 65)
+ // smiley = "neutral";
+ // else if (perc < 65 && perc >= 50)
+ // smiley = "unhappy";
+ // else
+ // smiley = "superUnhappy";
+
+ // compatDetails += "" + ver.Name + " (" + perc + "%) ";
+ // }
+ // else
+ // compatDetails += "" + ver.Name + " (untested) ";
+ // }
+ //}
+
+ //compatDetails += " ";
+
+
+ var compatDetails = string.Empty;
+ if (!string.IsNullOrEmpty(file.DotNetVersion))
+ compatDetails += ".NET Version: " + file.DotNetVersion + " ";
+
+ compatDetails += "Supports Medium Trust: ";
+ compatDetails += (file.SupportsMediumTrust) ? "Yes" : "No";
+ compatDetails += " ";
+ ProjectCompatibileDetails.Text = compatDetails;
+
+ }
+
+ }
+ else
+ {
+ HasReports.Visible = false;
+ DownloadPanel.Visible = false;
+ }
+
+
+
+ //Commercial options
+ if (Project.ListingType != ListingType.commercial)
+ {
+ CommercePanel.Visible = false;
+ }
+ else
+ {
+ var licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ var licenses = licenseProvider.GetProjectLicenses(Project.ProjectGuid).Where(x => x.IsActive);
+ ProjectPurchaseRepeater.DataSource = licenses;
+ ProjectPurchaseRepeater.DataBind();
+ }
+
+ //Collab
+ CollabPanel.Visible = Project.OpenForCollab;
+
+
+
+ //package info panel
+
+ //project contributors
+
+ using (var ctx = new MarketplaceDataContext())
+ {
+ var contributors = ctx.projectContributors.Where(x => x.projectId == Project.Id)
+ .Select(x => new Member(x.memberId)).ToList();
+
+
+ if (contributors.Count() > 0)
+ {
+ ContribRepeater.DataSource = contributors;
+ ContribRepeater.DataBind();
+ }
+ }
+
+ //Tags
+
+ TagRepeater.DataSource = Project.Tags;
+ TagRepeater.DataBind();
+
+ if (TagEditPanel.Visible)
+ {
+ TagEditRepeater.DataSource = Project.Tags;
+ TagEditRepeater.DataBind();
+
+ string taglist = string.Empty;
+ var tagProvider = ((IProjectTagProvider)MarketplaceProviderManager.Providers["TagProvider"]);
+ var tags = tagProvider.GetAllTags();
+ foreach (var t in tags)
+ {
+ taglist += "\"" + t.Text + "\",";
+ }
+
+ TagStringArray.Text = taglist;
+ }
+
+ //Download Counter
+
+ DownloadCount.Text = Project.Downloads.ToString();
+
+ #endregion
+
+ }
+
+ protected void SetupAnalytics()
+ {
+ if (!string.IsNullOrEmpty(Project.GACode))
+ {
+
+ var eventCategory = "_" + Project.Name.ToLower().Replace(" ", "");
+ var analyticsSB = new StringBuilder();
+
+ analyticsSB.Append("");
+
+
+ // need a better way to do this. For some reason have to walk to the top of the tree then down to find it.
+ Literal holder = Page.Master.Master.Master.Controls[0].FindControl("EndScripts").FindControl("EndScriptsLit") as Literal;
+ holder.Text = analyticsSB.ToString();
+
+ }
+ }
+
+ protected void LicenseBound(Object sender, RepeaterItemEventArgs e)
+ {
+ var cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ ICart _cart = cartProvider.GetCurrentCart();
+ _currency = _cart.Currency;
+
+ Literal _name = (Literal)e.Item.FindControl("LicenseType");
+ Literal _price = (Literal)e.Item.FindControl("LicensePrice");
+ ImageButton _addToCart = (ImageButton)e.Item.FindControl("LicenseAddToCart");
+
+ var License = (ILicense)e.Item.DataItem;
+
+ switch (License.LicenseType)
+ {
+ case LicenseType.Domain:
+ _name.Text = "Domain";
+ break;
+ case LicenseType.IP:
+ _name.Text = "IP";
+ break;
+ case LicenseType.Unlimited:
+ _name.Text = "Unlimited";
+ break;
+ case LicenseType.SourceCode:
+ _name.Text = "Source Code";
+ break;
+ default:
+ break;
+ }
+
+ _price.Text = DeliCurrency.FriendlyConvertFromEuro((decimal)License.Price, DeliCurrency.FromSymbol(_currency.ToString()));
+ _addToCart.CommandArgument = License.Id.ToString();
+
+ if (!String.IsNullOrEmpty(Project.GACode))
+ {
+ var eventCategory = "_" + Project.Name.ToLower().Replace(" ", "");
+ _addToCart.OnClientClick = "vendorTracker._trackEvent('" + eventCategory + "', 'Add To Cart - " + _name.Text + "', '" + Project.Name + " " + _name.Text + "'," + License.Price + ");";
+ }
+
+
+ }
+
+ protected void _addToCart_Click(object sender, EventArgs e)
+ {
+ var button = (ImageButton)sender;
+ var license = ((ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"]).GetLicense(Int32.Parse(button.CommandArgument));
+ var cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+
+ var cartItem = new CartItem()
+ {
+ LicenseId = Int32.Parse(button.CommandArgument),
+ ListingItem = Project,
+ Quantity = 1,
+ GrossPrice = license.Price
+
+ };
+
+ cartProvider.AddItem(cartItem);
+
+ //redirect to the cart after adding item.
+ Response.Redirect("~/deli/cart?returnUrl=" + Server.UrlEncode(Request.RawUrl));
+
+ }
+
+ private void SetSecurables()
+ {
+ var memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ var mem = memberProvider.GetCurrentMember();
+ var isVendorAuthenticated = umbraco.library.IsLoggedOn() && (Project.Vendor.Member.Id == mem.Id || our.Utills.IsProjectContributor(mem.Id,Project.Id));
+ EditOption.Visible = isVendorAuthenticated;
+ TagEditPanel.Visible = isVendorAuthenticated;
+
+
+ //ReportVersionOptions.Visible = !isVendorAuthenticated && umbraco.library.IsLoggedOn() && library.HasDownloaded(mem.Id, Project.Id);
+ VotingOptions.Visible = !isVendorAuthenticated && umbraco.library.IsLoggedOn() && uPowers.Library.Xslt.YourVote(mem.Id,Project.Id,"powersProject") == 0; // show voting only if the member is logged on and is not associated with the project in some way;
+
+ if (mem != null)
+ {
+ AdminVotingOptions.Visible = (mem.Groups.Contains("admin") && Project.Karma < 15);
+ }
+ else
+ {
+ AdminVotingOptions.Visible = false;
+ }
+
+
+ }
+
+ protected string IsVoteable()
+ {
+ var mem = Member.GetCurrentMember();
+
+ if (mem == null || (int)mem.getProperty("reputationCurrent").Value <= 69)
+ {
+ return " noVote";
+ }
+ return "";
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/ProjectView.ascx.designer.cs b/Marketplace/usercontrols/Deli/ProjectView.ascx.designer.cs
new file mode 100644
index 00000000..0b6c5bc8
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ProjectView.ascx.designer.cs
@@ -0,0 +1,294 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class ProjectView {
+
+ ///
+ /// VotingOptions control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder VotingOptions;
+
+ ///
+ /// AdminVotingOptions control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder AdminVotingOptions;
+
+ ///
+ /// EditOption control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder EditOption;
+
+ ///
+ /// VendorLink control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink VendorLink;
+
+ ///
+ /// ProjectCreateDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCreateDate;
+
+ ///
+ /// ProjectCurrentVersion control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCurrentVersion;
+
+ ///
+ /// DownloadPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder DownloadPanel;
+
+ ///
+ /// MemberPosts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal MemberPosts;
+
+ ///
+ /// MemberKarma control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal MemberKarma;
+
+ ///
+ /// CommercePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CommercePanel;
+
+ ///
+ /// ProjectPurchaseRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ProjectPurchaseRepeater;
+
+ ///
+ /// HasReports control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder HasReports;
+
+ ///
+ /// ProjectCompatitbleWithUmbraco control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCompatitbleWithUmbraco;
+
+ ///
+ /// ProjectCompatibileDetails control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCompatibileDetails;
+
+ ///
+ /// ReportVersionOptions control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ReportVersionOptions;
+
+ ///
+ /// ContribRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ContribRepeater;
+
+ ///
+ /// TagRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater TagRepeater;
+
+ ///
+ /// DownloadCount control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal DownloadCount;
+
+ ///
+ /// TagEditPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder TagEditPanel;
+
+ ///
+ /// TagStringArray control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal TagStringArray;
+
+ ///
+ /// TagEditRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater TagEditRepeater;
+
+ ///
+ /// CollabPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CollabPanel;
+
+ ///
+ /// ProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectName;
+
+ ///
+ /// ProjectDescrition control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectDescrition;
+
+ ///
+ /// ScreenshotRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ScreenshotRepeater;
+
+ ///
+ /// ProjectFileRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ProjectFileRepeater;
+
+ ///
+ /// HotFixRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater HotFixRepeater;
+
+ ///
+ /// SourceRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater SourceRepeater;
+
+ ///
+ /// ProjectDocRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ProjectDocRepeater;
+
+ ///
+ /// ProjectResources control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectResources;
+
+ ///
+ /// ArchiveRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ArchiveRepeater;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/ProjectsList.ascx b/Marketplace/usercontrols/Deli/ProjectsList.ascx
new file mode 100644
index 00000000..97a1ddaa
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ProjectsList.ascx
@@ -0,0 +1,62 @@
+<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="ProjectsList.ascx.cs" Inherits="Marketplace.usercontrols.Deli.ProjectsList" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+<%@ Import Namespace="Marketplace.Providers.Helpers" %>
+<%@ Register Src="~/usercontrols/Deli/ListPagination.ascx" TagPrefix="deli" TagName="paging" %>
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/ProjectsList.ascx.cs b/Marketplace/usercontrols/Deli/ProjectsList.ascx.cs
new file mode 100644
index 00000000..1b8433fe
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ProjectsList.ascx.cs
@@ -0,0 +1,132 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI;
+using Marketplace.Providers;
+using Marketplace.Interfaces;
+using Marketplace.Providers.Helpers;
+
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class ProjectsList : UserControl
+ {
+
+ public int TotalListings { get; set; }
+ public int PageStartListingNumber { get; set; }
+ public int PageEndListingNumber { get; set; }
+
+ private string _listingType = "";
+ public string ListingType
+ {
+ get { return _listingType; }
+ set { _listingType = value; }
+
+ }
+
+ private int _maxPageSize = 20;
+ public int MaxPageSize { get { return _maxPageSize; } set { _maxPageSize = value; } }
+
+ private int _pageNumber;
+ public int PageNumber
+ {
+ get
+ {
+ if (_pageNumber > 0)
+ return _pageNumber - 1;
+
+ return _pageNumber;
+ }
+ set
+ {
+ _pageNumber = value;
+ }
+ }
+
+ public string Tag { get; set; }
+
+ public bool IsCategoryListing { get; set; }
+
+
+ protected void Page_PreRender(object sender, EventArgs e)
+ {
+ Bind_Data();
+ }
+
+ protected void Bind_Data()
+ {
+ int count;
+
+ var projectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ List projects;
+
+ Tag = (string.IsNullOrEmpty(Tag) == false && Tag != "all") ? Tag : string.Empty;
+
+ var skip = PageNumber * _maxPageSize;
+ var take = _maxPageSize;
+
+ if (IsCategoryListing == false)
+ {
+ if (string.IsNullOrEmpty(Tag))
+ {
+ count = projectsProvider.Count();
+ projects = projectsProvider.GetAllListings(skip, take, true).OrderByDescending(x => x.Downloads).ToList();
+ }
+ else
+ {
+ count = projectsProvider.Count(Tag);
+ projects = projectsProvider.GetListingsByTag(Tag, skip, take, true).ToList();
+ }
+ }
+ else
+ {
+ var categoryProvider = (ICategoryProvider)MarketplaceProviderManager.Providers["CategoryProvider"];
+ var category = categoryProvider.GetCurrent();
+
+ count = string.IsNullOrEmpty(ListingType) == false
+ ? projectsProvider.Count(category)
+ : projectsProvider.Count(category, ListingType.GetListingTypeFromString());
+
+ Trace.Write("begin get category");
+
+ projects = string.IsNullOrEmpty(ListingType)
+ ? projectsProvider.GetListingsByCategory(category, skip, take, true).ToList()
+ : projectsProvider.GetListingsByCategory(category, ListingType.GetListingTypeFromString(), skip, take, true).ToList();
+
+ Trace.Write("end get category");
+ }
+
+ if (count > _maxPageSize)
+ {
+ paging.Visible = true;
+
+ var numPages = (count / (decimal)_maxPageSize);
+ var intNumPages = Convert.ToInt32(numPages);
+
+ if (numPages % 1 > 0 && numPages % 1 <= (decimal)0.5)
+ {
+ intNumPages += 1;
+ }
+
+ paging.NumberOfPages = intNumPages;
+ }
+
+ var projectCount = projects.Count();
+ if (projectCount > 0)
+ {
+ TotalListings = count;
+ PageStartListingNumber = skip + 1;
+ PageEndListingNumber = skip + projectCount;
+ }
+ else
+ {
+ ProjectCounter.Visible = false;
+ Listing.Visible = false;
+ NoListings.Visible = true;
+ }
+
+ Listing.DataSource = projects;
+ Listing.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/ProjectsList.ascx.designer.cs b/Marketplace/usercontrols/Deli/ProjectsList.ascx.designer.cs
new file mode 100644
index 00000000..c35b6969
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/ProjectsList.ascx.designer.cs
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class ProjectsList {
+
+ ///
+ /// ProjectCounter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ProjectCounter;
+
+ ///
+ /// Listing control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater Listing;
+
+ ///
+ /// NoListings control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder NoListings;
+
+ ///
+ /// paging control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Marketplace.usercontrols.Deli.ListPagination paging;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx b/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx
new file mode 100644
index 00000000..4e153419
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx
@@ -0,0 +1,61 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PayPalConfirm.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Purchase.PayPalConfirm" %>
+
+
+Thank You!
+
+
+Your order is being processed and you licenses will be available shortly.
+
+
+Your Licenses
+
+Your Profile
+
+
+
+
+
+
+
+Your order is confirmed and your license is ready to configure.
+Please select a link below to continue:
+
+
+
+Your Licenses
+
+Your Profile
+
+
+
+
+
+
+
+
+
+Invoice
+
+
+
+ Your invoice is available
here
+
+
+
+
+
+
+Thank You!
+
+Your order is pending approval and your license will be ready soon.
+Please select a link below to continue:
+
+
+
+Your Licenses
+
+Your Profile
+
+
+
+
diff --git a/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx.cs b/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx.cs
new file mode 100644
index 00000000..053893a7
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx.cs
@@ -0,0 +1,527 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Providers.Orders;
+using Marketplace.Providers;
+using Marketplace.Interfaces;
+using Marketplace.Providers.Listing;
+using Marketplace.Providers.OrderNote;
+using Marketplace.Providers.MemberLicense;
+using System.Collections.Specialized;
+using System.Net;
+using System.Text;
+using umbraco.BusinessLogic;
+using Umbraco.Ecommerce.BusinessLogic;
+using Umbraco.Ecommerce.PaymentMethods;
+using System.Configuration;
+using NotificationsCore;
+
+namespace Marketplace.usercontrols.Deli.Purchase
+{
+ public partial class PayPalConfirm : System.Web.UI.UserControl
+ {
+ #region properties
+
+ private UmbracoEcommerceOrderProvider _orderProvider;
+ public UmbracoEcommerceOrderProvider OrderProvider
+ {
+ get
+ {
+ if (_orderProvider != null)
+ return _orderProvider;
+ else
+ {
+ _orderProvider = (UmbracoEcommerceOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ return _orderProvider;
+ }
+ }
+ }
+
+ public IOrder dOrder;
+
+ private IDeliOrderItemProvider _orderItemProvider;
+ public IDeliOrderItemProvider OrderItemProvider
+ {
+ get
+ {
+ if (_orderItemProvider != null)
+ return _orderItemProvider;
+ else
+ {
+ _orderItemProvider = (IDeliOrderItemProvider)MarketplaceProviderManager.Providers["OrderItemProvider"];
+ return _orderItemProvider;
+ }
+ }
+ }
+
+ private NodeListingProvider _listingProvider;
+ public NodeListingProvider ListingProvider
+ {
+ get
+ {
+ if (_listingProvider != null)
+ return _listingProvider;
+ else
+ {
+ _listingProvider = (NodeListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ return _listingProvider;
+ }
+ }
+ }
+
+ private OrderNoteProvider _orderNoteProvider;
+ public OrderNoteProvider OrderNoteProvider
+ {
+ get
+ {
+ if (_orderNoteProvider != null)
+ return _orderNoteProvider;
+ else
+ {
+ _orderNoteProvider = (OrderNoteProvider)MarketplaceProviderManager.Providers["OrderNoteProvider"];
+ return _orderNoteProvider;
+ }
+ }
+ }
+
+ private ILicenseProvider _licenseProvider;
+ public ILicenseProvider LicenseProvider
+ {
+ get
+ {
+ if (_licenseProvider != null)
+ return _licenseProvider;
+ else
+ {
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ return _licenseProvider;
+ }
+ }
+ }
+
+ public MemberLicense mLicense;
+
+ private IMemberLicenseProvider _memberLicenseProvider;
+ public IMemberLicenseProvider MemberLicenseProvider
+ {
+ get
+ {
+ if (_memberLicenseProvider != null)
+ return _memberLicenseProvider;
+ else
+ {
+ _memberLicenseProvider = (IMemberLicenseProvider)MarketplaceProviderManager.Providers["memberLicenseProvider"];
+ return _memberLicenseProvider;
+ }
+ }
+ }
+
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+
+ private bool testMode = bool.Parse(ConfigurationManager.AppSettings["deliPayPalTest"]);
+ public bool TestMode
+ {
+ get { return testMode; }
+ set { testMode = value; }
+ }
+
+ #endregion
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ if (!IsPostBack)
+ {
+
+ NameValueCollection form = HttpContext.Current.Request.QueryString;
+ HandleOrder(form, TestMode);
+
+ }
+
+ }
+ catch (Exception ex)
+ {
+ string formStr = "";
+ foreach (string key in HttpContext.Current.Request.QueryString.AllKeys)
+ formStr += key + ": " + HttpContext.Current.Request.QueryString[key] + "...";
+
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "PAYPAL CONFIRM: Response: " + ex.ToString() + formStr);
+
+ }
+ }
+
+ public void TESTHandleOrder(NameValueCollection form, bool testMode)
+ {
+ try
+ {
+ string amount = form["amount"];
+ int invoice = int.Parse(form["invoice"]);
+ string status = form["payment_status"];
+ string txt_id = form["txn_id"];
+
+ // log the IPN response in the umbracoLog
+ string formStr = "";
+ foreach (string key in form.AllKeys)
+ formStr += key + ": " + form[key] + "....";
+
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL CONFIRM: - " + formStr);
+
+ }
+ catch (Exception ex)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL CONFIRM ERROR: " + ex.ToString());
+ }
+ }
+
+ public void HandleOrder(NameValueCollection form, bool testMode)
+ {
+ try
+ {
+ string amount = form["mc_gross"];
+ int invoice = int.Parse(form["invoice"]);
+ string status = form["payment_status"];
+ string txt_id = form["txn_id"];
+ string NoteText = "";
+
+ // log the PayPal response in the umbracoLog before anything else
+ string formStr = "";
+ foreach (string key in form.AllKeys)
+ formStr += key + ": " + form[key] + "....";
+
+ // get the Deli Order
+ dOrder = OrderProvider.GetOrder(invoice);
+
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL CONFIRM: Order: " + dOrder.Id.ToString() + " - " + formStr);
+
+ switch (status)
+ {
+ case "Completed":
+ // make sure this isn't a duplicate from paypal
+ if (dOrder.Status != OrderStatus.Confirmed)
+ {
+ if (!testMode) // production!
+ {
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Confirmed.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Confirmed;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ dOrder.PaymentDate = DateTime.Now.ToUniversalTime();
+ dOrder.ProcessedTotal = Convert.ToDouble(amount);
+
+ // create a MemberLicense for each OrderItem
+ foreach (IOrderItem item in dOrder.Items)
+ {
+ // create licenses for multiple quantity
+ for (int i = 0; i < item.Quantity; i++)
+ {
+ mLicense = new MemberLicense();
+ mLicense.LicenseId = LicenseProvider.GetLicense(item.LicenseId).Id;
+ mLicense.Member = dOrder.Member;
+ mLicense.OrderItemId = item.Id;
+ mLicense.ListingItemId = item.ListingItemId;
+ mLicense.CreateDate = DateTime.Now.ToUniversalTime();
+ mLicense.IsActive = true;
+
+ MemberLicenseProvider.SaveOrUpdate(mLicense);
+ }
+ }
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ // webservice call to create order on umbraco.com
+ string invoicePath;
+
+ try
+ {
+ invoicePath = CreateDotComOrder(dOrder, txt_id);
+ }
+ catch (Exception e)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL CONFIRM ERROR: " + e.Message + " :: " + e.InnerException + " :: " + e.StackTrace);
+
+ invoicePath = string.Empty;
+
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli Error: invoice generation failed");
+
+ InvoicePanel.Visible = false;
+ PaymentConfirmPanel.Visible = true;
+ PaymentPendingPanel.Visible = false;
+ }
+
+ if (invoicePath.Length > 0)
+ {
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli invoice: " + invoicePath);
+
+ InvoiceLink.NavigateUrl = "http://umbraco.com" + invoicePath;
+
+ InvoicePanel.Visible = true;
+
+ }
+
+ PaymentConfirmPanel.Visible = true;
+ PaymentPendingPanel.Visible = false;
+
+
+ // send order complete mail
+ InstantNotification not = new InstantNotification();
+ not.Invoke(NotificationsWeb.Config.ConfigurationFile, NotificationsWeb.Config.AssemblyDir, "DeliOrderComplete", dOrder, dOrder.Member, txt_id);
+
+ }
+ else // test!
+ {
+ NoteText = "DEV order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Confirmed.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Confirmed;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ dOrder.PaymentDate = DateTime.Now.ToUniversalTime();
+ dOrder.ProcessedTotal = Convert.ToDouble(amount);
+
+ // create a MemberLicense for each OrderItem
+ foreach (IOrderItem item in dOrder.Items)
+ {
+ // create licenses for multiple quantity
+ for (int i = 0; i < item.Quantity; i++)
+ {
+ mLicense = new MemberLicense();
+ mLicense.LicenseId = LicenseProvider.GetLicense(item.LicenseId).Id;
+ mLicense.Member = dOrder.Member;
+ mLicense.OrderItemId = item.Id;
+ mLicense.ListingItemId = item.ListingItemId;
+ mLicense.CreateDate = DateTime.Now.ToUniversalTime();
+ mLicense.IsActive = true;
+
+ MemberLicenseProvider.SaveOrUpdate(mLicense);
+ }
+ }
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ // webservice call to create order on umbraco.com
+ string invoicePath;
+
+ try
+ {
+ invoicePath = CreateDotComOrder(dOrder, txt_id);
+ }
+ catch (Exception e)
+ {
+
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL CONFIRM ERROR: " + e.Message + " :: " + e.InnerException + " :: " + e.StackTrace);
+
+ invoicePath = string.Empty;
+
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli Error: invoice generation failed");
+
+ InvoicePanel.Visible = false;
+ PaymentConfirmPanel.Visible = true;
+ PaymentPendingPanel.Visible = false;
+ }
+
+ if (invoicePath.Length > 0)
+ {
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, "Deli invoice: " + invoicePath);
+
+ InvoiceLink.NavigateUrl = "http://umbraco.com" + invoicePath;
+
+ InvoicePanel.Visible = true;
+
+ }
+
+
+ PaymentConfirmPanel.Visible = true;
+ PaymentPendingPanel.Visible = false;
+
+
+ // send order complete mail
+ InstantNotification not = new InstantNotification();
+ not.Invoke(NotificationsWeb.Config.ConfigurationFile, NotificationsWeb.Config.AssemblyDir, "DeliOrderComplete", dOrder, dOrder.Member, txt_id);
+
+ }
+
+ }
+ break;
+
+ case "Pending":
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Pending.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Pending;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ break;
+
+ case "Failed":
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Rejected.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Rejected;
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ break;
+
+ case "Refunded":
+ NoteText = "order status changed from " + dOrder.Status.ToString() + " to " + OrderStatus.Refunded.ToString() + "with transaction id: " + txt_id;
+ dOrder.Status = OrderStatus.Refunded;
+ dOrder.IsRefunded = true;
+ dOrder.RefundDate = DateTime.Now.ToUniversalTime();
+
+ OrderNoteProvider.AddOrderNote((int)dOrder.Id, (int)dOrder.Member.Id, NoteText);
+
+ // todo: revoke license here
+ // todo: mark specific OrderItems as Refunded
+
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ break;
+
+ default:
+ break;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ Log.Add(LogTypes.Debug, -1, "DELI PAYPAL CONFIRM " + ex.Message + " :: " + ex.InnerException + " :: " + ex.StackTrace);
+ }
+ }
+
+ public int CreateEcomOrder(IOrder o, bool TestMode)
+ {
+ try
+ {
+ // Create customer information
+ CustomerInfo ci = new CustomerInfo();
+ ci.AddData("id", o.Member.Id.ToString());
+ ci.AddData("email", o.Member.Email);
+
+ Guid payment = new CreditCard().Id;
+
+ // create order
+ Order providerOrder = Order.MakeNew(ci.ToXml(), o.Id.ToString(), payment, "deli order", o.Member.Email);
+ providerOrder.CustomerReference = o.Id.ToString();
+ providerOrder.ChangeStatus(Order.Status.Confirmed);
+ providerOrder.Comment = "deli order";
+
+ if (TestMode)
+ providerOrder.TestMode = true;
+
+ foreach (IOrderItem item in dOrder.Items)
+ {
+ OrderLine l = new OrderLine();
+ l.Quantity = item.Quantity;
+ l.ProductName = ListingProvider.GetListing(item.ListingItemId, false).Name + ", License: " + LicenseProvider.GetLicense(item.LicenseId).LicenseType.ToString();
+ l.Price = (decimal)item.NetPrice;
+ l.ProductId = item.ListingItemId.ToString();
+ l.Note = "deli order id: " + o.Id.ToString();
+
+ providerOrder.AddOrderLine(l);
+ }
+
+ // generate invoice
+ if (!TestMode)
+ providerOrder.GenerateInvoice(false);
+ else
+ providerOrder.GenerateInvoice(true);
+
+
+ return providerOrder.OrderId;
+ }
+ catch
+ {
+ return 0;
+ }
+ }
+
+ protected string CreateDotComOrder(IOrder dOrder, string transactionId)
+ {
+ com.umbraco.orders.Orders orderService = new com.umbraco.orders.Orders();
+ com.umbraco.orders.OrderProxy orderProxy = new com.umbraco.orders.OrderProxy();
+ com.umbraco.orders.BuyerProxy buyerProxy = new com.umbraco.orders.BuyerProxy();
+
+ // set up Ecomm Order
+ orderProxy.DeliOrderID = dOrder.Id;
+ orderProxy.PurchaseOrder = "";
+ orderProxy.TransactionID = transactionId;
+
+ // buyer
+ buyerProxy.ourMemberId = dOrder.Member.Id;
+ buyerProxy.ourMemberGuid = dOrder.Member.UniqueId;
+ buyerProxy.IP = dOrder.IP;
+ buyerProxy.Name = dOrder.Member.Name;
+ buyerProxy.Login = dOrder.Member.Name;
+ buyerProxy.Address = dOrder.Member.CompanyAddress;
+ buyerProxy.Company = dOrder.Member.Company;
+ buyerProxy.Country = Marketplace.library.GetCountry(dOrder.Member.CompanyCountry);
+ buyerProxy.Email = dOrder.CompanyInvoiceEmail;
+ buyerProxy.VAT = !dOrder.Member.VatInvalid?dOrder.Member.CompanyVATNumber:"";
+ buyerProxy.Phone = "";
+
+ //order lines
+ var orderLineProxyList = new List();
+
+ foreach(IOrderItem item in dOrder.Items)
+ {
+ com.umbraco.orders.OrderLineProxy lineProxy = new com.umbraco.orders.OrderLineProxy();
+ IListingItem listingItem = ListingProvider.GetListing(item.ListingItemId);
+
+ lineProxy.VendorEconomicID = listingItem.Vendor.EconomicId;
+ lineProxy.Amount = (decimal)item.NetPrice;
+ lineProxy.Quantity = item.Quantity;
+ lineProxy.description = ListingProvider.GetListing(item.ListingItemId, false).Name + ", License Type: " + LicenseProvider.GetLicense(item.LicenseId).LicenseType.ToString();
+
+ // add order line to order
+ orderLineProxyList.Add(lineProxy);
+
+ }
+
+
+ orderProxy.OrderLines = orderLineProxyList.ToArray();
+ orderProxy.Buyer = buyerProxy;
+
+ bool isTestMode = bool.Parse(ConfigurationManager.AppSettings["deliPayPalTest"]);
+
+
+ com.umbraco.orders.OrderProxy returnOrderProxy = orderService.Create(orderProxy, isTestMode, ConfigurationManager.AppSettings["deliWebServiceUser"], ConfigurationManager.AppSettings["deliWebServicePass"]);
+
+
+ // set Ecomm order id
+ dOrder.OrderId = returnOrderProxy.EcommerceOrderID;
+ OrderProvider.SaveOrUpdate(dOrder);
+
+ return returnOrderProxy.InvoicePath;
+
+ }
+
+
+ #region Utilities
+
+ private string Encode(string oldValue)
+ {
+ string newValue = oldValue.Replace("\"", "'");
+ newValue = System.Web.HttpUtility.UrlEncode(newValue);
+ newValue = newValue.Replace("%2f", "/");
+ return newValue;
+ }
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx.designer.cs b/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx.designer.cs
new file mode 100644
index 00000000..e5847153
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Purchase/PayPalConfirm.ascx.designer.cs
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Purchase {
+
+
+ public partial class PayPalConfirm {
+
+ ///
+ /// PaymentConfirmPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel PaymentConfirmPanel;
+
+ ///
+ /// InvoicePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel InvoicePanel;
+
+ ///
+ /// InvoiceLink control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink InvoiceLink;
+
+ ///
+ /// PaymentPendingPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel PaymentPendingPanel;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx b/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx
new file mode 100644
index 00000000..19cffd8a
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx
@@ -0,0 +1,42 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PayPalPayment.ascx.cs" Inherits="Marketplace.usercontrols.Deli.Purchase.PayPalPayment" %>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx.cs b/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx.cs
new file mode 100644
index 00000000..9c140fe5
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx.cs
@@ -0,0 +1,243 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using umbraco.cms.businesslogic.member;
+using umbraco.businesslogic;
+
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using Marketplace.Providers.Orders;
+using Marketplace.Providers.PaymentInfo;
+using Marketplace.Providers.Listing;
+using Marketplace.Providers.Accounting;
+using System.Configuration;
+
+namespace Marketplace.usercontrols.Deli.Purchase
+{
+ public partial class PayPalPayment : System.Web.UI.UserControl
+ {
+
+ #region Properties
+
+ private bool testMode = bool.Parse(ConfigurationManager.AppSettings["deliPayPalTest"]);
+ public bool TestMode
+ {
+ get { return testMode; }
+ set { testMode = value; }
+ }
+
+ private string merchantEmailAddress;
+ public string MerchantEmailAddress
+ {
+ get { return merchantEmailAddress; }
+ set { merchantEmailAddress = value; }
+ }
+
+ private int notifyPageID;
+ public int NotiFyPageID
+ {
+ get { return notifyPageID; }
+ set { notifyPageID = value; }
+ }
+
+ private int returnPageID;
+ public int ReturnPageID
+ {
+ get { return returnPageID; }
+ set { returnPageID = value; }
+ }
+
+ public string _email = "";
+ public string _totalPrice = "";
+ public string _orderTaxTotal = "";
+ public string _paypalurl = "https://www.paypal.com/cgi-bin/webscr";
+ public string _notifyurl = "";
+ public string _returnurl = "";
+
+ #endregion
+
+ private ICartProvider _cartProvider;
+ public ICartProvider CartProvider
+ {
+ get
+ {
+ if (_cartProvider != null)
+ {
+ return _cartProvider;
+ }
+ else
+ {
+ _cartProvider = (ICartProvider)MarketplaceProviderManager.Providers["CartProvider"];
+ return _cartProvider;
+ }
+ }
+ }
+
+ private ICart _cart;
+ public ICart ShoppingCart
+ {
+ get
+ {
+ if (_cart != null)
+ {
+ return _cart;
+ }
+ else
+ {
+ _cart = CartProvider.GetCurrentCart();
+ return _cart;
+ }
+ }
+ set
+ {
+ _cart = value;
+ }
+ }
+
+ private UmbracoEcommerceOrderProvider _orderProvider;
+ public UmbracoEcommerceOrderProvider OrderProvider
+ {
+ get
+ {
+ if (_orderProvider != null)
+ return _orderProvider;
+ else
+ {
+ _orderProvider = (UmbracoEcommerceOrderProvider)MarketplaceProviderManager.Providers["OrderProvider"];
+ return _orderProvider;
+ }
+ }
+ }
+
+ private IOrder _order;
+ public IOrder Order
+ {
+ get
+ {
+ if (_order != null)
+ return _order;
+ else
+ {
+ if (ShoppingCart.OrderId != null)
+ {
+ _order = OrderProvider.GetOrder((int)ShoppingCart.OrderId);
+ return _order;
+ }
+ else
+ {
+ _order = OrderProvider.CreateOrder(ShoppingCart);
+ return _order;
+ }
+ }
+ }
+ }
+
+ private NodeListingProvider _listingProvider;
+ public NodeListingProvider ListingProvider
+ {
+ get
+ {
+ if (_listingProvider != null)
+ return _listingProvider;
+ else
+ {
+ _listingProvider = (NodeListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ return _listingProvider;
+ }
+ }
+ }
+
+ private ILicenseProvider _licenseProvider;
+ public ILicenseProvider LicenseProvider
+ {
+ get
+ {
+ if (_licenseProvider != null)
+ return _licenseProvider;
+ else
+ {
+ _licenseProvider = (ILicenseProvider)MarketplaceProviderManager.Providers["LicenseProvider"];
+ return _licenseProvider;
+ }
+ }
+ }
+
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+ private IMember _member;
+ public IMember Member
+ {
+ get
+ {
+ if (_member != null)
+ return _member;
+ else
+ {
+ _member = MemberProvider.GetCurrentMember();
+ return _member;
+ }
+ }
+ }
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ if (umbraco.library.IsLoggedOn())
+ {
+ if (Order.Member.Id == Member.Id)
+ {
+ pl_orderInfo.Visible = true;
+
+ // set config
+ SetConfiguration();
+
+ _totalPrice = CartProvider.GetLocalizedCartGrossValue().ToString();
+ _orderTaxTotal = CartProvider.GetLocalizedTaxTotal().ToString();
+
+ _email = Member.CompanyInvoiceEmail;
+
+ // clear the cart from sesison
+ _cartProvider.ClearCart();
+
+ }
+ }
+
+ }
+
+ protected void SetConfiguration()
+ {
+
+ _notifyurl = "http://" + Request.Url.Host + "/umbraco/ipn/production.aspx";
+ _returnurl = "http://" + Request.Url.Host + umbraco.library.NiceUrl(Int32.Parse(ConfigurationManager.AppSettings["deliPayPalReturnUrl"].ToString()));
+
+ merchantEmailAddress = "sales@umbraco.dk";
+
+ if (TestMode)
+ {
+ _paypalurl = "https://www.sandbox.paypal.com/cgi-bin/webscr";
+ merchantEmailAddress = "paul@umbraco.com";
+ _notifyurl = "http://dev.our.umbraco.org/umbraco/ipn/dev.aspx";
+ _returnurl = "http://dev.our.umbraco.org/deli/order-confirm.aspx";
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx.designer.cs b/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx.designer.cs
new file mode 100644
index 00000000..3295387c
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Purchase/PayPalPayment.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.Purchase {
+
+
+ public partial class PayPalPayment {
+
+ ///
+ /// pl_orderInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder pl_orderInfo;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx b/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx
new file mode 100644
index 00000000..ef00f6e6
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx
@@ -0,0 +1,215 @@
+<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="RepoProjectView.ascx.cs" Inherits="Marketplace.usercontrols.Deli.RepoProjectView" %>
+<%@ Import Namespace="Marketplace.Interfaces" %>
+
+
+
+
+
+
+ started this project on
+
+ it's current version is
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Visit the Deli to Purchase a License for this project
+
+
+
+
+
+
+
Project Summary
+
+ Project owner:
+
+ <%= Project.Vendor.Member.Name %>
+
+
+
+
+ Contributors:
+
+
+
+ <%# Eval("ContributorName") %>
+
+
+
+
+
+
+ Created:
+
+ <%= Project.CreateDate.ToString("D") %>
+
+
+ Compatible with:
+
+
+
+
+ .NET Version:
+
+
+
+
+
+ Supports Medium Trust:
+
+
+
+
+
+ <% if(Project.Stable){ %>
+ Is Stable:
+
+ Project is stable
+
+ <%} %>
+
+ Current version
+
+ <%= Project.CurrentVersion %>
+
+
+ <% if (!string.IsNullOrEmpty(Project.LicenseName))
+ { %>
+ License
+
+
+ <%= Project.LicenseName %>
+
+
+ <% } %>
+
+
+ Tags
+
+
+ ">
+ <%# Eval("Text") %>
+
+
+
+
+
+
+ Downloads:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Please note:
+ the compatibility between this package and your umbraco version hasn't been verified by our admins yet
+
+
+
+
+
+
+
+
+
+
+ More Information
+
+ Visit the project's full page in the Deli
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx.cs b/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx.cs
new file mode 100644
index 00000000..53646962
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx.cs
@@ -0,0 +1,165 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+using umbraco.cms.businesslogic.member;
+using Marketplace.Helpers;
+using Marketplace.Providers.Cart;
+using Marketplace.Providers.Accounting;
+
+
+namespace Marketplace.usercontrols.Deli
+{
+
+ public partial class RepoProjectView : System.Web.UI.UserControl
+ {
+ public IListingItem Project { get; set; }
+ public string listingId;
+
+ public string callback;
+ public string version;
+ public string useLegacySchema;
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ var projectProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+
+ version = Request.QueryString["version"];
+ useLegacySchema = Request.QueryString["useLegacySchema"];
+ callback = Request.QueryString["callback"];
+
+ listingId = Request.QueryString["id"];
+
+
+ int pId = 0;
+ if (int.TryParse(listingId, out pId))
+ {
+ pId = int.Parse(listingId);
+ Project = projectProvider.GetListing(pId);
+ }
+ else
+ {
+ Project = projectProvider.GetCurrentListing();
+ }
+
+ if (!IsPostBack && Project != null)
+ {
+ projectProvider.IncrementProjectViews(Project);
+ SetupProject();
+ }
+
+ }
+
+ private void SetupProject()
+ {
+ var vendorProvider = (IVendorProvider)MarketplaceProviderManager.Providers["VendorProvider"];
+ var archive = new List();
+
+ #region Verified File Notice
+
+ var package = Project.PackageFile.Where(x => x.Current).FirstOrDefault();
+
+ if (package != null)
+ {
+ if (!package.Verified)
+ {
+ NotVerifiedNotice.Visible = true;
+ }
+ }
+
+ #endregion
+
+ #region Standard Features
+
+ ProjectName.Text = Project.Name;
+ ProjectCreateDate.Text = String.Format("{0:D}", Project.CreateDate);
+ ProjectCurrentVersion.Text = Project.CurrentVersion;
+ VendorLink.Text = Project.Vendor.Member.Name;
+ VendorLink.NavigateUrl = "/member/" + Project.Vendor.Member.Id;
+ FullProjectLink.NavigateUrl = "http://deli.umbraco.org" + umbraco.library.NiceUrl(Project.Id);
+
+
+ if (Project.Description.Contains('<'))
+ {
+ ProjectDescrition.Text = uForum.Library.Xslt.ResolveLinks(Project.Description.Substring(0, 200));
+ LongProjectDescription.Text = uForum.Library.Xslt.ResolveLinks(Project.Description.Substring(200));
+ }
+ else
+ {
+ ProjectDescrition.Text = uForum.Library.Xslt.ResolveLinks(umbraco.library.ReplaceLineBreaks(Project.Description.Substring(0, 200)));
+ LongProjectDescription.Text = uForum.Library.Xslt.ResolveLinks(umbraco.library.ReplaceLineBreaks(Project.Description.Substring(200)));
+ }
+
+
+
+ #endregion
+
+ #region Screenshots
+ //screenshots
+ if (Project.ScreenShots.Count() > 0)
+ {
+ ScreenshotRepeater.DataSource = Project.ScreenShots;
+ ScreenshotRepeater.DataBind();
+ }
+ else
+ {
+ ScreenshotsPanel.Visible = false;
+ }
+
+ #endregion
+
+ #region Documentation
+ //Documenation
+
+ var docs = Project.DocumentationFile.Where(x => !x.Archived && x.FileType == FileType.docs).Select(x => new
+ {
+ Id = x.Id,
+ Name = x.Name,
+ FileType = x.FileType.FileTypeAsString(),
+ Vendor = vendorProvider.GetVendorById(x.CreatedBy),
+ });
+
+ ProjectDocRepeater.DataSource = docs;
+ ProjectDocRepeater.DataBind();
+ #endregion
+
+ #region Sidebar
+
+ //download box
+ if (!string.IsNullOrEmpty(Project.CurrentReleaseFile))
+ {
+ var file = Project.PackageFile.Where(x => x.Id == Int32.Parse(Project.CurrentReleaseFile)).FirstOrDefault();
+ if (file != null)
+ {
+ ProjectCompatitbleWithUmbraco.Text = "TBI";//file.UmbVersion.Description;
+ ProjectCompatitbleWithDotNet.Text = file.DotNetVersion;
+ ProjectCompatitbleWithMediumTrust.Text = (file.SupportsMediumTrust) ? "Yes" : "No";
+ }
+
+ }
+
+ DownloadCount.Text = Project.Downloads.ToString();
+
+ //Commercial options
+ PurchaseLink.NavigateUrl = "http://deli.umbraco.org" + umbraco.library.NiceUrl(Project.Id);
+
+ if (Project.ListingType != ListingType.commercial)
+ {
+ CommercePanel.Visible = false;
+ }
+
+
+ }
+
+ #endregion
+
+ }
+
+
+
+ }
diff --git a/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx.designer.cs b/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx.designer.cs
new file mode 100644
index 00000000..529b7845
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Repository/RepoProjectView.ascx.designer.cs
@@ -0,0 +1,195 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class RepoProjectView {
+
+ ///
+ /// ProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectName;
+
+ ///
+ /// VendorLink control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink VendorLink;
+
+ ///
+ /// ProjectCreateDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCreateDate;
+
+ ///
+ /// ProjectCurrentVersion control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCurrentVersion;
+
+ ///
+ /// DownloadPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder DownloadPanel;
+
+ ///
+ /// CommercePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder CommercePanel;
+
+ ///
+ /// PurchaseLink control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink PurchaseLink;
+
+ ///
+ /// ContribRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ContribRepeater;
+
+ ///
+ /// ProjectCompatitbleWithUmbraco control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCompatitbleWithUmbraco;
+
+ ///
+ /// ProjectCompatitbleWithDotNet control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCompatitbleWithDotNet;
+
+ ///
+ /// ProjectCompatitbleWithMediumTrust control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectCompatitbleWithMediumTrust;
+
+ ///
+ /// TagRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater TagRepeater;
+
+ ///
+ /// DownloadCount control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal DownloadCount;
+
+ ///
+ /// ProjectDescrition control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ProjectDescrition;
+
+ ///
+ /// LongProjectDescription control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LongProjectDescription;
+
+ ///
+ /// ScreenshotsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder ScreenshotsPanel;
+
+ ///
+ /// ScreenshotRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ScreenshotRepeater;
+
+ ///
+ /// NotVerifiedNotice control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder NotVerifiedNotice;
+
+ ///
+ /// FullProjectLink control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink FullProjectLink;
+
+ ///
+ /// ProjectDocRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater ProjectDocRepeater;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx b/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx
new file mode 100644
index 00000000..0d5e71b2
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx
@@ -0,0 +1,46 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RefundRequest.ascx.cs" Inherits="Marketplace.usercontrols.Deli.MemberSupport.RefundRequest" %>
+
+
+
+
+
+
+
+
+
+Request a Refund
+
+
+Package Name
+
+
+
+
+
+
+ Order Date
+
+
+
+
+
+
+ Reason for Refund
+
+
+
+
+
+
+
+
+
+
+
+
+Oops something went wrong, please try again.
+
+
+
+Thank you for your refund request, we'll be in touch soon.
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx.cs b/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx.cs
new file mode 100644
index 00000000..0b740644
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using Umbraco.Support.zendesk;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli.MemberSupport
+{
+ public partial class RefundRequest : System.Web.UI.UserControl
+ {
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+ private IMember _member;
+ public IMember Member
+ {
+ get
+ {
+ if (_member != null)
+ return _member;
+ else
+ {
+ _member = MemberProvider.GetCurrentMember();
+ return _member;
+ }
+ }
+ }
+
+ protected void bt_submit_Click(object sender, EventArgs e)
+ {
+ pnlForm.Visible = false;
+
+ try
+ {
+ string body = "Member name: " + Member.Name + "," + Member.Company +
+ "Order Date: " + OrderDate.Text +
+ "Refund Request: " + umbraco.library.ReplaceLineBreaks(tb_desc.Text);
+
+ Ticket.Create(Member.Email, "Refund Request", body, "Deli", tb_package.Text);
+
+ pnlSuccess.Visible = true;
+ }
+ catch
+ {
+ pnlError.Visible = false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx.designer.cs b/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx.designer.cs
new file mode 100644
index 00000000..39123a6f
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Support/Member/RefundRequest.ascx.designer.cs
@@ -0,0 +1,105 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.MemberSupport {
+
+
+ public partial class RefundRequest {
+
+ ///
+ /// pnlForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlForm;
+
+ ///
+ /// valsum control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ValidationSummary valsum;
+
+ ///
+ /// RequiredFieldValidator3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;
+
+ ///
+ /// tb_package control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_package;
+
+ ///
+ /// OrderDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox OrderDate;
+
+ ///
+ /// RequiredFieldValidator2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
+
+ ///
+ /// tb_desc control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_desc;
+
+ ///
+ /// bt_submit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_submit;
+
+ ///
+ /// pnlError control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlError;
+
+ ///
+ /// pnlSuccess control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlSuccess;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx b/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx
new file mode 100644
index 00000000..1cae4e2f
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx
@@ -0,0 +1,47 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorSupportRequest.ascx.cs" Inherits="Marketplace.usercontrols.Deli.VendorSupport.VendorSupportRequest" %>
+
+
+
+
+
+
+
+
+
+Submit a support ticket
+
+
+Subject
+
+
+
+
+
+Package Name
+
+
+
+
+
+
+
+Description
+
+
+
+
+
+
+
+
+
+
+
+
+
+Oops something went wrong, please try again.
+
+
+
+Thank you for your support ticket, we'll be in touch soon.
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx.cs b/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx.cs
new file mode 100644
index 00000000..64a1aadd
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using Umbraco.Support.zendesk;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli.VendorSupport
+{
+ public partial class VendorSupportRequest : System.Web.UI.UserControl
+ {
+ private IMemberProvider _memberProvider;
+ public IMemberProvider MemberProvider
+ {
+ get
+ {
+ if (_memberProvider != null)
+ return _memberProvider;
+ else
+ {
+ _memberProvider = (IMemberProvider)MarketplaceProviderManager.Providers["MemberProvider"];
+ return _memberProvider;
+ }
+ }
+ }
+
+ private IMember _member;
+ public IMember Member
+ {
+ get
+ {
+ if (_member != null)
+ return _member;
+ else
+ {
+ _member = MemberProvider.GetCurrentMember();
+ return _member;
+ }
+ }
+ }
+
+ protected void bt_submit_Click(object sender, EventArgs e)
+ {
+ pnlForm.Visible = false;
+
+ try
+ {
+ string body = "Submitted by Deli Vendor: " + Member.IsDeliVendor.ToString() + "\r\n" +
+ "Vendor name: " + Member.Name + "," + Member.Company + "\r\n" +
+ umbraco.library.ReplaceLineBreaks(tb_desc.Text);
+
+ Ticket.Create(Member.Email, tb_subject.Text, body, "Deli", tb_package.Text);
+
+ pnlSuccess.Visible = true;
+ }
+ catch
+ {
+ pnlError.Visible = false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx.designer.cs b/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx.designer.cs
new file mode 100644
index 00000000..d840d70c
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/Support/Vendor/VendorSupportRequest.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli.VendorSupport {
+
+
+ public partial class VendorSupportRequest {
+
+ ///
+ /// pnlForm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlForm;
+
+ ///
+ /// valsum control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ValidationSummary valsum;
+
+ ///
+ /// RequiredFieldValidator1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
+
+ ///
+ /// tb_subject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_subject;
+
+ ///
+ /// RequiredFieldValidator3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;
+
+ ///
+ /// tb_package control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_package;
+
+ ///
+ /// RequiredFieldValidator2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
+
+ ///
+ /// tb_desc control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_desc;
+
+ ///
+ /// bt_submit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_submit;
+
+ ///
+ /// pnlError control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlError;
+
+ ///
+ /// pnlSuccess control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlSuccess;
+ }
+}
diff --git a/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx b/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx
new file mode 100644
index 00000000..5931ba38
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx
@@ -0,0 +1,9 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TopPaidProjectsList.ascx.cs" Inherits="Marketplace.usercontrols.Deli.TopPaidProjectsList" %>
+
+
+
+"><%# Eval("Name") %>
+<%--<%# Marketplace.library.GetManufacturerName(((Marketplace.Interfaces.IVendor)Eval("Vendor"))) %> --%>
+
+
+
diff --git a/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx.cs b/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx.cs
new file mode 100644
index 00000000..d67a6471
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Marketplace.Interfaces;
+using Marketplace.Providers;
+
+namespace Marketplace.usercontrols.Deli
+{
+ public partial class TopPaidProjectsList : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ var ProjectsProvider = (IListingProvider)MarketplaceProviderManager.Providers["ListingProvider"];
+ var Projects = ProjectsProvider.GetTopPaidListings(0,5, true);
+
+
+
+ TopRepeater.DataSource = Projects;
+ TopRepeater.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx.designer.cs b/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx.designer.cs
new file mode 100644
index 00000000..2ec1bd44
--- /dev/null
+++ b/Marketplace/usercontrols/Deli/TopPaidProjectsList.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.Deli {
+
+
+ public partial class TopPaidProjectsList {
+
+ ///
+ /// TopRepeater control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater TopRepeater;
+ }
+}
diff --git a/Marketplace/usercontrols/our.umbraco.org/HeaderLogin.ascx b/Marketplace/usercontrols/our.umbraco.org/HeaderLogin.ascx
new file mode 100644
index 00000000..2dcad174
--- /dev/null
+++ b/Marketplace/usercontrols/our.umbraco.org/HeaderLogin.ascx
@@ -0,0 +1,12 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HeaderLogin.ascx.cs" Inherits="our.usercontrols.HeaderLogin" %>
+
+
+ You are logged in as %name%
+ You are not logged in
+
+
+ Your profile
+ Log out
+ Log in
+ Create a profile
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx b/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx
new file mode 100644
index 00000000..b976e92c
--- /dev/null
+++ b/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx
@@ -0,0 +1,20 @@
+<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="Login_novalidationscript.ascx.cs" Inherits="Marketplace.usercontrols.ourUmbraco.Login_novalidationscript" %>
+
+
+
\ No newline at end of file
diff --git a/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx.cs b/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx.cs
new file mode 100644
index 00000000..2d69ed36
--- /dev/null
+++ b/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Marketplace.usercontrols.ourUmbraco
+{
+ public partial class Login_novalidationscript : System.Web.UI.UserControl
+ {
+ public int NextPage { get; set; }
+ public string ErrorMessage { get; set; }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ umbraco.library.RegisterJavaScriptFile("jquery.validation", "/scripts/jquery.validation.js");
+ }
+
+ protected void login(object sender, EventArgs e)
+ {
+ string email = tb_email.Text;
+ string password = tb_password.Text;
+ string redirectUrl = Request.QueryString["redirectUrl"];
+
+ umbraco.cms.businesslogic.member.Member m = umbraco.cms.businesslogic.member.Member.GetMemberFromLoginNameAndPassword(email, password);
+
+ if (m != null)
+ {
+ umbraco.cms.businesslogic.member.Member.AddMemberToCache(m);
+
+ if (!string.IsNullOrEmpty(redirectUrl))
+ Response.Redirect(redirectUrl);
+
+ if (NextPage > 0)
+ Response.Redirect(umbraco.library.NiceUrl(NextPage) + "?loggedin=true");
+
+ }
+ else
+ {
+ lt_err.Text = "";
+ lt_err.Visible = true;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx.designer.cs b/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx.designer.cs
new file mode 100644
index 00000000..df1f141f
--- /dev/null
+++ b/Marketplace/usercontrols/our.umbraco.org/Login_novalidationscript.ascx.designer.cs
@@ -0,0 +1,78 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Marketplace.usercontrols.ourUmbraco {
+
+
+ public partial class Login_novalidationscript {
+
+ ///
+ /// Panel1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel Panel1;
+
+ ///
+ /// lt_err control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lt_err;
+
+ ///
+ /// Label2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// tb_email control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_email;
+
+ ///
+ /// Label3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// tb_password control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_password;
+
+ ///
+ /// bt_login control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_login;
+ }
+}
diff --git a/Marketplace/usercontrols/umbracoMemberControls/umbLogin.ascx b/Marketplace/usercontrols/umbracoMemberControls/umbLogin.ascx
new file mode 100644
index 00000000..b1360ea0
--- /dev/null
+++ b/Marketplace/usercontrols/umbracoMemberControls/umbLogin.ascx
@@ -0,0 +1,27 @@
+<%@ Control Language="c#" AutoEventWireup="false" Codebehind="umbLogin.ascx.cs" Inherits="umbracoMemberControls.umbGroupSignInOut" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
+
+
+
+
+
+
+
+
+
+ Password
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sign Out
+
+
diff --git a/Marketplace/xslt/repository.xslt b/Marketplace/xslt/repository.xslt
new file mode 100644
index 00000000..ddd0b198
--- /dev/null
+++ b/Marketplace/xslt/repository.xslt
@@ -0,0 +1,423 @@
+
+
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 0
+
+
+
+
+
+ v45l
+ v45
+ v4
+ all
+ v4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Categories:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Latest Packages:
+
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 99999999
+ byName
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Install
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if(confirm('Are you sure you wish to download:\n\n \n\n'))document.location.href = 'http:// &guid= '
+
+
+
+
+
+
+
+ document.location.href = ' '
+
+
+
+ Download and Install package
+
+
+
+
+ Documentation
+
+
+
+
+
+
+
+ Documentation (opens in new window)
+
+
+
+ There's currently no documentation available
+
+
+
+
+
+
+
+
+ search
+
+
+
+
+
+
+
+
+ Umbraco Package Repository
+
+
+
+
+
+ ››
+
+
+
+
+
+
+ ››
+
+
+
+
+ ››
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Please note: the compatibility between this package and your umbraco version hasn't been verified by our admins yet.
+
+
+
+
\ No newline at end of file
diff --git a/Notification/Notification.csproj b/Notification/Notification.csproj
index 1234f461..4cfb3b62 100644
--- a/Notification/Notification.csproj
+++ b/Notification/Notification.csproj
@@ -71,9 +71,9 @@
False
..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll
-
+
False
- ..\packages\Examine.0.1.57.2941\lib\Examine.dll
+ ..\packages\Examine.0.1.60.2941\lib\Examine.dll
False
diff --git a/Notification/packages.config b/Notification/packages.config
index 7f7a1ce3..17e6222a 100644
--- a/Notification/packages.config
+++ b/Notification/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/NotificationsWeb/EventHandlers/Forum.cs b/NotificationsWeb/EventHandlers/Forum.cs
index bf5dda68..44e8f0f0 100644
--- a/NotificationsWeb/EventHandlers/Forum.cs
+++ b/NotificationsWeb/EventHandlers/Forum.cs
@@ -13,7 +13,7 @@ namespace NotificationsWeb.EventHandlers
{
public class Forum : ApplicationEventHandler
{
- protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
+ protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
//sub comment author to topic
CommentService.Created += CommentService_Created;
diff --git a/NotificationsWeb/NotificationsWeb.csproj b/NotificationsWeb/NotificationsWeb.csproj
index 61cb92a0..534aeae8 100644
--- a/NotificationsWeb/NotificationsWeb.csproj
+++ b/NotificationsWeb/NotificationsWeb.csproj
@@ -71,9 +71,9 @@
False
..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll
-
+
False
- ..\packages\Examine.0.1.57.2941\lib\Examine.dll
+ ..\packages\Examine.0.1.60.2941\lib\Examine.dll
False
@@ -274,7 +274,7 @@
-
+
diff --git a/NotificationsWeb/packages.config b/NotificationsWeb/packages.config
index 7f7a1ce3..17e6222a 100644
--- a/NotificationsWeb/packages.config
+++ b/NotificationsWeb/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/OurUmbraco.Site/OurUmbraco.Site.csproj b/OurUmbraco.Site/OurUmbraco.Site.csproj
index 4f007e9e..cec529db 100644
--- a/OurUmbraco.Site/OurUmbraco.Site.csproj
+++ b/OurUmbraco.Site/OurUmbraco.Site.csproj
@@ -82,9 +82,9 @@
..\packages\EasyHttp.1.6.29.0\lib\net40\EasyHttp.dll
True
-
- False
- ..\packages\Examine.0.1.57.2941\lib\Examine.dll
+
+ ..\packages\Examine.0.1.60.2941\lib\Examine.dll
+ True
..\dependencies\Our\FergusonMoriyama.ConfigFormRenderer.dll
@@ -4662,6 +4662,7 @@
+
web.config
@@ -4715,7 +4716,6 @@
-
diff --git a/OurUmbraco.Site/Views/Search/Search.cshtml b/OurUmbraco.Site/Views/Search/Search.cshtml
new file mode 100644
index 00000000..1e61ffe4
--- /dev/null
+++ b/OurUmbraco.Site/Views/Search/Search.cshtml
@@ -0,0 +1,29 @@
+@using our
+@inherits UmbracoTemplatePage
+
+@{
+ Layout = "~/Views/Layout.cshtml";
+}
+
+
+
Search results
+
+ @foreach (var result in Model.Content.SearchResults)
+ {
+
+
+
+ @result.GenerateBlurb(250)
+
+
@result.GetDate() http://our.umbraco.org/@result.FullUrl()
+
+
+ }
+
+
+
Processed in @Model.Content.Totalmilliseconds milliseconds
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Views/Web.config b/OurUmbraco.Site/Views/Web.config
index 801d9519..56486560 100644
--- a/OurUmbraco.Site/Views/Web.config
+++ b/OurUmbraco.Site/Views/Web.config
@@ -6,13 +6,13 @@
-
+
-
+
-
+
diff --git a/OurUmbraco.Site/config/ExamineIndex.config b/OurUmbraco.Site/config/ExamineIndex.config
index 90c2ab55..25e84686 100644
--- a/OurUmbraco.Site/config/ExamineIndex.config
+++ b/OurUmbraco.Site/config/ExamineIndex.config
@@ -100,11 +100,11 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-
+
-
+
@@ -115,6 +115,10 @@ More information and documentation can be found on CodePlex: http://umbracoexami
+
+
+
+
diff --git a/OurUmbraco.Site/config/ExamineSettings.config b/OurUmbraco.Site/config/ExamineSettings.config
index 87e61f45..ddf2b8ce 100644
--- a/OurUmbraco.Site/config/ExamineSettings.config
+++ b/OurUmbraco.Site/config/ExamineSettings.config
@@ -12,49 +12,37 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-
+ indexTypes="Documents" />
-
-
+ analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
+ indexTypes="documentation"/>
-
+ analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
+ autoOptimize="false"
+ analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
@@ -80,11 +68,11 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-
-
-
+
+
+
diff --git a/OurUmbraco.Site/masterpages/Community.master b/OurUmbraco.Site/masterpages/Community.master
index 84631cd9..19f1e88b 100644
--- a/OurUmbraco.Site/masterpages/Community.master
+++ b/OurUmbraco.Site/masterpages/Community.master
@@ -1,10 +1,9 @@
<%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
+<%@ Import Namespace="System.Web.Routing" %>
+<%@ Import Namespace="System.Web.Mvc" %>
-
-
-
@@ -341,12 +340,17 @@
+
+<%
+ var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(Context), new RouteData()));
+%>
+