partial void UpdateInti_Team(Inti_Team instance);
 partial void DeleteInti_Team(Inti_Team instance);
		private void detach_Inti_Team(Inti_Team entity)
		{
			this.SendPropertyChanging();
			entity.Sys_User = null;
		}
 partial void InsertInti_Team(Inti_Team instance);
		private void attach_Inti_Team(Inti_Team entity)
		{
			this.SendPropertyChanging();
			entity.Sys_User = this;
		}
		private void detach_Inti_Team(Inti_Team entity)
		{
			this.SendPropertyChanging();
			entity.Inti_Tournament = null;
		}
		private void attach_Inti_Team(Inti_Team entity)
		{
			this.SendPropertyChanging();
			entity.Inti_Tournament = this;
		}
Ejemplo n.º 8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (TeamId == Guid.Empty)
            {
                //create new team
                var team = new Inti_Team();
                team.Name = TeamName.Text;
                team.Presentation = TeamDescription.Text;

                team.UserGUID = SessionProps.UserGuid;
                team.TournamentGUID = Tournament.GUID;

                team.IsActive = false;

                team.IsPaid = false;
                team.BonusPoints = 0;

                //team version
                var teamVersion = new Inti_TeamVersion();
                teamVersion.TeamGUID = team.GUID;
                teamVersion.Version = 1;
                teamVersion.ValidFrom = Tournament.EndRegistration;

                using (var db = Global.GetConnection())
                {
                    db.Inti_Team.InsertOnSubmit(team);
                    db.Inti_TeamVersion.InsertOnSubmit(teamVersion);
                    db.SubmitChanges();
                }

                WebControlManager.RedirectWithQueryString("UserTeamEdit.aspx", new string[] { "teamGUID" }, new string[] { team.GUID.ToString() });

            }
            else
            {
                //update this team
                using(var db = Global.GetConnection())
                {
                    var team = db.Inti_Team.Single(t => t.GUID == TeamId);

                    team.Name = TeamName.Text;
                    team.Presentation = TeamDescription.Text;

                    db.SubmitChanges();
                }
            }
        }
Ejemplo n.º 9
0
        private void ShowPaymentInfo(Inti_Team team)
        {
            if(team.IsPaid ?? false)
            {
                //informera om att laget är betalt
                lblPaymentInfo.Text = String.Format("<p>Vi har registrerat din betalning och {0} är med i matchen</p>",
                                                    team.Name);
            }
            else
            {
                //generera betallänk
                var paySonLink =
                    String.Format(
                        "https://www.payson.se//SendMoney/?De={0}&Se=folkesson%40gmail.com&Cost=100%2c00&ShippingAmount=0%2c00&Gr=1",
                        Server.UrlEncode(team.GUID.ToString()));

                var payPalLink =
                    String.Format("<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">" +
                                  "<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">" +
                                  "<input type=\"hidden\" name=\"business\" value=\"[email protected]\">" +
                                  "<input type=\"hidden\" name=\"item_name\" value=\"{0}\">" +
                                  "<input type=\"hidden\" name=\"item_number\" value=\"{1}\">" +
                                  "<input type=\"hidden\" name=\"amount\" value=\"100.00\">" +
                                  "<input type=\"hidden\" name=\"shipping\" value=\"0.00\">" +
                                  "<input type=\"hidden\" name=\"no_shipping\" value=\"1\">" +
                                  "<input type=\"hidden\" name=\"no_note\" value=\"1\">" +
                                  "<input type=\"hidden\" name=\"currency_code\" value=\"SEK\">" +
                                  "<input type=\"hidden\" name=\"tax\" value=\"0.00\">" +
                                  "<input type=\"hidden\" name=\"lc\" value=\"SE\">" +
                                  "<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">" +
                                  "<input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_paynow_SM.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">" +
                                  "<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">" +
                                  "</form>", team.Name, team.GUID);

                var payPalLink2 =
                    String.Format(
                        "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&[email protected]&item_name={0}&item_number={1}&amount=100.00&shipping=0.00&no_shipping=1&no_note=1&currency_code=SEK&tax=0.00&lc=SE&bn=PP-BuyNowBF",
                        team.Name, team.GUID);

                //payson och paypal
                //lblPaymentInfo.Text =
                //    String.Format(
                //        "<p>Betala för ditt lag</p><p>När du betalt kommer ditt lag markeras som betalt på denna sidan, och betallänken försvinner. Eftersom detta kräver manuellt ingripande från den ideellt arbetande personalen kan det ta ett par dagar.</p><p><a target=\"_blank\" href=\"{0}\">Klicka här för att betala via payson</a></p><p>Eller klicka på knappen nedan för att betala via Paypal</p><p><a target=\"_blank\" href=\"{1}\"><img border=\"0\" src=\"https://www.paypal.com/en_US/i/btn/btn_paynow_SM.gif\" /></a></p>",
                //        paySonLink, payPalLink2);

                //Payson only
                lblPaymentInfo.Text =
            String.Format(
            "<p>Betala för ditt lag</p><p>När du betalt kommer ditt lag markeras som betalt på denna sidan, och betallänken försvinner. Eftersom detta kräver manuellt ingripande från den ideellt arbetande personalen kan det ta ett par dagar.</p><p><a target=\"_blank\" href=\"{0}\">Klicka här för att betala via payson</a></p>",
            paySonLink);

            }
        }