Esempio n. 1
0
 //TipoServico
 public void NovaVersaoParaExclusao(Lancamento lancamento, bool Atualizar = false)
 {
     (new Execute()).Sistema.Versao.CriarNovaVersao(new DOMINIO.Model.Sistema.Versao()
     {
         VersaoId   = Guid.NewGuid(),
         Momento    = DateTime.Now,
         Operacao   = "D",
         Entidade   = lancamento.GetType().Name,
         EnitdadeId = lancamento.TipoServicoId.ToString(),
         Promotor   = lancamento.AlteradoPor,
         Dados      = JsonConvert.SerializeObject(lancamento)
     });
 }
 protected void grdLancamento_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         System.Drawing.Image img;
         Lancamento           l = (Lancamento)e.Row.DataItem;
         if (l.GetType().Name.Equals("LancamentoCredito"))
         {
             img             = System.Drawing.Image.FromStream(((LancamentoCredito)l).comprovanteCredito);
             Session["comp"] = ((LancamentoCredito)l).comprovanteCredito;
         }
         else
         {
             Session["comp"] = ((LancamentoDebito)l).comprovantePagamento;
             img             = System.Drawing.Image.FromStream(((LancamentoDebito)l).comprovantePagamento);
         }
         string name = "comp" + img.GetHashCode().ToString();
         //Session["comp"] = img;
         e.Row.Cells[0].Text = "<a href='ExibirComprovante.aspx?comp=" + name + "'>comprovante</a>";
     }
 }
Esempio n. 3
0
 protected void grdLancamento_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         System.Drawing.Image img;
         Lancamento           l = (Lancamento)e.Row.DataItem;
         img = l.Comprovante;
         if (img == null)
         {
             e.Row.Cells[0].Text = "sem comprovante";
         }
         else
         {
             e.Row.Cells[0].Text = "<a href='ExibirComprovante.aspx?Id=" + l.Id + "&tipo=" + l.GetType().ToString() + "' target='_blank'>Exibir Comprovante</a>";
         }
         e.Row.Cells[3].Text = l.valor.ToString();
     }
 }