private void carregaListaLances() { List <testeRodrigo_LANCES> lLances = new List <testeRodrigo_LANCES>(); lLances = realizaLanceBusiness.getAllLANCES(); string lances = ""; foreach (var item in lLances) { testeRodrigo_PRODUTO p = new testeRodrigo_PRODUTO(); p = cadastraProdutoBusiness.getProdutoByCodigo(Convert.ToInt32(item.ID_PRODUTO)); testeRodrigo_USUARIO u = new testeRodrigo_USUARIO(); u = cadastraUsuarioBusiness.getUsuarioByCodigo(Convert.ToInt32(item.ID_USUARIO)); string tbdoyLance = "<tr> " + " <td>{0}</td> " + " <td>{1}</td> " + " <td>{2}</td> " + " <td>R$ {3}</td> " + " <td>{4}</td> " + " </tr> "; lances += string.Format(tbdoyLance, p.DS_NOME_PRODUTO, p.DS_PRODUTO, u.DS_NOME_USUARIO, item.VL_LANCE_ATUAL, Convert.ToDateTime(item.DT_LANCE.ToString()).ToShortDateString()); } listLances.Text = lances; }
protected void cbxProdutos_SelectedIndexChanged(object sender, EventArgs e) { var ultimoLance = realizaLanceBusiness.getLanceAnterior(Convert.ToInt32(cbxProdutos.SelectedItem.Value)); if (ultimoLance != null) { txtUltimoLance2.Text = "R$ " + realizaLanceBusiness.getLanceAnterior(Convert.ToInt32(cbxProdutos.SelectedItem.Value)).VL_LANCE_ANTERIOR.ToString(); } else { txtUltimoLance2.Text = "R$ " + cadastraProdutoBusiness.getProdutoByCodigo(Convert.ToInt32(cbxProdutos.SelectedItem.Value)).VL_LANCE_INICIAL.ToString(); } }