public static DataSet PegaDadosReceitasID(Int32 xID) { string script; if ((SreDblib.GetParametro("ORDEM RECEITA") != "CODIGO") && (SreDblib.GetParametro("ORDEM RECEITA") != "CÓDIGO")) { if (xID == 0) { script = "SELECT * FROM classe_receitas WITH(NOLOCK) order by descricao"; } else { script = "SELECT * FROM classe_receitas WITH(NOLOCK) WHERE id = " + Convert.ToString(xID) + " order by descricao"; } } else { if (xID == 0) { script = "SELECT * FROM classe_receitas WITH(NOLOCK) order by codigo"; } else { script = "SELECT * FROM classe_receitas WITH(NOLOCK) WHERE id = " + Convert.ToString(xID) + " order by codigo"; } } return(SreDblib.GetDsScript(script)); }
public static String Grava(string xcodigo, string xcod_banco, string xcod_agencia, string xcod_conta, string xnome_agencia, string xcidade, string xuf, string xcep, string xlimite_cheque, string xconta_contabil, string xcomplemento, string xcombo) { if (xcod_banco != String.Empty) { string script = "INSERT INTO CONTAS VALUES ( " + Srelib.QStr(xcodigo) + ", " + Srelib.QStr(xcod_banco) + ", " + Srelib.QStr(xcod_agencia) + ", " + Srelib.QStr(xcod_conta) + ", " + Srelib.QStr(xnome_agencia) + ", " + Srelib.QStr(xcidade) + ", " + Srelib.QStr(xuf) + ", " + Srelib.QStr(xcep) + ", " + Srelib.forcaponto(xlimite_cheque) + ", " + Srelib.QStr(xconta_contabil) + ", " + Srelib.QStr(xcomplemento) + ", " + xcombo + " ) "; SreDblib.ExecScript(script); } return(" "); }
public static String PegaMensagens(string xID, ref string msg1, ref string msg2, ref string msg3, ref string msg4, ref string msg5) { DataSet ds; string script = "select * from boleto_mensagens " + " with(nolock) " + " where codigo = " + xID; string retorno = ""; ds = SreDblib.GetDsScript(script); try { msg1 = ds.Tables[0].Rows[0]["linha1"].ToString().Trim() + Srelib.replicate(" ", 80); msg2 = ds.Tables[0].Rows[0]["linha2"].ToString().Trim() + Srelib.replicate(" ", 80); msg3 = ds.Tables[0].Rows[0]["linha3"].ToString().Trim() + Srelib.replicate(" ", 80); msg4 = ds.Tables[0].Rows[0]["linha4"].ToString().Trim() + Srelib.replicate(" ", 80); msg5 = ds.Tables[0].Rows[0]["linha5"].ToString().Trim() + Srelib.replicate(" ", 80); } catch (Exception) { retorno = ""; } return(retorno); }
public static String AlteraContaSaldoInicial(string xID, string xcod_conta, string xdata, string xdescricao, string xcomplemento, string xsaldo_i, string xsaldo_aplicacaoD, string xsaldo_aplicacaoB, string xdtregistro) { string script = "UPDATE CONTAS_SALDO_INICIAL SET " + " cod_conta = " + Srelib.QStr(xcod_conta) + " ,data = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata)) + " ,descricao = " + Srelib.QStr(xdescricao) + " ,complemento = " + Srelib.QStr(xcomplemento) + " ,saldo_i = " + Srelib.forcaponto(xsaldo_i) + " ,saldo_aplicacaoD = " + Srelib.forcaponto(xsaldo_aplicacaoD) + " ,saldo_aplicacaoB = " + Srelib.forcaponto(xsaldo_aplicacaoB) + " ,dtregistro = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtregistro)) + " where ID =" + xID; //revisar quando mexer na cobrança bancária SreDblib.ExecScript(script); return(" "); }
public static String PegaContaDescricao(string xcodigo_conta) { DataSet ds; string script = "select id, cod_banco,cod_agencia,cod_conta,nome_agencia from CONTAS " + " with(nolock) " + " where ID = " + xcodigo_conta + " order by id "; string retorno = ""; ds = SreDblib.GetDsScript(script); try { retorno = ds.Tables[0].Rows[0]["ID"].ToString().Trim() + " - " + ds.Tables[0].Rows[0]["cod_banco"].ToString().Trim() + " - " + ds.Tables[0].Rows[0]["cod_agencia"].ToString().Trim() + " - " + ds.Tables[0].Rows[0]["cod_conta"].ToString().Trim() + " - " + ds.Tables[0].Rows[0]["nome_agencia"].ToString().Trim(); } catch (Exception) { retorno = "0"; } return(retorno); }
public static DataSet PegaDadosClientesID(string xID) { string script; if ((SreDblib.GetParametro("ORDEM CLIENTE") != "CODIGO") && (SreDblib.GetParametro("ORDEM CLIENTE") != "CÓDIGO")) { if ((xID == "0") || (xID == string.Empty)) { script = "SELECT * FROM clientes WITH(NOLOCK) order by Apelido"; } else { script = "SELECT * FROM clientes WITH(NOLOCK) WHERE codigo in (" + xID + ") order by Apelido"; } } else { if ((xID == "0") || (xID == string.Empty)) { script = "SELECT * FROM clientes WITH(NOLOCK) order by CODIGO"; } else { script = "SELECT * FROM clientes WITH(NOLOCK) WHERE codigo in (" + xID + ") order by CODIGO"; } } return(SreDblib.GetDsScript(script)); }
public static DataSet PegaDadosDespesasID(string xID) { string script; if ((SreDblib.GetParametro("ORDEM DESPESA") != "CODIGO") && (SreDblib.GetParametro("ORDEM DESPESA") != "CÓDIGO")) { if ((xID == "0") || (xID == string.Empty)) { script = "SELECT * FROM classe_despesas WITH(NOLOCK) order by descricao"; } else { script = "SELECT * FROM classe_despesas WITH(NOLOCK) WHERE id in (" + Convert.ToString(xID) + ") order by descricao"; } } else { if ((xID == "0") || (xID == string.Empty)) { script = "SELECT * FROM classe_despesas WITH(NOLOCK) order by codigo"; } else { script = "SELECT * FROM classe_despesas WITH(NOLOCK) WHERE id in (" + Convert.ToString(xID) + ") order by codigo"; } } return SreDblib.GetDsScript(script); }
public static DataSet PegaDadosTaxasMensaisNome(String xNome, DateTime xPrevisao1, DateTime xPrevisao2) { string script; if (xNome == "") { script = " SELECT * FROM taxas_mensais WITH(NOLOCK) " + " WHERE (Convert(DateTime," + Srelib.QStr("01/") + "+mes+" + Srelib.QStr("/") + "+ano,103) " + " between " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xPrevisao1))) + " and " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xPrevisao2))) + ") " + " order by " + "REPLICATE('0', 4 - LEN(ano)) + CAST(ano AS varchar), " + "REPLICATE('0', 2 - LEN(mes)) + CAST(mes AS varchar) "; } else { script = "SELECT mes, ano, " + xNome + " FROM taxas_mensais WITH(NOLOCK) " + " WHERE (Convert(DateTime," + Srelib.QStr("01/") + "+mes+" + Srelib.QStr("/") + "+ano,103) " + " between " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xPrevisao1))) + " and " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xPrevisao2))) + ") " + " order by " + "REPLICATE('0', 4 - LEN(ano)) + CAST(ano AS varchar), " + "REPLICATE('0', 2 - LEN(mes)) + CAST(mes AS varchar) "; } return(SreDblib.GetDsScript(script)); }
protected void btprocessa_Click(object sender, EventArgs e) { Boolean lOk = true; // //Validação if (lOk) { string script = "select * from vendas with(nolock) where produto = " + cbproduto.Value.ToString() + " and grupo = " + cbgrupo.Value.ToString(); if (SreDblib.TemNaTabela(script)) { lOk = false; edunidades.Text = "Exclusão Abortada! Existem vendas para o produto informado!"; } } // if (lOk) { //Excluir uUnidade.Exclui(cbproduto.Value.ToString().Trim(), cbgrupo.Value.ToString().Trim()); //Alterar travas uProduto.AlteraGrupoCadastro(cbproduto.Value.ToString(), cbgrupo.Value.ToString(), false); edunidades.Text = "Concluído!"; } }
public static String GravaTaxa(string xmes, string xano, string xnome, string xvalor) { if (xvalor.Trim() == "") { xvalor = "0"; } if (xmes != string.Empty) { string script = "UPDATE TAXAS_MENSAIS " + " SET " + xnome + " = " + Srelib.forcaponto(xvalor) + " WHERE MES = " + Srelib.QStr(xmes) + " AND ANO = " + Srelib.QStr(xano); //Srelib.QStr(Srelib.QStr0(xmes, 2)) + // " AND ANO = " + //Srelib.QStr(Srelib.QStr0(xano, 4)); //" where nome=" + Rgblib.QStr(pParametro); SreDblib.ExecScript(script); } return(" "); }
public static String IncluiTaxas(string xID, string xmes, string xano, string xstring_altera, string xstring_altera2) { string script = ""; script = "select ID from TAXAS_MENSAIS where mes = " + xmes + " and ano = " + xano + " "; if (!SreDblib.TemNaTabela(script)) { script = "INSERT INTO TAXAS_MENSAIS VALUES ( " + xmes + ", " + xano + ", " + xstring_altera + " ) "; } else { script = "UPDATE taxas_mensais SET " + xstring_altera2 + " where mes = " + xmes + " and ano = " + xano; } SreDblib.ExecScript(script); return(" "); }
public static DataSet LookUpLogAcoes(string xusuario, string xData1, string xData2, string xModulo, string xAcao, string xComplementoAcao) { // string script; if (xusuario == "") { script = "SELECT * FROM log WITH(NOLOCK) WHERE (DataHora >= " + Srelib.QStr(Srelib.DataAmericanasembarra(xData1)) + " and DataHora <= " + Srelib.QStr(Srelib.DataAmericanasembarra(xData2)) + ") "; } else { script = "SELECT * FROM log WITH(NOLOCK) WHERE Login = "******" and (DataHora >= " + Srelib.QStr(Srelib.DataAmericanasembarra(xData1)) + " and DataHora <= " + Srelib.QStr(Srelib.DataAmericanasembarra(xData2)) + ") "; } script = script + " and ((tabela like " + Srelib.QStr("%" + xComplementoAcao.ToUpper() + "%") + ") "; script = script + " or (obs like " + Srelib.QStr("%" + xComplementoAcao.ToUpper() + "%") + ") "; script = script + " or (acao like " + Srelib.QStr("%" + xComplementoAcao.ToUpper() + "%") + ")) "; script = script + " order by DataHora"; return(SreDblib.GetDsScript(script)); }
public static String Grava(string xlogin, string xdata, string xhora, string xtabela, string xoperacao, string xobs, string xacao) { if (xlogin != String.Empty) { if (Convert.ToInt32(xhora.Substring(0, 2)) > 23) { xhora = "00:00:00"; } string script = "INSERT INTO LOG VALUES ( " + Srelib.QStr(xlogin) + ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata) + " " + xhora) + ", newid() " + ", " + Srelib.QStr(xtabela) + ", " + Srelib.QStr(xoperacao) + ", " + Srelib.QStr(xobs) + ", " + Srelib.QStr(xacao) + " ) "; //" where nome=" + Rgblib.QStr(pParametro); SreDblib.ExecScript(script); } return(" "); }
public static DataSet PegaDadosReceitas(string xID) { string script; if ((SreDblib.GetParametro("ORDEM RECEITA") != "CODIGO") && (SreDblib.GetParametro("ORDEM RECEITA") != "CÓDIGO")) { if ((xID == "0") || (xID == string.Empty)) { script = "SELECT * FROM classe_receitas WITH(NOLOCK) order by descricao"; } else { script = "SELECT * FROM classe_receitas WITH(NOLOCK) WHERE codigo in (" + xID + ") order by descricao"; } } else { if ((xID == "0") || (xID == string.Empty)) { script = "SELECT * FROM classe_receitas WITH(NOLOCK) order by codigo"; } else { script = "SELECT * FROM classe_receitas WITH(NOLOCK) WHERE codigo in (" + xID + ") order by codigo"; } } return(SreDblib.GetDsScript(script)); }
public static ASPxComboBox MontaComboCliente(ASPxComboBox pCombo, Boolean pativo) { if ((SreDblib.GetParametro("ORDEM CLIENTE") != "CODIGO") && (SreDblib.GetParametro("ORDEM CLIENTE") != "CÓDIGO")) { if (pativo) { return(SreDblib.MontaCombo(pCombo, "clientes", "codigo", "nome", true, " WHERE ativo = 1 order BY apelido ")); } else { return(SreDblib.MontaCombo(pCombo, "clientes", "codigo", "nome", true, " WHERE ativo = 0 order BY apelido ")); } } else { if (pativo) { return(SreDblib.MontaCombo(pCombo, "clientes", "codigo", "nome", true, " WHERE ativo = 1 order BY CODIGO ")); } else { return(SreDblib.MontaCombo(pCombo, "clientes", "codigo", "nome", true, " WHERE ativo = 0 order BY CODIGO ")); } } }
public void PegaDadosDoSacado(String wsacado) { String sql = @"Select cnpj, nome, endereco, bairro, cidade, uf, cep, fone, contato from sacado where cnpj=@sacado"; SqlParameter[] parametros = { new SqlParameter("@sacado", wsacado) }; DataSet Ds = SreDblib.GetDsCp(sql, parametros); // dados apelido = ""; nome = ""; cnpj = ""; endereco = ""; bairro = ""; cidade = ""; uf = ""; cep = ""; fone = ""; contato = ""; if (Ds.Tables.Count > 0) { apelido = Ds.Tables[0].Rows[0]["apelido"].ToString(); nome = Ds.Tables[0].Rows[0]["nome"].ToString(); cnpj = Ds.Tables[0].Rows[0]["cnpj"].ToString(); endereco = Ds.Tables[0].Rows[0]["endereco"].ToString(); bairro = Ds.Tables[0].Rows[0]["bairro"].ToString(); cidade = Ds.Tables[0].Rows[0]["cidade"].ToString(); uf = Ds.Tables[0].Rows[0]["uf"].ToString(); cep = Ds.Tables[0].Rows[0]["cep"].ToString(); fone = Ds.Tables[0].Rows[0]["fone"].ToString(); contato = Ds.Tables[0].Rows[0]["contato"].ToString(); } }
public static DataSet PegaDadosClientes(Int32 xID) { string script; if ((SreDblib.GetParametro("ORDEM CLIENTE") != "CODIGO") && (SreDblib.GetParametro("ORDEM CLIENTE") != "CÓDIGO")) { if (xID == 0) { script = "SELECT * FROM clientes WITH(NOLOCK) order by Apelido"; } else { script = "SELECT * FROM clientes WITH(NOLOCK) WHERE codigo = " + Convert.ToString(xID) + " order by Apelido"; } } else { if (xID == 0) { script = "SELECT * FROM clientes WITH(NOLOCK) order by CODIGO"; } else { script = "SELECT * FROM clientes WITH(NOLOCK) WHERE codigo = " + Convert.ToString(xID) + " order by CODIGO"; } } return(SreDblib.GetDsScript(script)); }
protected void Page_Init(object sender, EventArgs e) { lInsere = SreDblib.TemPermissao("001.007.001.000", (String)Session["CodUsuario"]); lAltera = false; //SreDblib.TemPermissao("001.007.002.000", (String)Session["CodUsuario"]); lExclui = false; //SreDblib.TemPermissao("001.007.003.000", (String)Session["CodUsuario"]); lConsulta = SreDblib.TemPermissao("001.007.004.000", (String)Session["CodUsuario"]); // string Msg_acesso = "Usuário corrente não possui direitos de acesso para esta opção."; // btprocessa.Enabled = lInsere; if (!lInsere) { btprocessa.Image.ToolTip = Msg_acesso; } lInsere = false; // edparcelas.Text = "1"; edparcelas_total.Text = "1"; // //dtprevisao1.Date = new DateTime(1900, 1, 1); //dtrealizado1.Date = new DateTime(1900, 1, 1); //dtnotafiscal1.Date = new DateTime(1900, 1, 1); //dtcompensacao1.Date = new DateTime(1900, 1, 1); }
public static ASPxComboBox MontaComboDespesas(ASPxComboBox pCombo, string pCodigo, Boolean pativo) { if ((SreDblib.GetParametro("ORDEM DESPESA") != "CODIGO") && (SreDblib.GetParametro("ORDEM DESPESA") != "CÓDIGO")) { if (pativo) { if (pCodigo != "0") return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " WHERE PRODUTO = " + pCodigo + " ORDER BY descricao "); else return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " ORDER BY descricao "); } else if (pCodigo != "0") return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " WHERE PRODUTO = " + pCodigo + " ORDER BY descricao "); else return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " ORDER BY descricao "); } else { if (pativo) { if (pCodigo != "0") return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " WHERE PRODUTO = " + pCodigo + " ORDER BY CODIGO "); else return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " ORDER BY CODIGO "); } else if (pCodigo != "0") return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " WHERE PRODUTO = " + pCodigo + " ORDER BY CODIGO "); else return SreDblib.MontaCombo(pCombo, "classe_despesas", "descricao", "codigo", true, " ORDER BY CODIGO "); } }
public static ASPxComboBox MontaComboGerenteCred(ASPxComboBox pCombo, Boolean lMaster, String ccUsuario, Boolean ativo) { String script = "SELECT apelido FROM gerente WITH(NOLOCK) WHERE 1=1 "; if (SreDblib.GetParametro("PESQ_GER_INATIVOS") != "SIM") { script = script + "and ativo = 1"; } if (!lMaster) { script = script + "and apelido in (SELECT gerente FROM ger_usu WITH(NOLOCK) WHERE usuario=" + Srelib.QStr(ccUsuario) + ")"; } script = script + "ORDER BY apelido"; DataSet ds = SreDblib.GetDsScript(script); ListEditItem le; foreach (DataRow dr in ds.Tables[0].Rows) { le = new ListEditItem(); le.Text = dr["apelido"].ToString(); le.Value = dr["apelido"].ToString(); pCombo.Items.Add(le); } return(pCombo); }
public static String AlteraConta(string xID, string xcod_banco, string xcod_agencia, string xcod_conta, string xnome_agencia, string xcidade, string xuf, string xcep, string xlimite_cheque, string xconta_contabil, string xcomplemento, string xcombo) { string script = "UPDATE CONTAS SET " + " cod_banco = " + Srelib.QStr(xcod_banco) + " ,cod_agencia = " + Srelib.QStr(xcod_agencia) + " ,cod_conta = " + Srelib.QStr(xcod_conta) + " ,nome_agencia = " + Srelib.QStr(xnome_agencia) + " ,cidade = " + Srelib.QStr(xcidade) + " ,uf = " + Srelib.QStr(xuf) + " ,cep = " + Srelib.QStr(xcep) + " ,limite_cheque = " + Srelib.forcaponto(xlimite_cheque) + " ,conta_contabil = " + Srelib.QStr(xconta_contabil) + " ,complemento = " + Srelib.QStr(xcomplemento) + " ,combo = " + Srelib.QStr(xcombo) + " where ID =" + xID; //revisar quando mexer na cobrança bancária SreDblib.ExecScript(script); return(" "); }
public DataSet PegaVencidos(String wgerente, String ctipo, DateTime ddata, Boolean zgrupo1, Boolean zgrupo2, Boolean zgrupo3, Boolean zgrupo4, Int16 zrgtipo) { DateTime DataAtual = Redoma.Proximo_Dia_Util(uFechamento.PegaUltimaData()); String sql = ""; sql = "ww_CRTOTCEDA_gerente"; SqlParameter[] parametros = { new SqlParameter("@gerente", wgerente), new SqlParameter("@zgrupo1", zgrupo1), new SqlParameter("@zgrupo2", zgrupo2), new SqlParameter("@zgrupo3", zgrupo3), new SqlParameter("@zgrupo4", zgrupo4), new SqlParameter("@rgtipo", zrgtipo), new SqlParameter("@dataatual", DataAtual), new SqlParameter("@tipo", ctipo), new SqlParameter("@ddata", ddata) }; DataSet Ds = SreDblib.GetDsSp(sql, parametros); return(Ds); }
public static String PegaSaldoFinalDataAnterior(string xcodigo_conta, DateTime xdata, ref string xsaldo_f, ref string xsaldo_aplicacaoD, ref string xsaldo_aplicacaoB) { // DataSet ds; string script = "select TOP 1 * from conta_" + Srelib.QStr0(xcodigo_conta.Trim(), 5) + " with(nolock) " + " Where " + " data < " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xdata).Substring(0, 10))) + " order by ID DESC "; ds = SreDblib.GetDsScript(script); // if (ds.Tables[0].Rows.Count > 0) { //Faz caso exista lançamentos anteriores a data // xsaldo_f = ds.Tables[0].Rows[0]["saldo_f"].ToString().Trim(); xsaldo_aplicacaoD = ds.Tables[0].Rows[0]["saldo_aplicacaoD"].ToString().Trim(); xsaldo_aplicacaoB = ds.Tables[0].Rows[0]["saldo_aplicacaoB"].ToString().Trim(); } else { // xsaldo_f = uContas.PegaSaldoInicial(xcodigo_conta); xsaldo_aplicacaoD = uContas.PegaSaldoInicialsaldo_aplicacaoD(xcodigo_conta); xsaldo_aplicacaoB = uContas.PegaSaldoInicialsaldo_aplicacaoB(xcodigo_conta); } return(""); }
public DataSet PegaConfirmacoes(String wgerente, String ctipo, DateTime ddata, String ordena, Boolean zgrupo1, Boolean zgrupo2, Boolean zgrupo3, Boolean zgrupo4, Int16 zrgtipo) { DateTime DataAtual = Redoma.Proximo_Dia_Util(uFechamento.PegaUltimaData()); String sql = ""; if (ctipo == "N") { sql = "ww_CRTOTCEDNC_gerente"; } if (ctipo == "NC") { sql = "WW_CRTOTCEDNCC_GERENTE"; } if (ctipo == "OP") { sql = "WW_CRTOTCEDOP_GERENTE"; } if (ctipo == "OPC") { sql = "WW_CRTOTCEDOPC_GERENTE"; } if (ctipo == "NN") { sql = "WW_CRTOTCEDX_GERENTE"; } if (ctipo == "NNC") { sql = "WW_CRTOTCEDXC_GERENTE"; } SqlParameter[] parametros = { new SqlParameter("@gerente", wgerente), new SqlParameter("@zgrupo1", zgrupo1), new SqlParameter("@zgrupo2", zgrupo2), new SqlParameter("@zgrupo3", zgrupo3), new SqlParameter("@zgrupo4", zgrupo4), new SqlParameter("@rgtipo", zrgtipo), new SqlParameter("@dataatual", DataAtual), new SqlParameter("@tipo", ctipo), new SqlParameter("@ddata", ddata), new SqlParameter("@ordena", ordena) }; DataSet Ds = SreDblib.GetDsSp(sql, parametros); return(Ds); }
public static String GravaSaldoInicial(string xcod_conta, string xdata, string xdescricao, string xcomplemento, string xsaldo_i, string xsaldo_aplicacaoD, string xsaldo_aplicacaoB, string xdtregistro) { if (xsaldo_i.Trim() == "") { xsaldo_i = "0.00"; } if (xcod_conta != String.Empty) { string script = "INSERT INTO CONTAS_SALDO_INICIAL VALUES ( " + Srelib.QStr(xcod_conta) + ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata)) + ", " + Srelib.QStr(xdescricao) + ", " + Srelib.QStr(xcomplemento) + ", " + Srelib.forcaponto(xsaldo_i) + ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtregistro)) + ", " + Srelib.forcaponto(xsaldo_aplicacaoD) + ", " + Srelib.forcaponto(xsaldo_aplicacaoB) + " ) "; SreDblib.ExecScript(script); } return(" "); }
protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetExpires(DateTime.Now); Response.Cache.SetNoServerCaching(); Response.Cache.SetNoStore(); //lbmsg.Text = Srelib.DiaSemana(DateTime.Now); if (!(Page.IsPostBack)) { //Monta Combo com Bases do Web.config SreDblib.MontaComboBases(ComboBases, true); if (ComboBases.Items.Count > 1) { ComboBases.SelectedIndex = -1; ComboBases.Focus(); } else { ComboBases.SelectedIndex = 0; edusuario.Focus(); } } if ((String)Session["fimdesessao"] != null) { lbmsg.Text = "A Sessão foi expirada, recarregue o sistema!"; ScriptManager.RegisterStartupScript(this.Page, typeof(Page), Guid.NewGuid().ToString(), "toastr.error('A Sessão foi expirada, recarregue o sistema!', 'Atenção!')", true); } }
private void RepVendasTaxasDiarias_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { if ((SreDblib.GetParametro("RELATORIO ZEBRADO") == "SIM")) { Detail.Styles.EvenStyle.BackColor = System.Drawing.Color.Empty; Detail.Styles.OddStyle.BackColor = System.Drawing.Color.Silver; Detail.Styles.EvenStyle.ForeColor = System.Drawing.Color.Black; } else { Detail.Styles.EvenStyle.BackColor = System.Drawing.Color.Empty; Detail.Styles.OddStyle.BackColor = System.Drawing.Color.Empty; Detail.Styles.EvenStyle.ForeColor = System.Drawing.Color.Black; } grupofiltros.RepeatEveryPage = ((SreDblib.GetParametro("EXIBE FILTRO RELAT") == "SIM")); if ((SreDblib.GetParametro("EXIBE LOGO RELATÓRIO") != "SIM")) { xrPictureBox1.Visible = false; } if ((SreDblib.GetParametro("EXIBE EMPRESA RELAT") != "SIM")) { ltempresa.Visible = false; } }
public void PegaDadosCrepar() { String sql = @"Select isnull(grupo1,0) grupo1, isnull(grupo2,0) grupo2, isnull(grupo3,0) grupo3, isnull(grupo4,0) grupo4, isnull(ckr6,0) ckr6, isnull(refat,0) refat from crepar"; DataSet Ds = SreDblib.GetDsScript(sql); // dados grupo1 = false; grupo2 = false; grupo3 = false; grupo4 = false; ckr6 = false; refat = 0; if (Ds.Tables.Count > 0) { grupo1 = Convert.ToBoolean(Ds.Tables[0].Rows[0]["grupo1"].ToString()); grupo2 = Convert.ToBoolean(Ds.Tables[0].Rows[0]["grupo2"].ToString()); grupo3 = Convert.ToBoolean(Ds.Tables[0].Rows[0]["grupo3"].ToString()); grupo4 = Convert.ToBoolean(Ds.Tables[0].Rows[0]["grupo4"].ToString()); ckr6 = Convert.ToBoolean(Ds.Tables[0].Rows[0]["ckr6"].ToString()); refat = Convert.ToInt16(Ds.Tables[0].Rows[0]["refat"].ToString()); } }
public static String Grava(string xcodigo, string xproduto, string xlinha1, string xlinha2, string xlinha3, string xlinha4, string xlinha5 ) { if (xproduto == "") { xproduto = "0"; } if ((xcodigo != String.Empty) && (xproduto != String.Empty)) { string script = "INSERT INTO boleto_mensagens VALUES ( " + xcodigo + ", " + xproduto + ", " + Srelib.QStr(xlinha1) + ", " + Srelib.QStr(xlinha2) + ", " + Srelib.QStr(xlinha3) + ", " + Srelib.QStr(xlinha4) + ", " + Srelib.QStr(xlinha5) + " ) "; //" where nome=" + Rgblib.QStr(pParametro); SreDblib.ExecScript(script); } return(" "); }
public static ASPxComboBox MontaComboUnidades(ASPxComboBox pCombo, string pProduto, string pGrupo, Boolean pVendido) { //Ativos if (pVendido) { //Vendidos return(SreDblib.MontaCombo(pCombo, "produto_unidades", "parte", "unidade", true, " WHERE PRODUTO = " + pProduto + " AND GRUPO = " + pGrupo + " AND ((parte = 0 and proprietario_1 <> 1) " + " OR (parte = 1 and (proprietario_1 <> 1) " + " OR (parte = 1 and proprietario_2 <> 1))) " + " order by unidade")); } else { //Disponíveis return(SreDblib.MontaCombo(pCombo, "produto_unidades", "parte", "unidade", true, " WHERE PRODUTO = " + pProduto + " AND GRUPO = " + pGrupo + " AND ((parte = 0 and proprietario_1 = 1) " + " OR (parte = 1 and (proprietario_1 = 1) " + " OR (parte = 1 and proprietario_2 = 1))) " + " order by unidade")); } }