Пример #1
0
        /// <summary>
        /// Conver decimal  to  different formal string
        /// </summary>
        /// <param name="value">decimal value</param>
        /// <param name="format"></param>
        /// <param name="decimalNumber">保留的小數位數</param>
        /// <returns></returns>
        public static string ToString(this decimal value, CurrencyFormat format, int decimalNumber = 2)
        {
            switch (format)
            {
            case CurrencyFormat.Chinese:
                //ref http://blog.darkthread.net/post-2009-12-23-chinese-number-char.aspx
                var t = EastAsiaNumericFormatter.FormatWithCulture("L", value, null, _twCulture);
                //修正EastAsiaNumericFormatter.FormatWithCulture出現"三百十"之問題,修正為三百一十的慣用寫法
                var res = _regFixOne.Replace(t, m => "壹");
                //拾萬需補為壹拾萬
                if (res.StartsWith("拾"))
                {
                    res = "壹" + res;
                }
                return(res);

            case CurrencyFormat.Comma:
                return(Math.Truncate(value).ToString("N"));     //去小數

            case CurrencyFormat.CommaReservedDecimalNumber:
                return(Math.Round(value, decimalNumber).ToString($"N{ decimalNumber}"));

            default:
                return(value.ToString());
            }
        }
Пример #2
0
        private void PlayerFinishedTournament(PlayerModel player)
        {
            //Miejsce gracza
            var PlayerCounter     = GameModel.TournamentModel.PlayersList.Count();
            var NonPlayingCounter = GameModel.TournamentModel.PlayersList.Where(e => e.Player.Stack == 0).Count();

            //Miejsce gracza wedlug przegranych
            var PlaceID = PlayerCounter - NonPlayingCounter;

            //Kwota wygranej o ile jest jakakolwiek
            decimal WinPot = 0;

            //Sprawdzamy aktualna liste wygranych
            var ListPotWin = PotModel.PrizeCalc();

            if (PlaceID <= ListPotWin.Count())
            {
                WinPot = ListPotWin.First(e => e.PlaceID == PlaceID).Prize;
            }

            if (player.User.IsOnline())
            {
                string message = "Zakońyłeś turniej na " + PlaceID + " miejscu. ";

                if (WinPot != 0)
                {
                    message += "Twoja wygrana w turnieju wynosi " + CurrencyFormat.Get(GameModel.TournamentModel.EntryCurrency, WinPot);
                }

                player.User.GetClient().OnMessage(message);
            }
        }
        public NormalModeStackWindow(PokerGameWindow parent)
        {
            InitializeComponent();
            this.parent = parent;
            this.game   = (NormalGameModel)Session.Data.Client.ServiceProxy.GetGameModelByTable(parent.TableModel);

            this.AvailableBallance.Visibility = Visibility.Hidden;

            this.JoinButton.IsEnabled = false;

            this.table_name.Text = this.game.Name;
            this.Blind.Text      = this.game.Table.Stakes;

            this.StackSlider.TickFrequency = (double)this.game.Table.Blind;
            this.StackSlider.Minimum       = (double)this.game.Minimum;
            this.StackSlider.Maximum       = (double)this.game.Maximum;
            this.MinAmount.Text            = CurrencyFormat.Get(
                this.game.Table.Currency, ((decimal)this.StackSlider.Minimum)
                );
            this.StackSlider.Value = this.StackSlider.Maximum;

            this.StackValue.Text = this.StackSlider.Value.ToString();

            //Pobieramy wallet
            Task.Factory.StartNew(() =>
            {
                Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
                {
                    wallet = Session.Data.Client.ServiceProxy.GetWallet(this.game.Table.Currency);
                    if (wallet == null)
                    {
                        AvailableBallance.Text = "Brak konta z walutą";
                    }
                    else
                    {
                        AvailableBallance.Text = CurrencyFormat.Get(this.game.Table.Currency, wallet.Available);
                    }

                    if (wallet != null && wallet.Available > this.game.Minimum)
                    {
                        if (wallet.Available < this.game.Maximum)
                        {
                            this.StackSlider.Maximum = (double)wallet.Available;
                        }
                        this.JoinButton.IsEnabled = true;

                        //Tworzymy rezerwacje
                        //Session.Data.Client.ServiceProxy.DoAction(ActionModel.GameActionType.Booking, this.game.Table);
                    }
                    else
                    {
                        this.JoinButton.Content = "Brak funduszy";
                    }

                    this.Loader.Visibility            = Visibility.Hidden;
                    this.AvailableBallance.Visibility = Visibility.Visible;
                }));
            });
        }
        /// <summary>
        /// Returns the currency format
        /// </summary>
        /// <param name="currency">
        /// The <see cref="ICurrency"/>.
        /// </param>
        /// <returns>
        /// The <see cref="ICurrencyFormat"/>.
        /// </returns>
        public ICurrencyFormat GetCurrencyFormat(ICurrency currency)
        {
            var query = MerchelloConfiguration.Current.Section.CurrencyFormats
                        .Cast <CurrencyFormatElement>()
                        .FirstOrDefault(cf => cf.CurrencyCode.Equals(currency.CurrencyCode, StringComparison.OrdinalIgnoreCase));

            return(query != null ?
                   new CurrencyFormat(query.Format, query.Symbol) :
                   CurrencyFormat.CreateDefault(currency.Symbol));
        }
Пример #5
0
        /// <summary>
        /// Prywatny konstruktor
        /// </summary>
        public DepositInfoWindow(TransferModel transfer)
        {
            InitializeComponent();

            this.TransferComment.Text            = transfer.Comment;
            this.TransferCurrencyName.Text       = CurrencyFormat.GetName(transfer.Currency);
            this.TransferValue.Text              = CurrencyFormat.Get(transfer.Currency, transfer.Amount);
            this.TransferBalanceCalculation.Text = CurrencyFormat.Get(transfer.Currency, transfer.WalletAmountBefore) + " + " + CurrencyFormat.Get(transfer.Currency, transfer.Amount) + " = " + CurrencyFormat.Get(transfer.Currency, transfer.WalletAmountBefore + transfer.Amount);

            SoundManager.Play("notification");
        }
Пример #6
0
        public static void Deposit(this UserModel user, Enums.CurrencyType currency, decimal value, string comment = "", string flag = "")
        {
            using (var session = DatabaseSession.Open())
            {
                var wallet = session.QueryOver <WalletModel>().
                             Where(u => u.User.ID == user.ID).
                             Where(u => u.Type == currency).
                             SingleOrDefault();

                if (wallet == null)
                {
                    return;
                }

                using (var transaction = session.BeginTransaction())
                {
                    TransferModel transfer = new TransferModel()
                    {
                        Wallet             = wallet,
                        Amount             = value,
                        Timestamp          = DateTime.Now.ToUniversalTime(),
                        Type               = Enums.TransferType.DEPOSIT,
                        Comment            = comment,
                        Flag               = flag,
                        Currency           = wallet.Type,
                        WalletAmountBefore = wallet.Available
                    };

                    wallet.Available += value;

                    session.Save(transfer);
                    session.Update(wallet);

                    transaction.Commit();

                    if (user.IsOnline())
                    {
                        var client = user.GetClient();

                        if (transfer.Comment == "")
                        {
                            transfer.Comment = "Wpłata na konto w wysokości " + CurrencyFormat.Get(wallet.Type, transfer.Amount);
                        }

                        client.OnDepositInfo(transfer);
                    }
                }
            }
        }
Пример #7
0
        private void ParseTable(TableModel table)
        {
            //Ustawienie stacka głównego w razie gydyby się zmienił za pośrednictwem gracza
            GameTable.Stage  = table.Stage;
            GameTable.Dealer = table.Dealer;
            GameTable.Blind  = table.Blind;
            GameTable.AvgPot = table.AvgPot;

            if (table.TablePot != 0)
            {
                this.GameTable.TablePot      = table.TablePot;
                this.StackCounter.Visibility = Visibility.Visible;
                this.StackCounterLabel.Text  = "Stawka: " + CurrencyFormat.Get(this.GameTable.Currency, this.GameTable.TablePot);
            }
        }
Пример #8
0
        /// <summary>
        /// Returns the TMoney object as String with a specific string format.
        /// </summary>
        /// <returns>ex format: USD $500.00 </returns>
        public string ToString(CurrencyFormat format)
        {
            string currencyFormat = string.Empty;

            if (format == CurrencyFormat.ClientItinerary)
            {
                if (this.CurrencyCode == CurrencyTypes.USD.ToString())
                {
                    currencyFormat = string.Format("{0} {1}", this.CurrencyCode, this.Amount.ToString("c"));
                }
                else
                {
                    currencyFormat = string.Format("{0} {1}", this.CurrencyCode, this.Amount.ToString("c").Replace('$', ' '));
                }
            }

            return(currencyFormat);
        }
Пример #9
0
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            if (value is string)
            {
                FormatBase result    = null;
                string     className = (string)value;
                switch (className)
                {
                case "Boolean":
                    result = new BooleanFormat();
                    break;

                case "Currency":
                    result = new CurrencyFormat();
                    break;

                case "Custom":
                    result = new CustomFormat();
                    break;

                case "Date":
                    result = new DateFormat();
                    break;

                case "General":
                    result = new GeneralFormat();
                    break;

                case "Number":
                    result = new NumberFormat();
                    break;

                case "Percent":
                    result = new PercentFormat();
                    break;

                case "Time":
                    result = new TimeFormat();
                    break;
                }
                return(result);
            }
            return(base.ConvertFrom(context, culture, value));
        }
Пример #10
0
        public void Update()
        {
            //W zaleznosci od statusu
            if (player.Status.HasFlag(PlayerModel.PlayerStatus.DONTPLAY) || player.Status.HasFlag(PlayerModel.PlayerStatus.LEAVED))
            {
                SeatInfo.Visibility = Visibility.Hidden;
                UserInfo.Visibility = Visibility.Visible;
                UsernameLbl.Text    = player.User.Username;
                StatusLabel.Text    = "Nie gra";
                ColorBrush.Opacity  = 0.3;
            }
            else if (player.Status.HasFlag(PlayerModel.PlayerStatus.FOLDED) || player.Status.HasFlag(PlayerModel.PlayerStatus.WAITING))
            {
                SeatInfo.Visibility = Visibility.Hidden;
                UserInfo.Visibility = Visibility.Visible;
                UsernameLbl.Text    = player.User.Username;
                StatusLabel.Text    = "Saldo: " + CurrencyFormat.Get(this.gameTable.GameTable.Currency, player.Stack);
                ColorBrush.Opacity  = 0.3;
            }
            else if (player.Status.HasFlag(PlayerModel.PlayerStatus.INGAME))
            {
                SeatInfo.Visibility = Visibility.Hidden;
                UserInfo.Visibility = Visibility.Visible;
                UsernameLbl.Text    = player.User.Username;
                StatusLabel.Text    = "Saldo: " + CurrencyFormat.Get(this.gameTable.GameTable.Currency, player.Stack);
                ColorBrush.Opacity  = 0.7;

                if (player.Stack == 0.0m)
                {
                    StatusLabel.Text = "ALL IN";
                }
            }

            if (gameTable.GameTable.Dealer != null && gameTable.GameTable.Dealer.User.ID == player.User.ID)
            {
                this.IsDealer.Visibility = Visibility.Visible;
            }
            else
            {
                this.IsDealer.Visibility = Visibility.Hidden;
            }
        }
