The method or operation is not implemented C #

0

I can not identify the reason for this error, and I made other developments with this logic and it worked.

  

The method or operation is not implemented.

Follow the code below:

Method that starts values:

 private void linkLblStatus_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                Pedido objPedido = new Pedido();
                RetornoSefaz objRetorno = new RetornoSefaz();
                objPedido.PedEmpresa = Metodos.empresa;
                objPedido.PedNumero = txtNumPedido.Text;
                if (objPedido.ConsultarNFPedido(Metodos.empresa, objPedido.PedNumero) > 0)
                {
                    if (objPedido.pedNFStatus == "Rejeitada" || objPedido.pedNFStatus == "Autorizada")
                    {
                        objRetorno.NFEmpresa = objPedido.PedEmpresa;
                        objRetorno.NFNumero = objPedido.pedNFNumero;
                        objRetorno.NFSerie = objPedido.pedNFSerie;
                        objRetorno.NFCliente = txtCodigo.Text;
                        objRetorno.NFTipo = objPedido.pedNFTipo;
                        List<RetornoSefaz> ListaRetorno = objRetorno.ListarRetornoSefaz();
                        if (ListaRetorno.Count > 0)
                        {
                            FrmStatusNF frmStatus = new FrmStatusNF(ListaRetorno);
                            frmStatus.ShowDialog();
                        }
                    }

                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }

ResumeListSet where it is causing the error:

The error happens on the line: DataTable dt = SqlDAO.ConsultarSQL(strSql, listaParam.ToArray());

public List<RetornoSefaz> ListarRetornoSefaz()
        {
            try
            {
                List<SqlParameter> listaParam = new List<SqlParameter>();
               StringBuilder strSql = new StringBuilder();
                strSql.Append("SELECT * FROM VincoRetornoSefaz WHERE 1=1");

                if (!string.IsNullOrEmpty(NFEmpresa))
                {
                    strSql.Append(" AND NFEmpresa = @NFEmpresa ");
                    listaParam.Add(new SqlParameter("@NFEmpresa", NFEmpresa));
                }
                if (!string.IsNullOrEmpty(NFNumero))
                {
                    strSql.Append(" AND NFNumero = @NFNumero ");
                    listaParam.Add(new SqlParameter("@NFNumero", NFNumero));
                }
                  if (!string.IsNullOrEmpty(NFSerie))
                {
                    strSql.Append(" AND NFSerie =  @NFSerie");
                    listaParam.Add(new SqlParameter("@NFSerie", NFSerie));
                }
                if (!string.IsNullOrEmpty(NFCliente))
                {
                    strSql.Append(" AND NFCliente =  @NFCliente ");
                    listaParam.Add(new SqlParameter("@NFCliente", NFCliente));
                }
                if (!string.IsNullOrEmpty(NFTipo))
                {
                    strSql.Append(" AND NFTipo =  @NFTipo ");
                    listaParam.Add(new SqlParameter("@NFTipo", NFTipo));
                }
                strSql.Append(" ORDER BY NFINDENT DESC ");

                DataTable dt = SqlDAO.ConsultarSQL(strSql, listaParam.ToArray());
                return dt.ToList<RetornoSefaz>();

            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
    }
    
asked by anonymous 04.01.2018 / 13:32

1 answer

3

Normally this error occurs when you use Visual Studio to create members of an interface that has been added to a class you created, take a look at the class of this SqlDAO , I'm pretty sure it will find the ConsultarSQL with a throw NotImplementedException in it.

For more information about this exception: NotImplementedException

    
04.01.2018 / 20:41