protected void Page_Load(object sender, EventArgs e) { SqlConnection cnx = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=britania_db;User ID=sa;Password=Marcus123"); cnx.Open(); SqlDataAdapter adp = new SqlDataAdapter("SELECT a.VendaId ,b.nomecompleto ,a.ValorTotal ,a.ValorSemDesconto ,a.comissao, a.ValorTotalPagar, a.DataFechamento FROM fechar_caixa_devolucao as a join tb_cadastro_vendedora as b on a.CodCliente = b.id order by DataFechamento desc", cnx); DataSet dst = new DataSet(); adp.Fill(dst); Consulta_adm.DataSource = dst; Consulta_adm.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { SqlConnection cnx = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=britania_db;User ID=sa;Password=Marcus123"); cnx.Open(); SqlDataAdapter adp = new SqlDataAdapter("select VendaId, ValorTotal, DataVenda, Status from fechar_caixa where status='Aberto' and CodCliente='" + FecharPedidoUser.idvendedora + "'", cnx); DataSet dst = new DataSet(); adp.Fill(dst); Consulta_adm.DataSource = dst; Consulta_adm.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Response.Write("<script>window.print();</script>"); SqlConnection cnx = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=britania_db;User ID=sa;Password=Marcus123"); cnx.Open(); SqlDataAdapter adp = new SqlDataAdapter("SELECT a.VendaId ,b.nomecompleto ,a.ValorTotal ,a.DataVenda ,a.Status FROM fechar_caixa as a join tb_cadastro_vendedora as b on a.CodCliente = b.id where status ='aberto' order by DataVenda desc", cnx); DataSet dst = new DataSet(); adp.Fill(dst); Consulta_adm.DataSource = dst; Consulta_adm.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { ConsultarVenda(); string id = Request.QueryString["VendaId"]; SqlConnection cnx = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=britania_db;User ID=sa;Password=Marcus123"); cnx.Open(); SqlDataAdapter adp = new SqlDataAdapter("select * from tb_pedidos_fechado where VendaId='" + id + "'", cnx); DataSet dst = new DataSet(); adp.Fill(dst); Consulta_adm.DataSource = dst; Consulta_adm.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string Data = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); txtdata.Text = Data; ConsultarVenda(); string id = Request.QueryString["VendaId"]; SqlConnection cnx = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=britania_db;User ID=sa;Password=Marcus123"); cnx.Open(); SqlDataAdapter adp = new SqlDataAdapter("select * from tb_gerar_pedido where id_pedido='" + id + "'", cnx); DataSet dst = new DataSet(); adp.Fill(dst); Consulta_adm.DataSource = dst; Consulta_adm.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { //parametro de segurança logado if (Session["logado"] == null || (bool)Session["logado"] != true) { Response.Redirect("../administrador/loginadm.aspx"); } else { SqlConnection cnx = new SqlConnection(@"Data Source=APPCTX06SALLM\SQLEXPRESS;Initial Catalog=bd_rh_atestadoctx;User ID=sa;Password=todo@2015"); cnx.Open(); SqlDataAdapter adp = new SqlDataAdapter("Select * from tb_lancamento where status='Pendente Validação' ORDER BY nome", cnx); DataSet dst = new DataSet(); adp.Fill(dst); Consulta_adm.DataSource = dst; Consulta_adm.DataBind(); } }