Пример #11
0
        /// <summary>
        /// Pobiera liste operacji gracza
        /// </summary>
        /// <param name="wallet"></param>
        /// <returns></returns>
        public List <TransferModel> GetTransferOperations(WalletModel wallet)
        {
            using (ISession session = DatabaseSession.Open())
            {
                var transferList = session.QueryOver <WalletModel>().
                                   Where(w => w.ID == wallet.ID).
                                   SingleOrDefault().
                                   TransferList;

                foreach (var transfer in transferList)
                {
                    if (transfer.Comment == "")
                    {
                        transfer.Comment = "Wpłata na konto w wysokości " + CurrencyFormat.Get(wallet.Type, transfer.Amount);
                    }
                }

                return(transferList.OrderByDescending(d => d.Timestamp).Take(15).ToList());
            }
        }
Пример #12
0
        private void LoadNewWallet()
        {
            Task.Factory.StartNew(() =>
            {
                Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
                {
                    WalletModel wallet = CurrencyList.SelectedItem as WalletModel;
                    //Pobieramy zaktualizowany element
                    wallet = Session.Data.Client.ServiceProxy.GetWallet(wallet.Type);

                    this.Available.Text = CurrencyFormat.Get(wallet.Type, wallet.Available);
                    this.InGame.Text    = CurrencyFormat.Get(wallet.Type, wallet.InGame);
                    this.Sum.Text       = CurrencyFormat.Get(wallet.Type, wallet.Sum);
                    this.Sum2.Text      = this.Sum.Text;
                    this.Currency.Text  = wallet.Type.ToString();

                    //Ładujemy także historię
                    List <TransferModel> historyList       = Session.Data.Client.ServiceProxy.GetTransferOperations(wallet);
                    this.TransferOperationList.ItemsSource = historyList;

                    ((Storyboard)FindResource("fadeOutAnimation")).Begin(Loader);
                }));
            });
        }
 private static void AddCurrencies(string serializedData, List <CurrencyFormat> currencyFormats)
 {
     if (!string.IsNullOrWhiteSpace(serializedData))
     {
         var currencyData   = serializedData.Split('-');
         var parseSucceeded = Enum.TryParse(currencyData[1], out CurrencySymbolPosition currencySymbolPosition);
         if (parseSucceeded)
         {
             var currencySymbolPositions = new List <CurrencySymbolPosition>
             {
                 currencySymbolPosition,
                 currencySymbolPosition == CurrencySymbolPosition.afterAmount
                                                 ? CurrencySymbolPosition.beforeAmount
                                                 : CurrencySymbolPosition.afterAmount
             };
             var currency = new CurrencyFormat
             {
                 Symbol = currencyData[0].Trim(),
                 CurrencySymbolPositions = currencySymbolPositions
             };
             currencyFormats?.Add(currency);
         }
     }
 }
Пример #14
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(13, 550, true);
            WriteLiteral(@"
<div class=""table-responsive rounded"">
	<table class=""table table-striped table-bordered table-hover table-condensed table-sm table-active table-secondary"">
		<thead class=""thead-dark"">
			<tr>
				<th style=""width:30%;""></th>
				<th style=""width:10%;"">Item</th>
				<th style=""width:10%;"">Seller</th>
				<th style=""width:10%;"">Attributes</th>
				<th style=""width:10%;"">Quantity</th>
				<th class=""text-right"" style=""width:10%;"">Price</th>
				<th class=""text-right"" style=""width:10%;"">Subtotal</th>
			</tr>
		</thead>
		<tbody>
");
            EndContext();
#line 17 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"

            ECommerceService eCommerce            = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService];
            short            count                = 0;
            string           removeAction         = Url.Action("RemoveFromCart", "Cart");
            string           changeQuantityAction = Url.Action("ChangeQuantity", "Cart");
            foreach (CartLine line in Model.Lines)
            {
                ProductView product = eCommerce.GetProductBy(line.SellerId, line.ProductTypeId);

#line default
#line hidden
                BeginContext(966, 32, true);
                WriteLiteral("\t\t\t\t\t<tr class=\"cartTableRow\">\r\n");
                EndContext();
#line 26 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                if (product == null ||
                    product.Status != ProductStatus.Active ||
                    !product.Active ||
                    eCommerce.GetProductTypeBy(int.Parse(product.ProductTypeId)).Status != ProductTypeStatus.Active)
                {
#line default
#line hidden
                    BeginContext(1220, 76, true);
                    WriteLiteral("\t\t\t\t\t\t\t<td>This product is currently unavailable</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(1296, 236, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c698839", async() => {
                        BeginContext(1370, 44, true);
                        WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"index\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 1414, "\"", 1432, 1);
#line 34 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                        WriteAttributeValue("", 1422, count++, 1422, 10, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(1433, 92, true);
                        WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn btn-sm btn-danger\" value=\"Remove\" />\r\n\t\t\t\t\t\t\t\t");
                        EndContext();
                    }
                                                                                );
                    __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                    BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 33 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    AddHtmlAttributeValue("", 1341, removeAction, 1341, 13, false);

#line default
#line hidden
                    EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_1.Value;
                    __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(1532, 16, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t\t</td>\r\n");
                    EndContext();
#line 38 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(1587, 11, true);
                    WriteLiteral("\t\t\t\t\t\t\t<td>");
                    EndContext();
                    BeginContext(1598, 107, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c6911946", async() => {
                    }
                                                                                );
                    __ECommerce_UI_MVC_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.MVC.Infrastructure.ImageTagHelper>();
                    __tagHelperExecutionContext.Add(__ECommerce_UI_MVC_Infrastructure_ImageTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
#line 42 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent = product.RepresentativeImage;

#line default
#line hidden
                    __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                    BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 42 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    AddHtmlAttributeValue("", 1677, product.ProductTypeName, 1677, 24, false);

#line default
#line hidden
                    EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(1705, 36, true);
                    WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-left\">");
                    EndContext();
                    BeginContext(1742, 23, false);
#line 43 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    Write(product.ProductTypeName);

#line default
#line hidden
                    EndContext();
                    BeginContext(1765, 36, true);
                    WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-left\">");
                    EndContext();
                    BeginContext(1802, 18, false);
#line 44 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    Write(product.SellerName);

#line default
#line hidden
                    EndContext();
                    BeginContext(1820, 38, true);
                    WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-left\">\r\n");
                    EndContext();
#line 46 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    foreach (var attribute in line.Attributes)
                    {
#line default
#line hidden
                        BeginContext(1922, 12, true);
                        WriteLiteral("\t\t\t\t\t\t\t\t\t<p>");
                        EndContext();
                        BeginContext(1935, 13, false);
#line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                        Write(attribute.Key);

#line default
#line hidden
                        EndContext();
                        BeginContext(1948, 2, true);
                        WriteLiteral(": ");
                        EndContext();
                        BeginContext(1951, 15, false);
#line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                        Write(attribute.Value);

#line default
#line hidden
                        EndContext();
                        BeginContext(1966, 6, true);
                        WriteLiteral("</p>\r\n");
                        EndContext();
#line 49 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    }

#line default
#line hidden
                    BeginContext(1983, 55, true);
                    WriteLiteral("\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(2038, 369, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c6916355", async() => {
                        BeginContext(2124, 82, true);
                        WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"quantity\" class=\"form-control quantityInput\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 2206, "\"", 2228, 1);
#line 53 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                        WriteAttributeValue("", 2214, line.Quantity, 2214, 14, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(2229, 47, true);
                        WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"index\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 2276, "\"", 2290, 1);
#line 54 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                        WriteAttributeValue("", 2284, count, 2284, 6, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(2291, 109, true);
                        WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn btn-sm btn-warning\" value=\"Change\" disabled hidden />\r\n\t\t\t\t\t\t\t\t");
                        EndContext();
                    }
                                                                                );
                    __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                    BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 52 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    AddHtmlAttributeValue("", 2087, changeQuantityAction, 2087, 21, false);

#line default
#line hidden
                    EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_1.Value;
                    __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(2407, 46, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"text-right\">");
                    EndContext();
                    BeginContext(2454, 36, false);
#line 58 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    Write(CurrencyFormat.Format(product.Price));

#line default
#line hidden
                    EndContext();
                    BeginContext(2490, 37, true);
                    WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-right\">");
                    EndContext();
                    BeginContext(2528, 67, false);
#line 59 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    Write(CurrencyFormat.Format(decimal.Parse(product.Price) * line.Quantity));

#line default
#line hidden
                    EndContext();
                    BeginContext(2595, 28, true);
                    WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(2623, 236, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c6920703", async() => {
                        BeginContext(2697, 44, true);
                        WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"index\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 2741, "\"", 2759, 1);
#line 62 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                        WriteAttributeValue("", 2749, count++, 2749, 10, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(2760, 92, true);
                        WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn btn-sm btn-danger\" value=\"Remove\" />\r\n\t\t\t\t\t\t\t\t");
                        EndContext();
                    }
                                                                                );
                    __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                    BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 61 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                    AddHtmlAttributeValue("", 2668, removeAction, 2668, 13, false);

#line default
#line hidden
                    EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_1.Value;
                    __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(2859, 16, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t\t</td>\r\n");
                    EndContext();
#line 66 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
                }

#line default
#line hidden
                BeginContext(2884, 12, true);
                WriteLiteral("\t\t\t\t\t</tr>\r\n");
                EndContext();
#line 68 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
            }


#line default
#line hidden
            BeginContext(2909, 111, true);
            WriteLiteral("\t\t</tbody>\r\n\t\t<tfoot>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"6\" class=\"text-right\">Total:</td>\r\n\t\t\t\t<td class=\"text-right\">");
            EndContext();
            BeginContext(3021, 65, false);
#line 74 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml"
            Write(CurrencyFormat.FormatWithUnit(Model.ComputeTotalValue(eCommerce)));

#line default
#line hidden
            EndContext();
            BeginContext(3086, 46, true);
            WriteLiteral("</td>\r\n\t\t\t</tr>\r\n\t\t</tfoot>\r\n\t</table>\r\n</div>");
            EndContext();
        }
