1
It is possible to increase the size of a string in the code?
string sIdentComanda = "";
if (objComandaParametro.ComandaParametros[0].IsControlaNrComanda)
{
sIdentComanda += " Comanda: " + nrComanda;
}
if (objComandaParametro.ComandaParametros[0].IsUtilizaNrMesa)
{
sIdentComanda += " Mesa: " + nrMesa ;
}
I need to increase the nrMesa
to highlight the page. It is possible.
This is the datalist
which is completed to be displayed on the screen.
<asp:UpdatePanel ID="upListaVendas" runat="server" class="row">
<ContentTemplate>
<asp:DataList ID="DataList1" runat="server" DataKeyField="IdItem" DataSourceID="sdsItensPendentes"
OnSelectedIndexChanged="DataList1_SelectedIndexChanged" OnItemDataBound="DataList1_ItemDataBound"
CellPadding="0" RepeatLayout="Flow" RepeatDirection="Horizontal"
GridLines="None">
<ItemTemplate>
<div class="col-lg-3 col-sm-6 col-nested">
<asp:LinkButton ID="btnFinalizaPreparo" runat="server" CommandName="select" CssClass="text-uppercase rounded-box">
<span class="clearfix">
<span class="pull-left text-success"><strong>Qtde.:</strong> {0}</span>
<span class="pull-right">{1}</span>
<span class="pull-right">{2}</span></br></br>
</span>
<hr />
<span class="clearfix text-justify">
<strong>Item:</strong>
{3} - {4}
</span>
<hr />
<span class="clearfix text-justify">
{5}
</span>
</asp:LinkButton>
</div>
</ItemTemplate>
</asp:DataList>
And this is the way that the datalist
is loaded.
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.SelectedItem)
{
LinkButton btnFinalizaPreparo = (LinkButton)e.Item.FindControl("btnFinalizaPreparo");
DataRowView drv = (DataRowView)e.Item.DataItem;
string qtde = Convert.ToString(drv.Row["Qtde"]);
string nrMesa = String.IsNullOrEmpty(Convert.ToString(drv.Row["NrMesa"])) ? "--" : Convert.ToString(drv.Row["NrMesa"]);
string nrComanda = String.IsNullOrEmpty(Convert.ToString(drv.Row["NrComanda"])) ? "--" : Convert.ToString(drv.Row["NrComanda"]);
string Apelido = String.IsNullOrEmpty(Convert.ToString(drv.Row["Apelido"])) ? "--" : Convert.ToString(drv.Row["Apelido"]);
string dtSolicitacao = String.IsNullOrEmpty(Convert.ToString(drv.Row["dtSolicitacao"])) ? "--" : Convert.ToString(drv.Row["dtSolicitacao"]);
string idProduto = Convert.ToString(drv.Row["IdProduto"]);
string nomeProduto = Convert.ToString(drv.Row["NomeProduto"]);
string complemento = Convert.ToString(drv.Row["Complemento"]);
string sIdentComanda = "";
if (objComandaParametro.ComandaParametros[0].IsControlaNrComanda)
{
sIdentComanda += " Comanda: " + nrComanda;
}
if (objComandaParametro.ComandaParametros[0].IsUtilizaNrMesa)
{
sIdentComanda += " Mesa: " + nrMesa ;
}
string IdentNomeHorario = "";
IdentNomeHorario += "Nome: " + Apelido;
if (dtSolicitacao != "--")
IdentNomeHorario += " " + String.Format("{0:HH:MM:ss}", DateTime.Parse(dtSolicitacao));
btnFinalizaPreparo.Text = String.Format(btnFinalizaPreparo.Text, qtde, sIdentComanda , IdentNomeHorario, idProduto, nomeProduto, complemento);
}
}
you want to increase the font size? or you want to concatenate a string with another?
– Dorathoto
Increase and then concatenate.
– krispim
This is in the controller or in the view? And as it increases for you is the font size, your answer is ambiguous.
– Maniero
In the aspx.Cs file
– krispim
The question is unclear and ambiguous, not to mention the mistakes of Portuguese.
– lgomide