public string EmitirNF(string file, TipoAmbiente tpAmb, bool cancelamento = false) { string result = ""; using (POSTRequest post = new POSTRequest { Proxy = Proxy }) { // informe 1 para retorno em xml result = post.PostForm("http://sync.nfs-e.net/datacenter/include/nfw/importa_nfw/nfw_import_upload.php?eletron=1", new Dictionary <string, string> { { "login", Usuario }, //CPF/CNPJ, sem separadores} { "senha", Senha }, //Senha de acesso ao sistema: www.nfse. { "cidade", Cidade.ToString() }, //Código da cidade na receita federal (TOM), pesquisei o código em http://www.ekwbrasil.com.br/municipio.php3. { "f1", file } //Endereço físico do arquivo }); } if (!cancelamento) { GerarRetorno(file, result, Propriedade.Extensao(Propriedade.TipoEnvio.EnvLoteRps).EnvioXML, Propriedade.Extensao(Propriedade.TipoEnvio.EnvLoteRps).RetornoXML); } else { GerarRetorno(file, result, Propriedade.Extensao(Propriedade.TipoEnvio.PedCanNFSe).EnvioXML, Propriedade.Extensao(Propriedade.TipoEnvio.PedCanNFSe).RetornoXML); } return(result); }
public string EmitirNF(string file, TipoAmbiente tpAmb, bool cancelamento = false) { string result = ""; using(POSTRequest post = new POSTRequest { Proxy = Proxy }) { // informe 1 para retorno em xml result = post.PostForm("http://sync.nfs-e.net/datacenter/include/nfw/importa_nfw/nfw_import_upload.php?eletron=1", new Dictionary<string, string> { {"login", Usuario }, //CPF/CNPJ, sem separadores} {"senha", Senha}, //Senha de acesso ao sistema: www.nfse. {"cidade", Cidade.ToString()}, //Código da cidade na receita federal (TOM), pesquisei o código em http://www.ekwbrasil.com.br/municipio.php3. {"f1", file} //Endereço físico do arquivo }); } if(!cancelamento) GerarRetorno(file, result, Propriedade.ExtEnvio.EnvLoteRps, Propriedade.ExtRetorno.RetLoteRps); else GerarRetorno(file, result, Propriedade.ExtEnvio.EnvCancelamento_XML, Propriedade.ExtRetorno.CanNfse); return result; }
private string EnviaXML(string file) { string result = ""; using (POSTRequest post = new POSTRequest { Proxy = Proxy }) { // informe 1 para retorno em xml result = post.PostForm("http://sync.nfs-e.net/datacenter/include/nfw/importa_nfw/nfw_import_upload.php?eletron=1", new Dictionary <string, string> { { "login", Usuario }, //CPF/CNPJ, sem separadores} { "senha", Senha }, //Senha de acesso ao sistema: www.nfse. { "cidade", Cidade.ToString() }, //Código da cidade na receita federal (TOM), pesquisei o código em http://www.ekwbrasil.com.br/municipio.php3. { "f1", file } //Endereço físico do arquivo }); } return(result); }