Пример #15
0
        /// <inheritdoc/>
        protected override Book Load(Uri uri)
        {
            var book = new Book();

            var doc = XDocument.Load(uri.ToString());

            var securities = new Dictionary <Guid, Security>();
            var accounts   = new Dictionary <Guid, Account>();

            foreach (var s in doc.Element("Book").Element("Securities").Elements("Security"))
            {
                var f                = s.Element("Format");
                var decimalDigits    = (int)f.Attribute("decimalDigits");
                var decimalSeparator = (string)f.Attribute("decimalSeparator");
                var groupSeparator   = (string)f.Attribute("groupSeparator");
                var groupSizes       = ((string)f.Attribute("groupSizes")).Split(',').Select(g => int.Parse(g.Trim()));
                var positiveFormat   = (PositiveFormat)Enum.Parse(typeof(PositiveFormat), (string)f.Attribute("positiveFormat"));
                var negativeFormat   = (NegativeFormat)Enum.Parse(typeof(NegativeFormat), (string)f.Attribute("negativeFormat"));
                var currencySymbol   = (string)f.Attribute("symbol");
                var format           = new CurrencyFormat(decimalDigits, decimalSeparator, groupSeparator, groupSizes, currencySymbol, positiveFormat, negativeFormat);

                var securityId     = (Guid)s.Attribute("id");
                var securityType   = (SecurityType)Enum.Parse(typeof(SecurityType), (string)s.Attribute("type"));
                var name           = (string)s.Attribute("name");
                var symbol         = (string)s.Attribute("symbol");
                var fractionTraded = (int)s.Attribute("fractionTraded");

                var security = new Security(securityId, securityType, name, symbol, format, fractionTraded);
                securities.Add(security.SecurityId, security);
                book.AddSecurity(security);
            }

            foreach (var a in doc.Element("Book").Element("Accounts").Elements("Account"))
            {
                var accountId   = (Guid)a.Attribute("id");
                var accountType = (AccountType)Enum.Parse(typeof(AccountType), (string)a.Attribute("type"));

                Security security     = null;
                var      securityAttr = a.Attribute("securityId");
                if (securityAttr != null)
                {
                    security = securities[(Guid)securityAttr];
                }

                Account parentAccount = null;
                var     parentAttr    = a.Attribute("parentAccountId");
                if (parentAttr != null)
                {
                    parentAccount = accounts[(Guid)parentAttr];
                }

                var name             = (string)a.Attribute("name");
                var smallestFraction = (int?)a.Attribute("smallestFraction");

                var account = new Account(accountId, accountType, security, parentAccount, name, smallestFraction);
                accounts.Add(account.AccountId, account);
                book.AddAccount(account);
            }

            foreach (var t in doc.Element("Book").Element("Transactions").Elements("Transaction"))
            {
                var transactionId = (Guid)t.Attribute("id");
                var securityId    = (Guid)t.Attribute("securityId");
                var security      = securities[securityId];
                var date          = (DateTime)t.Attribute("date");

                var transaction = new Transaction(transactionId, security)
                {
                    Date = date,
                };

                foreach (var s in t.Elements("Split"))
                {
                    var split = transaction.AddSplit();

                    var accountId = (Guid)s.Attribute("accountId");
                    var account   = accounts[accountId];
                    split.Account = account;

                    var splitSecurityId = (Guid?)s.Attribute("securityId");
                    var splitSecurity   = securities[splitSecurityId ?? securityId];
                    split.Security = splitSecurity;

                    var amount = (long)s.Attribute("amount");
                    split.Amount = amount;

                    var transactionAmount = (long?)s.Attribute("transactionAmount");
                    split.TransactionAmount = splitSecurity != security ? transactionAmount.Value : transactionAmount ?? amount;

                    var dateCleared = (DateTime?)s.Attribute("dateCleared");
                    split.DateCleared = dateCleared;

                    var reconciled = (bool)s.Attribute("reconciled");
                    split.IsReconciled = reconciled;
                }

                book.AddTransaction(transaction);
            }

            foreach (var p in doc.Element("Book").Element("PriceQuotes").Elements("PriceQuote"))
            {
                var priceQuoteId = (Guid)p.Attribute("id");
                var dateTime     = (DateTime)p.Attribute("date");
                var securityId   = (Guid)p.Attribute("securityId");
                var security     = securities[securityId];
                var quantity     = (long)p.Attribute("quantity");
                var currencyId   = (Guid)p.Attribute("currencyId");
                var currency     = securities[currencyId];
                var price        = (long)p.Attribute("price");
                var source       = (string)p.Attribute("source");

                var priceQuote = new PriceQuote(priceQuoteId, dateTime, security, quantity, currency, price, source);
                book.AddPriceQuote(priceQuote);
            }

            foreach (var s in doc.Element("Book").Element("Settings").Elements("Setting"))
            {
                var key   = (string)s.Attribute("key");
                var value = (string)s.Attribute("value");

                book.SetSetting(key, value);
            }

            return(book);
        }
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(20, 58, true);
            WriteLiteral("\r\n<div class=\"card d-inline-block col-3 mb-3 ml-5 p-0\">\r\n\t");
            EndContext();
            BeginContext(78, 118, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "ddafc729378062637e09a5810f29060231e4a4cc6769", async() => {
            }
                                                                        );
            __ECommerce_UI_MVC_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.MVC.Infrastructure.ImageTagHelper>();
            __tagHelperExecutionContext.Add(__ECommerce_UI_MVC_Infrastructure_ImageTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 4 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent = Model.RepresentativeImage;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 4 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            AddHtmlAttributeValue("", 170, Model.ProductTypeName, 170, 22, false);

#line default
#line hidden
            EndAddHtmlAttributeValues(__tagHelperExecutionContext);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(196, 72, true);
            WriteLiteral("\r\n\t<div class=\"card-body\">\r\n\t\t<h4 class=\"card-title text-truncate\">\r\n\t\t\t");
            EndContext();
            BeginContext(268, 203, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "ddafc729378062637e09a5810f29060231e4a4cc8846", async() => {
                BeginContext(446, 21, false);
#line 9 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
                Write(Model.ProductTypeName);

#line default
#line hidden
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
            {
                throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
            }
            BeginWriteTagHelperAttribute();
#line 8 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            WriteLiteral(Model.SellerId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            BeginWriteTagHelperAttribute();
#line 8 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            WriteLiteral(Model.ProductTypeId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "title", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 9 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            AddHtmlAttributeValue("", 421, Model.ProductTypeName, 421, 22, false);

#line default
#line hidden
            EndAddHtmlAttributeValues(__tagHelperExecutionContext);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(471, 224, true);
            WriteLiteral("\r\n\t\t</h4>\r\n\t\t<p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card\'s content.</p>\r\n\t\t<div class=\"form-row\">\r\n\t\t\t<div class=\"col-6\">\r\n\t\t\t\t<p class=\"btn btn-danger btn-block\">");
            EndContext();
            BeginContext(696, 34, false);
#line 14 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            Write(CurrencyFormat.Format(Model.Price));

#line default
#line hidden
            EndContext();
            BeginContext(730, 45, true);
            WriteLiteral("</p>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-6\">\r\n\t\t\t\t");
            EndContext();
            BeginContext(775, 205, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "ddafc729378062637e09a5810f29060231e4a4cc13432", async() => {
                BeginContext(957, 19, true);
                WriteLiteral("\r\n\t\t\t\t\tDetail\r\n\t\t\t\t");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
            {
                throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
            }
            BeginWriteTagHelperAttribute();
#line 18 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            WriteLiteral(Model.SellerId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            BeginWriteTagHelperAttribute();
#line 18 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\ProductSummary.cshtml"
            WriteLiteral(Model.ProductTypeId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(980, 38, true);
            WriteLiteral("\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>");
            EndContext();
        }
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(20, 2, true);
            WriteLiteral("\r\n");
            EndContext();
#line 3 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            ECommerceService eCommerce = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService];

#line default
#line hidden
            BeginContext(119, 271, true);
            WriteLiteral(@"<div class=""container"">
	<div class=""card productDetailCard"">
		<div class=""container-fliud"">
			<div class=""wrapper row"">
				<div class=""preview col-md-6"">
					<div id=""galleryResult"" class=""preview-pic tab-content"">
						<div class=""galleryThumbnail"">
							"                            );
            EndContext();
            BeginContext(390, 65, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab11951", async() => {
            }
                                                                        );
            __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.ImageTagHelper>();
            __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 11 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent = Model.RepresentativeImage;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(455, 203, true);
            WriteLiteral("\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div id=\"carouselExampleControls\" class=\"preview-thumbnail nav nav-tabs carousel slide\" data-ride=\"carousel\" data-interval=\"false\">\r\n\t\t\t\t\t\t<div class=\"carousel-inner\">\r\n");
            EndContext();
#line 16 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"

            IList <FileContent> images = eCommerce.GetProductImages(int.Parse(Model.SellerId), int.Parse(Model.ProductTypeId)).ToList();
            short      count           = 1;
            TagBuilder container       = new TagBuilder("div");
            TagBuilder carouselItem    = new TagBuilder("div");
            carouselItem.AddCssClass("carousel-item active");
            container.InnerHtml.AppendHtml(carouselItem);
            foreach (FileContent image in images)
            {
                carouselItem.InnerHtml
                .AppendHtml($"<div class=\"galleryThumbnail\"><img src=\"{image.EncodeInBase64()}\" /></div>");
                if (count++ == 5)
                {
                    carouselItem = new TagBuilder("div");
                    carouselItem.AddCssClass("carousel-item active");
                    container.InnerHtml.AppendHtml(carouselItem);
                    count = 1;
                }
            }


#line default
#line hidden
            BeginContext(1515, 7, true);
            WriteLiteral("\t\t\t\t\t\t\t");
            EndContext();
            BeginContext(1523, 19, false);
#line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            Write(container.InnerHtml);

#line default
#line hidden
            EndContext();
            BeginContext(1542, 560, true);
            WriteLiteral(@"
						</div>
						<a class=""carousel-control-prev"" href=""#carouselExampleControls"" role=""button"" data-slide=""prev"">
							<span class=""carousel-control-prev-icon"" aria-hidden=""true""></span>
							<span class=""sr-only"">Previous</span>
						</a>
						<a class=""carousel-control-next"" href=""#carouselExampleControls"" role=""button"" data-slide=""next"">
							<span class=""carousel-control-next-icon"" aria-hidden=""true""></span>
							<span class=""sr-only"">Next</span>
						</a>
					</div>
				</div>
				<div class=""details col-md-6"">
					<h3>"                    );
            EndContext();
            BeginContext(2102, 171, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab15915", async() => {
                BeginContext(2248, 21, false);
#line 49 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                Write(Model.ProductTypeName);

#line default
#line hidden
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
            {
                throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-productTypeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
            }
            BeginWriteTagHelperAttribute();
#line 49 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            WriteLiteral(Model.ProductTypeId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(2273, 570, true);
            WriteLiteral(@"</h3>
					<div>
						<div>
							<span class=""fa fa-star checked""></span>
							<span class=""fa fa-star checked""></span>
							<span class=""fa fa-star checked""></span>
							<span class=""fa fa-star""></span>
							<span class=""fa fa-star""></span>
						</div>
						<span>41 reviews</span>
					</div>
					<p>Suspendisse quos? Tempus cras iure temporibus? Eu laudantium cubilia sem sem! Repudiandae et! Massa senectus enim minim sociosqu delectus posuere.</p>
					<h4 class=""font-weight-bold text-uppercase"">current price: <span class=""text-warning"">"                    );
            EndContext();
            BeginContext(2844, 42, false);
#line 61 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            Write(CurrencyFormat.FormatWithUnit(Model.Price));

#line default
#line hidden
            EndContext();
            BeginContext(2886, 71, true);
            WriteLiteral("</span></h4>\r\n\t\t\t\t\t<h4 class=\"font-weight-bold text-uppercase\">SELLER: ");
            EndContext();
            BeginContext(2957, 132, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab20117", async() => {
                BeginContext(3069, 16, false);
#line 62 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                Write(Model.SellerName);

#line default
#line hidden
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_5.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
            if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
            {
                throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
            }
            BeginWriteTagHelperAttribute();
#line 62 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            WriteLiteral(Model.SellerId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(3089, 114, true);
            WriteLiteral("</h4>\r\n\t\t\t\t\t<p class=\"vote\"><strong>91%</strong> of buyers enjoyed this product! <strong>(87 votes)</strong></p>\r\n");
            EndContext();
#line 64 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            foreach (var attribute in Model.Attributes)
            {
#line default
#line hidden
                BeginContext(3262, 59, true);
                WriteLiteral("\t\t\t\t\t\t<h5 class=\"font-weight-bold text-uppercase\">\r\n\t\t\t\t\t\t\t");
                EndContext();
                BeginContext(3322, 13, false);
#line 67 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                Write(attribute.Key);

#line default
#line hidden
                EndContext();
                BeginContext(3335, 3, true);
                WriteLiteral(":\r\n");
                EndContext();
#line 68 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                foreach (var value in attribute.Value)
                {
#line default
#line hidden
                    BeginContext(3396, 89, true);
                    WriteLiteral("\t\t\t\t\t\t\t\t<label class=\"radio-inline text-info\">\r\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" disabled /> ");
                    EndContext();
                    BeginContext(3486, 5, false);
#line 71 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                    Write(value);

#line default
#line hidden
                    EndContext();
                    BeginContext(3491, 20, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t\t\t</label>\r\n");
                    EndContext();
#line 73 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                }

#line default
#line hidden
                BeginContext(3521, 13, true);
                WriteLiteral("\t\t\t\t\t\t</h5>\r\n");
                EndContext();
#line 75 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            }

#line default
#line hidden
            BeginContext(3542, 106, true);
            WriteLiteral("\t\t\t\t\t<h5 class=\"font-weight-bold text-uppercase\">Quantity:<input id=\"productQuantity\" type=\"text\" readonly");
            EndContext();
            BeginWriteAttribute("value", " value=\"", 3648, "\"", 3671, 1);
#line 76 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            WriteAttributeValue("", 3656, Model.Quantity, 3656, 15, false);

#line default
#line hidden
            EndWriteAttribute();
            BeginContext(3672, 67, true);
            WriteLiteral(" /></h5>\r\n\t\t\t\t\t<h5 class=\"font-weight-bold text-uppercase\">Active: ");
            EndContext();
            BeginContext(3740, 12, false);
#line 77 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            Write(Model.Active);

#line default
#line hidden
            EndContext();
            BeginContext(3752, 75, true);
            WriteLiteral("</h5>\r\n\t\t\t\t\t<h5 class=\"font-weight-bold text-uppercase\">Status:</h5>\r\n\t\t\t\t\t");
            EndContext();
            BeginContext(3827, 370, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab26657", async() => {
                BeginContext(3898, 44, true);
                WriteLiteral("\r\n\t\t\t\t\t\t<input name=\"sellerId\" type=\"hidden\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 3942, "\"", 3965, 1);
#line 80 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                WriteAttributeValue("", 3950, Model.SellerId, 3950, 15, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(3966, 52, true);
                WriteLiteral(" />\r\n\t\t\t\t\t\t<input name=\"productTypeId\" type=\"hidden\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 4018, "\"", 4046, 1);
#line 81 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                WriteAttributeValue("", 4026, Model.ProductTypeId, 4026, 20, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(4047, 11, true);
                WriteLiteral(" />\r\n\t\t\t\t\t\t");
                EndContext();
                BeginContext(4058, 125, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab28077", async() => {
                }
                                                                            );
                __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.EnumSelectListTagHelper>();
                __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
#line 82 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.EnumType = typeof(ProductStatus);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("enum-type", __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.EnumType, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 82 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.Selected = Model.Status;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("selected", __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.Selected, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(4183, 7, true);
                WriteLiteral("\r\n\t\t\t\t\t");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_8.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_8);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Controller = (string)__tagHelperAttribute_9.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_9);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_10.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_10);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(4197, 86, true);
            WriteLiteral("\r\n\t\t\t\t\t<h5 class=\"font-weight-bold text-uppercase\">Add or reduce quantity:</h5>\r\n\t\t\t\t\t");
            EndContext();
            BeginContext(4283, 793, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab32154", async() => {
                BeginContext(4394, 154, true);
                WriteLiteral("\r\n\t\t\t\t\t\t<div class=\"form-row\">\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"input-group\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"input-group-prepend\">\r\n\t\t\t\t\t\t\t\t\t\t");
                EndContext();
                BeginContext(4548, 117, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d7925c9d50d5a17e9a63fa26866a3117b92fe5ab32749", async() => {
                }
                                                                            );
                __ECommerce_UI_AdminSite_Infrastructure_BooleanSelectListTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.BooleanSelectListTagHelper>();
                __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_BooleanSelectListTagHelper);
#line 90 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                __ECommerce_UI_AdminSite_Infrastructure_BooleanSelectListTagHelper.SelectedBoolValue = null;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("selected-bool-value", __ECommerce_UI_AdminSite_Infrastructure_BooleanSelectListTagHelper.SelectedBoolValue, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __ECommerce_UI_AdminSite_Infrastructure_BooleanSelectListTagHelper.TrueLabel = (string)__tagHelperAttribute_11.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_11);
                __ECommerce_UI_AdminSite_Infrastructure_BooleanSelectListTagHelper.FalseLabel = (string)__tagHelperAttribute_12.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_12);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_13);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_14);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(4665, 175, true);
                WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<input class=\"form-control\" type=\"number\" name=\"number\" />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"sellerId\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 4840, "\"", 4863, 1);
#line 96 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                WriteAttributeValue("", 4848, Model.SellerId, 4848, 15, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(4864, 52, true);
                WriteLiteral(" />\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"productTypeId\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 4916, "\"", 4944, 1);
#line 97 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                WriteAttributeValue("", 4924, Model.ProductTypeId, 4924, 20, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(4945, 124, true);
                WriteLiteral(" />\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<input class=\"btn btn-lg btn-success\" type=\"submit\" value=\"Change quantity\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_15.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_15);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Controller = (string)__tagHelperAttribute_9.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_9);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_10.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_10);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_16);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(5076, 642, true);
            WriteLiteral(@"
				</div>
			</div>
		</div>
	</div>
</div>

<script type=""text/javascript"">
	//change product status

	$('.submitOnChange').change(function () {
		var $form = $(this).closest('form');
		$.ajax({
			url: $form.attr('action'),
			type: $form.attr('method'),
			data: $form.serialize(),
			success: function (result) {
				if (result != '')
					alert(result);
			},
			error: function (result) {
				alert('something went wrong while changing product status:\n' + result);
			}
		});
	});

	//product detail

	$('.galleryThumbnail').click(function(){
		$('#galleryResult').html($(this).clone());
	});
</script>");
            EndContext();
        }
Пример #18
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(30, 466, true);
            WriteLiteral(@"
<div class=""table-responsive rounded"">
	<table class=""table table-striped table-bordered table-hover table-condensed table-sm table-active table-secondary"">
		<thead class=""thead-dark"">
			<tr>
				<th style=""width:30%;""></th>
				<th style=""width:12%;"">Name</th>
				<th style=""width:12%;"">Price</th>
				<th style=""width:12%;"">Quantity</th>
				<th style=""width:12%;"">Active</th>
				<th style=""width:12%;"">Status</th>
			</tr>
		</thead>
		<tbody>
");
            EndContext();
#line 16 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"

            ECommerceService eCommerce  = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService];
            string           formAction = Url.Action("ChangeProductActive", "Seller");
            foreach (ProductView product in Model.Products)
            {
#line default
#line hidden
                BeginContext(728, 51, true);
                WriteLiteral("\t\t\t\t\t<tr class=\"sellerProductTableRow\">\r\n\t\t\t\t\t\t<td>");
                EndContext();
                BeginContext(779, 50, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "7a85f1824d96d6efa75d4eecf05f7e2b513d81d49277", async() => {
                }
                                                                            );
                __ECommerce_UI_MVC_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.MVC.Infrastructure.ImageTagHelper>();
                __tagHelperExecutionContext.Add(__ECommerce_UI_MVC_Infrastructure_ImageTagHelper);
#line 22 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent = product.RepresentativeImage;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(829, 17, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td>");
                EndContext();
                BeginContext(847, 23, false);
#line 23 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                Write(product.ProductTypeName);

#line default
#line hidden
                EndContext();
                BeginContext(870, 17, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td>");
                EndContext();
                BeginContext(888, 36, false);
#line 24 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                Write(CurrencyFormat.Format(product.Price));

#line default
#line hidden
                EndContext();
                BeginContext(924, 17, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td>");
                EndContext();
                BeginContext(942, 16, false);
#line 25 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                Write(product.Quantity);

#line default
#line hidden
                EndContext();
                BeginContext(958, 26, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t");
                EndContext();
                BeginContext(984, 472, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "7a85f1824d96d6efa75d4eecf05f7e2b513d81d411911", async() => {
                    BeginContext(1025, 51, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"productTypeId\"");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 1076, "\"", 1106, 1);
#line 28 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                    WriteAttributeValue("", 1084, product.ProductTypeId, 1084, 22, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(1107, 20, true);
                    WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t<input ");
                    EndContext();
                    BeginContext(1129, 31, false);
#line 29 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                    Write(product.Active ? "checked" : "");

#line default
#line hidden
                    EndContext();
                    BeginContext(1161, 288, true);
                    WriteLiteral(@" class=""submitOnChange"" name=""active""
										type=""checkbox"" data-toggle=""toggle"" value=""true""
										data-onstyle=""success"" data-offstyle=""danger"" data-size=""small""
										data-on=""<i class='fas fa-lock-open'></i>""
										data-off=""<i class='fa fa-lock'></i>"" />
							"                            );
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 27 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                AddHtmlAttributeValue("", 998, formAction, 998, 11, false);

#line default
#line hidden
                EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_0.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1456, 25, true);
                WriteLiteral("\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>");
                EndContext();
                BeginContext(1482, 14, false);
#line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                Write(product.Status);

#line default
#line hidden
                EndContext();
                BeginContext(1496, 26, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t");
                EndContext();
                BeginContext(1522, 111, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "7a85f1824d96d6efa75d4eecf05f7e2b513d81d415617", async() => {
                    BeginContext(1625, 4, true);
                    WriteLiteral("Edit");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-productTypeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 38 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
                WriteLiteral(product.ProductTypeId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1633, 97, true);
                WriteLiteral("\r\n\t\t\t\t\t\t\t<a href=\"#\" class=\"btn btn-danger\">Change Operating Model</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n");
                EndContext();
#line 42 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
            }


#line default
#line hidden
            BeginContext(1743, 33, true);
            WriteLiteral("\t\t</tbody>\r\n\t</table>\r\n</div>\r\n\r\n");
            EndContext();
            BeginContext(1776, 233, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "7a85f1824d96d6efa75d4eecf05f7e2b513d81d418518", async() => {
                BeginContext(2001, 2, true);
                WriteLiteral("\r\n");
                EndContext();
            }
                                                                        );
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper = CreateTagHelper <global::ECommerce.UI.MVC.Infrastructure.PageLinkTagHelper>();
            __tagHelperExecutionContext.Add(__ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper);
#line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageModel = Model.PagingInfo;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("page-model", __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageModel, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            BeginWriteTagHelperAttribute();
#line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Seller\Product.cshtml"
            WriteLiteral(ViewContext.RouteData.Values["Action"].ToString());

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageAction = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("page-action", __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageAction, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageClass = (string)__tagHelperAttribute_4.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageClassNormal = (string)__tagHelperAttribute_5.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageClassSelected = (string)__tagHelperAttribute_6.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
            __ECommerce_UI_MVC_Infrastructure_PageLinkTagHelper.PageClassDisabled = (string)__tagHelperAttribute_7.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(2009, 470, true);
            WriteLiteral(@"

<script type=""text/javascript"">
	//change user state

	$('.submitOnChange').change(function () {
		var $form = $(this).closest('form');
		$.ajax({
			url: $form.attr('action'),
			type: $form.attr('method'),
			data: $form.serialize(),
			success: function (result) {
				if (result != '')
					alert(result);
			},
			error: function (result) {
				alert('something went wrong while changing product active:\n' + result);
			}
		});
	});
</script>");
            EndContext();
        }
Пример #19
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(31, 550, true);
            WriteLiteral(@"
<div class=""table-responsive rounded"">
	<table class=""table table-striped table-bordered table-hover table-condensed table-sm table-active table-secondary"">
		<thead class=""thead-dark"">
			<tr>
				<th style=""width:30%;""></th>
				<th style=""width:10%;"">Item</th>
				<th style=""width:10%;"">Seller</th>
				<th style=""width:10%;"">Attributes</th>
				<th style=""width:10%;"">Quantity</th>
				<th class=""text-right"" style=""width:10%;"">Price</th>
				<th class=""text-right"" style=""width:10%;"">Subtotal</th>
			</tr>
		</thead>
		<tbody>
");
            EndContext();
#line 17 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"

            ECommerceService eCommerce            = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService];
            string           removeAction         = Url.Action("RemoveFromCart", "Cart");
            string           changeQuantityAction = Url.Action("ChangeQuantity", "Cart");
            foreach (OrderView order in Model)
            {
                ProductView product = eCommerce.GetProductBy(int.Parse(order.SellerId), int.Parse(order.ProductTypeId));

#line default
#line hidden
                BeginContext(982, 45, true);
                WriteLiteral("\t\t\t\t\t<tr class=\"orderTableRow\">\r\n\t\t\t\t\t\t<td>\r\n");
                EndContext();
#line 26 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                if (product != null)
                {
#line default
#line hidden
                    BeginContext(1065, 7, true);
                    WriteLiteral("\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(1072, 105, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "22910b03a2e4ab43cb8ff370c3ba50625d0eb9588895", async() => {
                    }
                                                                                );
                    __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.ImageTagHelper>();
                    __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 28 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent = product.RepresentativeImage;

#line default
#line hidden
                    __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                    BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 28 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    AddHtmlAttributeValue("", 1151, order.ProductTypeName, 1151, 22, false);

#line default
#line hidden
                    EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(1177, 2, true);
                    WriteLiteral("\r\n");
                    EndContext();
#line 29 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(1209, 7, true);
                    WriteLiteral("\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(1216, 88, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "22910b03a2e4ab43cb8ff370c3ba50625d0eb95811256", async() => {
                    }
                                                                                );
                    __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
                    BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 32 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    AddHtmlAttributeValue("", 1278, order.ProductTypeName, 1278, 22, false);

#line default
#line hidden
                    EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(1304, 2, true);
                    WriteLiteral("\r\n");
                    EndContext();
#line 33 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                }

#line default
#line hidden
                BeginContext(1315, 41, true);
                WriteLiteral("\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"text-left\">");
                EndContext();
                BeginContext(1356, 160, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "22910b03a2e4ab43cb8ff370c3ba50625d0eb95813282", async() => {
                    BeginContext(1491, 21, false);
#line 35 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    Write(order.ProductTypeName);

#line default
#line hidden
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-productTypeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 35 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                WriteLiteral(order.ProductTypeId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1516, 35, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-left\">");
                EndContext();
                BeginContext(1551, 140, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "22910b03a2e4ab43cb8ff370c3ba50625d0eb95816446", async() => {
                    BeginContext(1671, 16, false);
#line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    Write(order.SellerName);

#line default
#line hidden
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_5.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                WriteLiteral(order.SellerId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1691, 37, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-left\">\r\n");
                EndContext();
#line 38 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                foreach (var attribute in order.Attributes)
                {
#line default
#line hidden
                    BeginContext(1791, 11, true);
                    WriteLiteral("\t\t\t\t\t\t\t\t<p>");
                    EndContext();
                    BeginContext(1803, 13, false);
#line 40 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    Write(attribute.Key);

#line default
#line hidden
                    EndContext();
                    BeginContext(1816, 2, true);
                    WriteLiteral(": ");
                    EndContext();
                    BeginContext(1819, 15, false);
#line 40 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                    Write(attribute.Value);

#line default
#line hidden
                    EndContext();
                    BeginContext(1834, 6, true);
                    WriteLiteral("</p>\r\n");
                    EndContext();
#line 41 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                }

#line default
#line hidden
                BeginContext(1850, 43, true);
                WriteLiteral("\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"text-center\">");
                EndContext();
                BeginContext(1894, 14, false);
#line 43 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                Write(order.Quantity);

#line default
#line hidden
                EndContext();
                BeginContext(1908, 36, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-right\">");
                EndContext();
                BeginContext(1945, 41, false);
#line 44 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                Write(CurrencyFormat.Format(order.CurrentPrice));

#line default
#line hidden
                EndContext();
                BeginContext(1986, 36, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-right\">");
                EndContext();
                BeginContext(2023, 84, false);
#line 45 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
                Write(CurrencyFormat.Format(decimal.Parse(order.CurrentPrice) * int.Parse(order.Quantity)));

#line default
#line hidden
                EndContext();
                BeginContext(2107, 19, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t</tr>\r\n");
                EndContext();
#line 47 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml"
            }


#line default
#line hidden
            BeginContext(2139, 29, true);
            WriteLiteral("\t\t</tbody>\r\n\t</table>\r\n</div>");
            EndContext();
        }
Пример #20
0
 public void AssignReferences(IEnumerable <ReferenceXml> references)
 {
     NumericFormat.AssignReferences(references);
     CurrencyFormat.AssignReferences(references);
 }
Пример #21
0
        protected override Book Load(Uri uri)
        {
            var book = new Book();

            var doc = XDocument.Load(uri.ToString());

            var securities = new Dictionary<Guid, Security>();
            var accounts = new Dictionary<Guid, Account>();

            foreach (var s in doc.Element("Book").Element("Securities").Elements("Security"))
            {
                var f = s.Element("Format");
                var decimalDigits = (int)f.Attribute("decimalDigits");
                var decimalSeparator = (string)f.Attribute("decimalSeparator");
                var groupSeparator = (string)f.Attribute("groupSeparator");
                var groupSizes = ((string)f.Attribute("groupSizes")).Split(',').Select(g => int.Parse(g.Trim()));
                var positiveFormat = (PositiveFormat)Enum.Parse(typeof(PositiveFormat), (string)f.Attribute("positiveFormat"));
                var negativeFormat = (NegativeFormat)Enum.Parse(typeof(NegativeFormat), (string)f.Attribute("negativeFormat"));
                var currencySymbol = (string)f.Attribute("symbol");
                var format = new CurrencyFormat(decimalDigits, decimalSeparator, groupSeparator, groupSizes, currencySymbol, positiveFormat, negativeFormat);

                var securityId = (Guid)s.Attribute("id");
                var securityType = (SecurityType)Enum.Parse(typeof(SecurityType), (string)s.Attribute("type"));
                var name = (string)s.Attribute("name");
                var symbol = (string)s.Attribute("symbol");
                var fractionTraded = (int)s.Attribute("fractionTraded");

                var security = new Security(securityId, securityType, name, symbol, format, fractionTraded);
                securities.Add(security.SecurityId, security);
                book.AddSecurity(security);
            }

            foreach (var a in doc.Element("Book").Element("Accounts").Elements("Account"))
            {
                var accountId = (Guid)a.Attribute("id");
                var accountType = (AccountType)Enum.Parse(typeof(AccountType), (string)a.Attribute("type"));

                Security security = null;
                var securityAttr = a.Attribute("securityId");
                if (securityAttr != null)
                {
                    security = securities[(Guid)securityAttr];
                }

                Account parentAccount = null;
                var parentAttr = a.Attribute("parentAccountId");
                if (parentAttr != null)
                {
                    parentAccount = accounts[(Guid)parentAttr];
                }

                var name = (string)a.Attribute("name");
                var smallestFraction = (int?)a.Attribute("smallestFraction");

                var account = new Account(accountId, accountType, security, parentAccount, name, smallestFraction);
                accounts.Add(account.AccountId, account);
                book.AddAccount(account);
            }

            foreach (var t in doc.Element("Book").Element("Transactions").Elements("Transaction"))
            {
                var transactionId = (Guid)t.Attribute("id");
                var securityId = (Guid)t.Attribute("securityId");
                var security = securities[securityId];
                var date = (DateTime)t.Attribute("date");

                var transaction = new Transaction(transactionId, security);
                using (var tlock = transaction.Lock())
                {
                    transaction.SetDate(date, tlock);

                    foreach (var s in t.Elements("Split"))
                    {
                        var split = transaction.AddSplit(tlock);

                        var accountId = (Guid)s.Attribute("accountId");
                        var account = accounts[accountId];
                        split.SetAccount(account, tlock);

                        var splitSecurityId = (Guid)s.Attribute("securityId");
                        var splitSecurity = securities[splitSecurityId];
                        split.SetSecurity(splitSecurity, tlock);

                        var amount = (long)s.Attribute("amount");
                        split.SetAmount(amount, tlock);

                        var transactionAmount = (long)s.Attribute("transactionAmount");
                        split.SetTransactionAmount(transactionAmount, tlock);

                        var dateCleared = (DateTime?)s.Attribute("dateCleared");
                        split.SetDateCleared(dateCleared, tlock);

                        var reconciled = (bool)s.Attribute("reconciled");
                        split.SetIsReconciled(reconciled, tlock);
                    }
                }

                book.AddTransaction(transaction);
            }

            foreach (var p in doc.Element("Book").Element("PriceQuotes").Elements("PriceQuote"))
            {
                var priceQuoteId = (Guid)p.Attribute("id");
                var dateTime = (DateTime)p.Attribute("date");
                var securityId = (Guid)p.Attribute("securityId");
                var security = securities[securityId];
                var quantity = (long)p.Attribute("quantity");
                var currencyId = (Guid)p.Attribute("currencyId");
                var currency = securities[currencyId];
                var price = (long)p.Attribute("price");
                var source = (string)p.Attribute("source");

                var priceQuote = new PriceQuote(priceQuoteId, dateTime, security, quantity, currency, price, source);
                book.AddPriceQuote(priceQuote);
            }

            foreach (var s in doc.Element("Book").Element("Settings").Elements("Setting"))
            {
                var key = (string)s.Attribute("key");
                var value = (string)s.Attribute("value");

                book.SetSetting(key, value);
            }

            return book;
        }
Пример #22
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(33, 2, true);
            WriteLiteral("\r\n");
            EndContext();
#line 3 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
            ECommerceService eCommerce = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService];

#line default
#line hidden
            BeginContext(133, 371, true);
            WriteLiteral(@"
<div class=""table-responsive rounded"">
	<table class=""table table-striped table-bordered table-hover table-condensed table-sm table-secondary table-active"">
		<thead class=""thead-dark"">
			<tr>
				<th class=""w-25""></th>
				<th>Seller</th>
				<th>Product Type</th>
				<th>Price</th>
				<th>Active</th>
				<th>Status</th>
			</tr>
		</thead>
		<tbody>
");
            EndContext();
#line 18 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
            string formAction = Url.Action("ChangeStatus", "Product");

#line default
#line hidden
            BeginContext(569, 3, true);
            WriteLiteral("\t\t\t");
            EndContext();
#line 19 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
            foreach (ProductView product in Model)
            {
#line default
#line hidden
                BeginContext(619, 42, true);
                WriteLiteral("\t\t\t\t<tr class=\"productTypeRow\">\r\n\t\t\t\t\t<td>");
                EndContext();
                BeginContext(661, 108, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "c76781d66c674e6fd7a2cd9c3cefe2516bd1660710603", async() => {
                }
                                                                            );
                __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.ImageTagHelper>();
                __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 22 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent = product.RepresentativeImage;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 22 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                AddHtmlAttributeValue("", 741, product.ProductTypeName, 741, 24, false);

#line default
#line hidden
                EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(769, 16, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t<td>");
                EndContext();
                BeginContext(785, 144, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c76781d66c674e6fd7a2cd9c3cefe2516bd1660712696", async() => {
                    BeginContext(907, 18, false);
#line 23 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                    Write(product.SellerName);

#line default
#line hidden
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 23 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                WriteLiteral(product.SellerId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(929, 24, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t");
                EndContext();
                BeginContext(953, 173, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c76781d66c674e6fd7a2cd9c3cefe2516bd1660715733", async() => {
                    BeginContext(1089, 4, true);
                    WriteLiteral("<h4>");
                    EndContext();
                    BeginContext(1094, 23, false);
#line 25 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                    Write(product.ProductTypeName);

#line default
#line hidden
                    EndContext();
                    BeginContext(1117, 5, true);
                    WriteLiteral("</h4>");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-productTypeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 25 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                WriteLiteral(product.ProductTypeId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1126, 2, true);
                WriteLiteral("\r\n");
                EndContext();
#line 26 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"

                int categoryId = int.Parse(eCommerce.GetProductTypeBy(int.Parse(product.ProductTypeId)).CategoryId);

#line default
#line hidden
                BeginContext(1247, 24, true);
                WriteLiteral("\t\t\t\t\t\t\t<small>\r\n\t\t\t\t\t\t\t\t");
                EndContext();
                BeginContext(1272, 69, false);
#line 29 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                Write(await Component.InvokeAsync("CategoryBreadCrumb", new { categoryId }));

#line default
#line hidden
                EndContext();
                BeginContext(1341, 19, true);
                WriteLiteral("\r\n\t\t\t\t\t\t\t</small>\r\n");
                EndContext();
                BeginContext(1369, 21, true);
                WriteLiteral("\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>");
                EndContext();
                BeginContext(1391, 36, false);
#line 33 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                Write(CurrencyFormat.Format(product.Price));

#line default
#line hidden
                EndContext();
                BeginContext(1427, 31, true);
                WriteLiteral("</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<input ");
                EndContext();
                BeginContext(1460, 31, false);
#line 35 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                Write(product.Active ? "checked" : "");

#line default
#line hidden
                EndContext();
                BeginContext(1492, 282, true);
                WriteLiteral(@"
							   type=""checkbox"" data-toggle=""toggle"" value=""true""
							   data-onstyle=""success"" data-offstyle=""danger"" data-size=""small""
							   data-on=""<i class='fas fa-lock-open'></i>""
							   data-off=""<i class='fa fa-lock'></i>"" disabled />
					</td>
					<td>
						"                        );
                EndContext();
                BeginContext(1774, 349, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c76781d66c674e6fd7a2cd9c3cefe2516bd1660721173", async() => {
                    BeginContext(1814, 45, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t\t<input name=\"sellerId\" type=\"hidden\"");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 1859, "\"", 1884, 1);
#line 43 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                    WriteAttributeValue("", 1867, product.SellerId, 1867, 17, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(1885, 53, true);
                    WriteLiteral(" />\r\n\t\t\t\t\t\t\t<input name=\"productTypeId\" type=\"hidden\"");
                    EndContext();
                    BeginWriteAttribute("value", " value=\"", 1938, "\"", 1968, 1);
#line 44 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                    WriteAttributeValue("", 1946, product.ProductTypeId, 1946, 22, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(1969, 12, true);
                    WriteLiteral(" />\r\n\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(1981, 127, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c76781d66c674e6fd7a2cd9c3cefe2516bd1660722603", async() => {
                    }
                                                                                );
                    __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.EnumSelectListTagHelper>();
                    __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
#line 45 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                    __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.EnumType = typeof(ProductStatus);

#line default
#line hidden
                    __tagHelperExecutionContext.AddTagHelperAttribute("enum-type", __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.EnumType, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 45 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                    __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.Selected = product.Status;

#line default
#line hidden
                    __tagHelperExecutionContext.AddTagHelperAttribute("selected", __ECommerce_UI_AdminSite_Infrastructure_EnumSelectListTagHelper.Selected, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(2108, 8, true);
                    WriteLiteral("\r\n\t\t\t\t\t\t");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 42 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                AddHtmlAttributeValue("", 1788, formAction, 1788, 11, false);

#line default
#line hidden
                EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_7.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2123, 23, true);
                WriteLiteral("\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>");
                EndContext();
                BeginContext(2146, 170, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c76781d66c674e6fd7a2cd9c3cefe2516bd1660726663", async() => {
                    BeginContext(2306, 6, true);
                    WriteLiteral("Detail");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_9.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_9);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_10.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_10);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                WriteLiteral(product.SellerId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                BeginWriteTagHelperAttribute();
#line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
                WriteLiteral(product.ProductTypeId);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2316, 18, true);
                WriteLiteral("</td>\r\n\t\t\t\t</tr>\r\n");
                EndContext();
#line 50 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\ProductsTable.cshtml"
            }

#line default
#line hidden
            BeginContext(2340, 503, true);
            WriteLiteral(@"		</tbody>
	</table>
</div>

<script type=""text/javascript"">
	//change product status

	$('.submitOnChange').change(function () {
		var $form = $(this).closest('form');
		$.ajax({
			url: $form.attr('action'),
			type: $form.attr('method'),
			data: $form.serialize(),
			success: function (result) {
				if (result != '')
					alert(result);
			},
			error: function (result) {
				alert('something went wrong while changing product status:\n' + result);
			}
		});
	});
</script>");
            EndContext();
        }
Пример #23
0
        void Game_OnPlayerGameActionEvent(UserModel user, Enums.ActionPokerType action, decimal actionValue)
        {
            Console.WriteLine("Game_OnPlayerGameActionEvent()");
            //Sprawdzamy czy gracz jest aktywny w tym momencie
            //lub czy w ogole jest mozliwosc podjecia akcji na tym stole
            var table = Game.GameTableModel;

            lock (table.ActionPlayer)
            {
                if (table.ActionPlayer == null ||
                    (
                        table.ActionPlayer != null &&
                        user.ID != table.ActionPlayer.User.ID)
                    )
                {
                    Console.WriteLine("ActinPlayer is null");
                    return;
                }

                if (action == Enums.ActionPokerType.BigBlind || action == Enums.ActionPokerType.SmallBlind)
                {
                    return; //Nie mozna wywołać bigblind, smallblind z poziomu użytkownika
                }

                actionValue = this.ParseBetActionValue(action, actionValue);

                if (ActionPlayerTimer != null)
                {
                    ActionPlayerTimer.Elapsed -= ActionPlayerNoAction;
                    ActionPlayerTimer          = null;
                }

                //Ukrywamy dostępne akcje jako że wykonano akcję betaction
                //Ukrywamy je tylko dla osob ktore wykonaly akcje, jesli zostala wykonana akacja autoamtyczna to znaczy
                //ze gracz otrzymal flage DONTPLAY
                //wiec umozliwiamy mu powrot co zostalo juz wczesniej mu wyslane
                Task.Factory.StartNew(() =>
                {
                    if (table.ActionPlayer != null && table.ActionPlayer.User.IsOnline() && !table.ActionPlayer.Status.HasFlag(PlayerModel.PlayerStatus.DONTPLAY))
                    {
                        var _c = table.ActionPlayer.User.GetClient();
                        _c.OnGameActionOffer(table, new HideOfferAction()
                        {
                            Timestamp = DateTime.Now
                        });
                    }
                });

                BetAction stageAction = new BetAction()
                {
                    Action    = action,
                    Bet       = actionValue,
                    CreatedAt = DateTime.Now,
                    Stage     = table.Stage,
                    Player    = table.ActionPlayer
                };

                table.ActionHistory.Add(stageAction);

                string message;
                string action_str;
                switch (action)
                {
                case Enums.ActionPokerType.Fold:
                    action_str = "pasuje";
                    break;

                case Enums.ActionPokerType.Call:
                    action_str = "sprawdza";
                    break;

                case Enums.ActionPokerType.Raise:
                    action_str = "podbija do " + CurrencyFormat.Get(table.Currency, table.ActionHistory.OfType <BetAction>().Last().Bet);
                    break;

                default:
                    action_str = "--bład--";
                    break;
                }
                message = "Gracz " + table.ActionPlayer.User.Username + " " + action_str + ".";

                Task.Factory.StartNew(() =>
                {
                    Game.SendDealerMessage(message);
                });


                Task.Factory.StartNew(() =>
                {
                    StageLoop();
                });
            }
        }
Пример #24
0
 public static string ToString(this long value, CurrencyFormat format)
 {
     return(ToString((decimal)value, format));
 }
Пример #25
0
        private void InitializeStage()
        {
            Console.WriteLine("InitializeStage()");

            StageGameProcess = new StageProcess(this);
            StageGameProcess.Initialize();

            StageGameProcess.OnStageChangeEvent += (stage) =>
            {
                Console.WriteLine("OnStageChangeEvent()");
                Thread.Sleep(100);
                List <CardModel> cards = new List <CardModel>();
                switch (stage)
                {
                case Enums.Stage.Flop:
                    this.SendDealerMessage("Rozkładam flopa.");
                    cards.Add(Helper.Pop <CardModel>(GameTypeHandler.CardList));
                    cards.Add(Helper.Pop <CardModel>(GameTypeHandler.CardList));
                    cards.Add(Helper.Pop <CardModel>(GameTypeHandler.CardList));
                    break;

                case Enums.Stage.Turn:
                    this.SendDealerMessage("Rozkładam turn.");
                    cards.Add(Helper.Pop <CardModel>(GameTypeHandler.CardList));
                    break;

                case Enums.Stage.River:
                    this.SendDealerMessage("Rozkładam river.");
                    cards.Add(Helper.Pop <CardModel>(GameTypeHandler.CardList));
                    break;
                }

                Console.WriteLine("Rozdanie kart na stole = " + stage.ToString());

                //Zapisuje zebrane karty do pamieci
                GameTableModel.TableCardList = GameTableModel.TableCardList.Concat(cards).ToList();

                //Przekazujemy karty publice
                CardTableAction cardAction = new CardTableAction()
                {
                    CreatedAt = DateTime.Now,
                    Cards     = cards,
                    Stage     = GameTableModel.Stage
                };

                GameTableModel.ActionHistory.Add(cardAction);
                Thread.Sleep(1500);
            };
            StageGameProcess.OnStageProcessFinishEvent += () =>
            {
                Console.WriteLine("OnStageProcessFinishEvent");
                if (GameTableModel.PlayerHavingPlayStatus().Count == 1)
                {
                    //Wygrywa jeden gracz
                    var playerWinner = GameTableModel.PlayerHavingPlayStatus().FirstOrDefault();
                    playerWinner.Stack += GameTableModel.TablePot;
                    var message = "Gracz " + playerWinner.User.Username + " wygrywa główną pulę " + CurrencyFormat.Get(GameTableModel.Currency, GameTableModel.TablePot) + " ponieważ reszta graczy spasowała karty.";
                    Console.WriteLine(message);

                    this.SendDealerMessage(message);

                    GameTableModel.ShowSystemMessage("Wygrywa " + playerWinner.User.Username, message);
                    Thread.Sleep(2000);
                    GameTableModel.HideSystemMessage();
                }
                else
                {
                    //Showdown
                    StageShowdown stageShowdown = new StageShowdown(this);
                    stageShowdown.OnShowdownWinnerEvent += (evaluatorItem) =>
                    {
                        Console.WriteLine("points: " + evaluatorItem.Points + " (kicker points: " + evaluatorItem.KickerPoints + ")");
                    };
                    stageShowdown.ShowdownStart();
                    stageShowdown.ShowdownPotDistribution();
                }

                Thread.Sleep(100);
                GameTableModel.ShowSystemMessage("Zakończenie rozdania", "Nowe rozdanie zostanie rozpoczęte za 4 sekundy");
                Console.WriteLine("Zakończenie gry na stole " + this.GameTableModel.Name);
                Thread.Sleep(3600);
                GameTableModel.HideSystemMessage();

                BaseFinished();

                if (OnGameFinishedEvent != null)
                {
                    OnGameFinishedEvent(this);
                }

                IsFinished = true;
            };
        }
Пример #26
0
        /// <summary>
        /// Rozdzielanie puli według układów
        /// </summary>
        public void ShowdownPotDistribution()
        {
            var gameTable = Game.GameTableModel;

            //Sortujemy od najsilniejszych układów
            var evaluatorGroupedList = Evaluator.EvaluatorStrenghtList.
                                       GroupBy(c => c.FullPoints).
                                       OrderByDescending(e => e.First().FullPoints).ThenBy(e => e.OrderBy(f => f.Contributed)).
                                       ToList();

            //Suma pinieniędzy
            decimal totalPot = gameTable.ActionHistory.OfType <BetAction>().Sum(c => c.Bet);

            //Wszystkie wyniki na jednym poziomie
            var contributionFlatList = gameTable.ActionHistory.OfType <BetAction>().GroupBy(c => c.Player).Select(c => new PlayerContributed
            {
                Player      = c.First().Player,
                Contributed = c.Sum(e => e.Bet)
            }).ToList();

            foreach (var evaluatorItem in evaluatorGroupedList)
            {
                foreach (var evaluatorPlayer in evaluatorItem)
                {
                    decimal winPot = 0;
                    decimal evaluatorPlayerContributed = evaluatorPlayer.Contributed;

                    foreach (var evaluatorContributedPlayer in contributionFlatList)
                    {
                        decimal takenPot = 0;
                        if (evaluatorContributedPlayer.Contributed >= evaluatorPlayerContributed)
                        {
                            takenPot = evaluatorPlayerContributed;
                        }
                        else
                        {
                            takenPot = evaluatorContributedPlayer.Contributed;
                        }

                        evaluatorContributedPlayer.Contributed -= takenPot;
                        winPot += takenPot;
                    }

                    winPot = winPot / (evaluatorItem.Count());

                    if (winPot == 0)
                    {
                        break;
                    }

                    //Infomracja o wygranej puli
                    string message;
                    if (evaluatorPlayer.IsBest == true)
                    {
                        message = "Gracz " + evaluatorPlayer.Player.User.Username + " wygrywa główną pulę " + CurrencyFormat.Get(gameTable.Currency, winPot);
                    }
                    else
                    {
                        message = "Gracz " + evaluatorPlayer.Player.User.Username + " wygrywa boczną pulę " + CurrencyFormat.Get(gameTable.Currency, winPot);
                    }

                    if (evaluatorPlayer.IsKickerWin)
                    {
                        message += " kickerem " + CardModel.GetNormalizeNominal(evaluatorPlayer.KickerCards.FirstOrDefault().Face, CardModel.NormalizeNominalSize.ONE);
                    }

                    OnShowdownWinnerEvent(evaluatorPlayer);

                    TablePotAction tablePotAction = new TablePotAction()
                    {
                        Stage     = Game.GameTableModel.Stage,
                        CreatedAt = DateTime.Now,
                        Player    = evaluatorPlayer.Player,
                        Pot       = winPot
                    };
                    Game.GameTableModel.ActionHistory.Add(tablePotAction);

                    Game.SendDealerMessage(message);
                    Console.WriteLine(message);
                    gameTable.ShowSystemMessage("Wygrana " + evaluatorPlayer.Player.User.Username, message);
                    Thread.Sleep(2000);
                    gameTable.HideSystemMessage();
                }
            }
        }
Пример #27
0
        /// <summary>
        /// Informacje o stole
        /// </summary>
        /// <param name="table"></param>
        public void SetNormalModeNote(NormalGameModel normalMode)
        {
            if (normalMode == null)
            {
                return;
            }
            TablePlayerList.Visibility = Visibility.Visible;

            //Ukrywamy loader
            Loader.Visibility = Visibility.Hidden;

            //Wypisujemy informacje o stole
            EventName.Text   = normalMode.Name;
            EventStatus.Text = "Gra stołowa";
            EventNameID.Text = "ID: #" + (normalMode.ID).ToString().PadLeft(8, '0');

            //PlayerList.ItemsSource = normalMode.Table.PlayersList;
            PlayerList.ItemsSource = null;
            PlayerList.ItemsSource = Session.Data.Client.ServiceProxy.GetTablePlayers(normalMode.Table);

            //Usuwamy click handler
            var routedEventHandlers = Helper.GetRoutedEventHandlers(JoinButton, ButtonBase.ClickEvent);

            if (routedEventHandlers != null)
            {
                foreach (var routedEventHandler in routedEventHandlers)
                {
                    JoinButton.Click -= (RoutedEventHandler)routedEventHandler.Handler;
                }
            }

            //Dajemy zmieniony click handler
            JoinButton.Click += new RoutedEventHandler((object sender, RoutedEventArgs e) => {
                Lobby.OpenGameWindow(normalMode);
            });

            //Parsujemy informacje na temat stolu do listy elementow
            TableSideElementList.ItemsSource = null;
            List <TableSideElement> tableSideElementList = new List <TableSideElement>();

            tableSideElementList.Add(
                new TableSideElement()
            {
                Title       = "Ilość graczy:",
                Description = "Zajęte miejsca/Maksymalna ilość miejsc",
                Value       = normalMode.Table.Players + "/" + normalMode.Table.Seats
            }
                );
            tableSideElementList.Add(
                new TableSideElement()
            {
                Title       = "Średni stack:",
                Description = "Ostatnie 15 rozdań",
                Value       = normalMode.Table.AvgPotCurrency
            }
                );
            tableSideElementList.Add(
                new TableSideElement()
            {
                Title       = "Minimalna kwota:",
                Description = "Minimalna kwota wejścia do gry",
                Value       = CurrencyFormat.Get(normalMode.Currency, normalMode.Minimum)
            }
                );

            TableSideElementList.ItemsSource = tableSideElementList;

            //Jeśli nie ma graczy ukrywamy panel
            if (normalMode.Table.Players == 0)
            {
                NoPlayers.Visibility = Visibility.Visible;
            }
            else
            {
                NoPlayers.Visibility = Visibility.Hidden;
            }
        }
Пример #28
0
 public static extern int GetCurrencyFormat(uint Locale, uint dwFlags, string lpValue, CurrencyFormat lpFormat, IntPtr lpCurrencyStr, int cchCurrency);
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(20, 2, true);
            WriteLiteral("\r\n");
            EndContext();
#line 3 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            ECommerceService eCommerce = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService];

#line default
#line hidden
            BeginContext(119, 271, true);
            WriteLiteral(@"<div class=""container"">
	<div class=""card productDetailCard"">
		<div class=""container-fliud"">
			<div class=""wrapper row"">
				<div class=""preview col-md-6"">
					<div id=""galleryResult"" class=""preview-pic tab-content"">
						<div class=""galleryThumbnail"">
							"                            );
            EndContext();
            BeginContext(390, 65, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "6a909afef7e73aa8c36f2ab68dec039b16c38fbe9627", async() => {
            }
                                                                        );
            __ECommerce_UI_MVC_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.MVC.Infrastructure.ImageTagHelper>();
            __tagHelperExecutionContext.Add(__ECommerce_UI_MVC_Infrastructure_ImageTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 11 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent = Model.RepresentativeImage;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(455, 203, true);
            WriteLiteral("\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div id=\"carouselExampleControls\" class=\"preview-thumbnail nav nav-tabs carousel slide\" data-ride=\"carousel\" data-interval=\"false\">\r\n\t\t\t\t\t\t<div class=\"carousel-inner\">\r\n");
            EndContext();
#line 16 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"

            IList <FileContent> images = eCommerce.GetProductImages(int.Parse(Model.SellerId), int.Parse(Model.ProductTypeId)).ToList();
            short      count           = 1;
            TagBuilder container       = new TagBuilder("div");
            TagBuilder carouselItem    = new TagBuilder("div");
            carouselItem.AddCssClass("carousel-item active");
            container.InnerHtml.AppendHtml(carouselItem);
            foreach (FileContent image in images)
            {
                carouselItem.InnerHtml
                .AppendHtml($"<div class=\"galleryThumbnail\"><img src=\"{image.EncodeInBase64()}\" /></div>");
                if (count++ == 5)
                {
                    carouselItem = new TagBuilder("div");
                    carouselItem.AddCssClass("carousel-item active");
                    container.InnerHtml.AppendHtml(carouselItem);
                    count = 1;
                }
            }


#line default
#line hidden
            BeginContext(1515, 7, true);
            WriteLiteral("\t\t\t\t\t\t\t");
            EndContext();
            BeginContext(1523, 19, false);
#line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            Write(container.InnerHtml);

#line default
#line hidden
            EndContext();
            BeginContext(1542, 560, true);
            WriteLiteral(@"
						</div>
						<a class=""carousel-control-prev"" href=""#carouselExampleControls"" role=""button"" data-slide=""prev"">
							<span class=""carousel-control-prev-icon"" aria-hidden=""true""></span>
							<span class=""sr-only"">Previous</span>
						</a>
						<a class=""carousel-control-next"" href=""#carouselExampleControls"" role=""button"" data-slide=""next"">
							<span class=""carousel-control-next-icon"" aria-hidden=""true""></span>
							<span class=""sr-only"">Next</span>
						</a>
					</div>
				</div>
				<div class=""details col-md-6"">
					<h3>"                    );
            EndContext();
            BeginContext(2102, 166, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "6a909afef7e73aa8c36f2ab68dec039b16c38fbe13542", async() => {
                BeginContext(2243, 21, false);
#line 49 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                Write(Model.ProductTypeName);

#line default
#line hidden
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
            {
                throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-productTypeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
            }
            BeginWriteTagHelperAttribute();
#line 49 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            WriteLiteral(Model.ProductTypeId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(2268, 570, true);
            WriteLiteral(@"</h3>
					<div>
						<div>
							<span class=""fa fa-star checked""></span>
							<span class=""fa fa-star checked""></span>
							<span class=""fa fa-star checked""></span>
							<span class=""fa fa-star""></span>
							<span class=""fa fa-star""></span>
						</div>
						<span>41 reviews</span>
					</div>
					<p>Suspendisse quos? Tempus cras iure temporibus? Eu laudantium cubilia sem sem! Repudiandae et! Massa senectus enim minim sociosqu delectus posuere.</p>
					<h4 class=""font-weight-bold text-uppercase"">current price: <span class=""text-warning"">"                    );
            EndContext();
            BeginContext(2839, 42, false);
#line 61 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            Write(CurrencyFormat.FormatWithUnit(Model.Price));

#line default
#line hidden
            EndContext();
            BeginContext(2881, 71, true);
            WriteLiteral("</span></h4>\r\n\t\t\t\t\t<h4 class=\"font-weight-bold text-uppercase\">SELLER: ");
            EndContext();
            BeginContext(2952, 127, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "6a909afef7e73aa8c36f2ab68dec039b16c38fbe17716", async() => {
                BeginContext(3059, 16, false);
#line 62 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                Write(Model.SellerName);

#line default
#line hidden
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_5.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
            {
                throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
            }
            BeginWriteTagHelperAttribute();
#line 62 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
            WriteLiteral(Model.SellerId);

#line default
#line hidden
            __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer;
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(3079, 119, true);
            WriteLiteral("</h4>\r\n\t\t\t\t\t<p class=\"vote\"><strong>91%</strong> of buyers enjoyed this product! <strong>(87 votes)</strong></p>\r\n\t\t\t\t\t");
            EndContext();
            BeginContext(3198, 1044, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "6a909afef7e73aa8c36f2ab68dec039b16c38fbe20935", async() => {
                BeginContext(3289, 2, true);
                WriteLiteral("\r\n");
                EndContext();
#line 65 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                foreach (var attribute in Model.Attributes)
                {
#line default
#line hidden
                    BeginContext(3352, 61, true);
                    WriteLiteral("\t\t\t\t\t\t\t<h5 class=\"font-weight-bold text-uppercase\">\r\n\t\t\t\t\t\t\t\t");
                    EndContext();
                    BeginContext(3414, 13, false);
#line 68 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                    Write(attribute.Key);

#line default
#line hidden
                    EndContext();
                    BeginContext(3427, 3, true);
                    WriteLiteral(":\r\n");
                    EndContext();
#line 69 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                    foreach (var value in attribute.Value)
                    {
#line default
#line hidden
                        BeginContext(3490, 86, true);
                        WriteLiteral("\t\t\t\t\t\t\t\t\t<label class=\"radio-inline text-info\">\r\n\t\t\t\t\t\t\t\t\t\t<input checked type=\"radio\"");
                        EndContext();
                        BeginWriteAttribute("name", " name=\"", 3576, "\"", 3609, 3);
                        WriteAttributeValue("", 3583, "attributes[", 3583, 11, true);
#line 72 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                        WriteAttributeValue("", 3594, attribute.Key, 3594, 14, false);

#line default
#line hidden
                        WriteAttributeValue("", 3608, "]", 3608, 1, true);
                        EndWriteAttribute();
                        BeginWriteAttribute("value", " value=\"", 3610, "\"", 3624, 1);
#line 72 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                        WriteAttributeValue("", 3618, value, 3618, 6, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(3625, 4, true);
                        WriteLiteral(" /> ");
                        EndContext();
                        BeginContext(3630, 5, false);
#line 72 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                        Write(value);

#line default
#line hidden
                        EndContext();
                        BeginContext(3635, 21, true);
                        WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</label>\r\n");
                        EndContext();
#line 74 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                    }

#line default
#line hidden
                    BeginContext(3667, 14, true);
                    WriteLiteral("\t\t\t\t\t\t\t</h5>\r\n");
                    EndContext();
#line 76 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                }

#line default
#line hidden
                BeginContext(3690, 223, true);
                WriteLiteral("\t\t\t\t\t\t<div class=\"form-row\">\r\n\t\t\t\t\t\t\t<div class=\"form-group col-md-3\">\r\n\t\t\t\t\t\t\t\t<input class=\"form-control\" type=\"number\" name=\"quantity\" value=\"1\" />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"sellerId\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 3913, "\"", 3936, 1);
#line 82 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                WriteAttributeValue("", 3921, Model.SellerId, 3921, 15, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(3937, 52, true);
                WriteLiteral(" />\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"productTypeId\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 3989, "\"", 4017, 1);
#line 83 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\DisplayTemplates\ProductDetail.cshtml"
                WriteAttributeValue("", 3997, Model.ProductTypeId, 3997, 20, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(4018, 217, true);
                WriteLiteral(" />\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<input class=\"btn btn-lg btn-success\" type=\"submit\" value=\"Add to Cart\" />\r\n\t\t\t\t\t\t\t<button class=\"btn btn-lg btn-danger\" type=\"button\"><i class=\"fa fa-heart\"></i></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_6.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Controller = (string)__tagHelperAttribute_7.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_8.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_8);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_9);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(4242, 877, true);
            WriteLiteral(@"
				</div>
			</div>
		</div>
	</div>
</div>

<script type=""text/javascript"">

	//small cart updating
	function updateSmallCart() {
		$.ajax({
			url: $('#cartTotalQuantityUrl').val(),
			type: 'get',
			success: function (result) {
				$('#cartQuantity').html(result);
			}
		});
	}

	$('.addToCartOnSubmit').submit(
		function (event) {
			// Stop form from submitting normally
			event.preventDefault();
			var $form = $(this);
			$.ajax({
				url: $form.attr('action'),
				type: $form.attr('method'),
				data: $form.serialize(),
				success: function () {
					updateSmallCart();
				},
				error: function (result) {
					alert('something went wrong while adding to cart:\n' + result);
				}
			});
		});

	//product detail

	$('.galleryThumbnail').click(function(){
		$('#galleryResult').html($(this).clone());
	});
</script>");
            EndContext();
        }