public void PegaParametros(String pXml) { // Conexao Conn = new Conexao(pXml); String Qry = "EXEC GN_PEGACREPAR "; DS = new DataSet(); SqlCommand Command = new SqlCommand(Qry, DM.ConexaoSessao); SqlDataAdapter DA = new SqlDataAdapter(); DA.TableMappings.Add("Table", "parametros"); DA.SelectCommand = Command; DA.Fill(DS); DataTable DT; DT = DS.Tables["parametros"]; DataRow DR = DT.Rows[0]; taxas = Convert.ToString(DR["taxas"]); grupo1 = Convert.ToString(DR["grupo1"]); grupo2 = Convert.ToString(DR["grupo2"]); grupo3 = Convert.ToString(DR["grupo3"]); grupo4 = Convert.ToString(DR["grupo4"]); bgrupo1 = Convert.ToBoolean(DR["grupo1"]); bgrupo2 = Convert.ToBoolean(DR["grupo2"]); bgrupo3 = Convert.ToBoolean(DR["grupo3"]); bgrupo4 = Convert.ToBoolean(DR["grupo4"]); refat = Convert.ToString(DR["refat"]); dispav = Convert.ToString(DR["dispav"]); nmeses = Convert.ToString(DR["nmeses"]); criacobsimples = Convert.ToBoolean(DR["ckcobsimples"]); ckregra = Convert.ToBoolean(DR["repauto"]); ckliq = Convert.ToBoolean(DR["ckliq"]); tolerc = Convert.ToString(DR["tolerc"]); tolerd = Convert.ToString(DR["tolerd"]); v1 = Convert.ToString(DR["v1"]); v2 = Convert.ToString(DR["v2"]); v3 = Convert.ToString(DR["v3"]); v4 = Convert.ToString(DR["v4"]); v5 = Convert.ToString(DR["v5"]); v6 = Convert.ToString(DR["v6"]); v7 = Convert.ToString(DR["v7"]); v8 = Convert.ToString(DR["v8"]); v9 = Convert.ToString(DR["v9"]); lv1 = "De " + Srelib.strzero2(v1.Trim(), 3) + " A " + Srelib.strzero2(v2.Trim(), 3) + " dias"; lv2 = "De " + Srelib.strzero2(v3.Trim(), 3) + " A " + Srelib.strzero2(v4.Trim(), 3) + " dias"; lv3 = "De " + Srelib.strzero2(v5.Trim(), 3) + " A " + Srelib.strzero2(v6.Trim(), 3) + " dias"; lv4 = "De " + Srelib.strzero2(v7.Trim(), 3) + " A " + Srelib.strzero2(v8.Trim(), 3) + " dias"; lv5 = "De " + Srelib.strzero2(v9.Trim(), 3) + " em diante "; a1 = Convert.ToString(DR["a1"]); a2 = Convert.ToString(DR["a2"]); a3 = Convert.ToString(DR["a3"]); a4 = Convert.ToString(DR["a4"]); a5 = Convert.ToString(DR["a5"]); a6 = Convert.ToString(DR["a6"]); a7 = Convert.ToString(DR["a7"]); a8 = Convert.ToString(DR["a8"]); a9 = Convert.ToString(DR["a9"]); ndvenc = Convert.ToString(DR["ndvenc"]); la1 = "De " + Srelib.strzero2(a1.Trim(), 3) + " A " + Srelib.strzero2(a2.Trim(), 3) + " dias"; la2 = "De " + Srelib.strzero2(a3.Trim(), 3) + " A " + Srelib.strzero2(a4.Trim(), 3) + " dias"; la3 = "De " + Srelib.strzero2(a5.Trim(), 3) + " A " + Srelib.strzero2(a6.Trim(), 3) + " dias"; la4 = "De " + Srelib.strzero2(a7.Trim(), 3) + " A " + Srelib.strzero2(a8.Trim(), 3) + " dias"; la5 = "De " + Srelib.strzero2(a9.Trim(), 3) + " em diante "; if (grupo1 == "True") { grupo1 = "1"; } else { grupo1 = "0"; } if (grupo2 == "True") { grupo2 = "2"; } else { grupo2 = "0"; } if (grupo3 == "True") { grupo3 = "3"; } else { grupo3 = "0"; } if (grupo4 == "True") { grupo4 = "4"; } else { grupo4 = "0"; } ckr1 = Convert.ToBoolean(DR["ckr1"]); ckr2 = Convert.ToBoolean(DR["ckr2"]); ckr3 = Convert.ToBoolean(DR["ckr3"]); ckr4 = Convert.ToBoolean(DR["ckr4"]); ckr5 = Convert.ToBoolean(DR["ckr5"]); ckr6 = Convert.ToBoolean(DR["ckr6"]); ckr7 = Convert.ToBoolean(DR["ckr7"]); ckdepende = Convert.ToBoolean(DR["ckdepende"]); acao1 = Convert.ToString(DR["acao1"]); acao2 = Convert.ToString(DR["acao2"]); acao3 = Convert.ToString(DR["acao3"]); acao4 = Convert.ToString(DR["acao4"]); acao5 = Convert.ToString(DR["acao5"]); acao6 = Convert.ToString(DR["acao6"]); acao7 = Convert.ToString(DR["acao7"]); acao8 = Convert.ToString(DR["acao8"]); acao9 = Convert.ToString(DR["acao9"]); acao10 = Convert.ToString(DR["acao10"]); acao11 = Convert.ToString(DR["acao11"]); acao12 = Convert.ToString(DR["acao12"]); acao13 = Convert.ToString(DR["acao13"]); acao14 = Convert.ToString(DR["acao14"]); acao15 = Convert.ToString(DR["acao15"]); acao16 = Convert.ToString(DR["acao16"]); acao17 = Convert.ToString(DR["acao17"]); acao18 = Convert.ToString(DR["acao18"]); acao19 = Convert.ToString(DR["acao19"]); acao20 = Convert.ToString(DR["acao20"]); acao21 = Convert.ToString(DR["acao21"]); acao22 = Convert.ToString(DR["acao22"]); acao23 = Convert.ToString(DR["acao23"]); acao24 = Convert.ToString(DR["acao24"]); acao25 = Convert.ToString(DR["acao25"]); op = Convert.ToString(DR["op"]).Trim(); // Conn.SqlConn.Close(); DS.Dispose(); }