public static decimal LerEncerranteBico(string TP_Concentrator, string bico, string TP_Leitura) { if (TP_Concentrator.Trim().ToUpper().Equals("CT") || TP_Concentrator.Trim().ToUpper().Equals("ZT")) { return(TCompanytec.LerEncerranteBico(bico, TP_Leitura)); } else if (TP_Concentrator.Trim().ToUpper().Equals("VW")) { string encerrante = new string('\x20', 23); TVWTech.LerEncerrantes(Convert.ToInt32(bico), ref encerrante); if (!string.IsNullOrEmpty(encerrante.SoNumero())) { if (TP_Leitura.Trim().ToUpper().Equals("L")) { return(decimal.Divide(decimal.Parse(encerrante.SoNumero().Substring(2, 8)), 100)); } else { return(decimal.Divide(decimal.Parse(encerrante.SoNumero().Substring(10, 8)), 100)); } } else { return(decimal.Zero); } } else { return(decimal.Zero); } }