Esempio n. 1
0
 protected void ListaraDATOS(object sender, EventArgs e)
 {
     try
     {
         var registrosv13 = Controlasql.listaventaXhora13(txtfechaini.Value);
         if (registrosv13.Tables[0].Rows.Count > 0)
         {
             Gridsuper13.DataSource = registrosv13;
             Gridsuper13.DataBind();
         }
         else
         {
             Gridsuper13.DataSource = null;
             Gridsuper13.DataBind();
         }//var regtotal16 = Controlasql.listaventa16total(txtfechaini.Value);
         //if(regtotal16.Tables[0].Rows.Count > 0)
         //{
         //    GridViewtotal.DataSource = regtotal16;
         //    GridViewtotal.DataBind();
         //}
         var regtotal13 = Controlasql.listaventa13total(txtfechaini.Value);
         if (regtotal13.Tables[0].Rows.Count > 0)
         {
             GridViewtotal13.DataSource = regtotal13;
             GridViewtotal13.DataBind();
         }
         var regtotalversa = Controlasql.listaventaversatotal(txtfechaini.Value);
         if (regtotalversa.Tables[0].Rows.Count > 0)
         {
             GridViewtotalversa.DataSource = regtotalversa;
             GridViewtotalversa.DataBind();
         }
         var registrosv16 = Controlasql.listaventaXhora(txtfechaini.Value, Session["CCOSTO"].ToString());
         if (registrosv16.Tables[0].Rows.Count > 0)
         {
             Gridsuper16.DataSource = registrosv16;
             Gridsuper16.DataBind();
         }
         else
         {
             Gridsuper16.DataSource = null;
             Gridsuper16.DataBind();
         }
         var registrosvVERSA = Controlasql.listaventaXhoraVERSA(txtfechaini.Value);
         if (registrosvVERSA.Tables[0].Rows.Count > 0)
         {
             GridsuperVERSA.DataSource = registrosvVERSA;
             GridsuperVERSA.DataBind();
         }
         else
         {
             GridsuperVERSA.DataSource = null;
             GridsuperVERSA.DataBind();
         }
         var registrosCiudadela = Controlasql.listaventaXhoraCiudadela(txtfechaini.Value);
         if (registrosCiudadela.Tables[0].Rows.Count > 0)
         {
             GridViewCiuaudadela.DataSource = registrosCiudadela;
             GridViewCiuaudadela.DataBind();
         }
         else
         {
             GridViewCiuaudadela.DataSource = null;
             GridViewCiuaudadela.DataBind();
         }
         var registrosCiudadelatotal = Controlasql.listadoventaCiudadelatotal(txtfechaini.Value);
         if (registrosCiudadelatotal.Tables[0].Rows.Count > 0)
         {
             GridView2ciudaela.DataSource = registrosCiudadelatotal;
             GridView2ciudaela.DataBind();
         }
         else
         {
             GridView2ciudaela.DataSource = null;
             GridView2ciudaela.DataBind();
         }
     }
     catch (Exception)
     {
         Response.Redirect("Exceptionnet.aspx");
     }
 }
Esempio n. 2
0
 public void Listarventastotal()
 {
     try
     {
         var registros16 = Controlasql.CSale_supermarkets(txtfechaini.Value.ToUpper(), txtfechafin.Value, "000001");
         if (registros16.Tables[0].Rows.Count > 0)
         {
             Gridsuper16total.DataSource = registros16;
             Gridsuper16total.DataBind();
         }
         else
         {
             Gridsuper16total.DataSource = null;
             Gridsuper16total.DataBind();
         }
     }
     catch (Exception e)
     {
         notificacion.Visible  = true;
         txtnotifica.InnerText = "" + e.Message;
     }
     try
     {
         var registros13 = Controlasql.CSale_supermarkets(txtfechaini.Value.ToUpper(), txtfechafin.Value, "000002");
         if (registros13.Tables[0].Rows.Count > 0)
         {
             GridViewtotal13.DataSource = registros13;
             GridViewtotal13.DataBind();
         }
         else
         {
             GridViewtotal13.DataSource = null;
             GridViewtotal13.DataBind();
         }
     }
     catch (Exception e)
     {
         notificacion.Visible  = true;
         txtnotifica.InnerText = "" + e.Message;
     }
     try
     {
         var registrosversa = Controlasql.CSale_supermarkets(txtfechaini.Value.ToUpper(), txtfechafin.Value, "000004");
         if (registrosversa.Tables[0].Rows.Count > 0)
         {
             GridViewtotalversa.DataSource = registrosversa;
             GridViewtotalversa.DataBind();
         }
         else
         {
             GridViewtotalversa.DataSource = null;
             GridViewtotalversa.DataBind();
         }
     }
     catch (Exception e)
     {
         notificacion.Visible  = true;
         txtnotifica.InnerText = "" + e.Message;
     }
     try
     {
         var registrosciud = Controlasql.CSale_supermarkets(txtfechaini.Value.ToUpper(), txtfechafin.Value, "000005");
         if (registrosciud.Tables[0].Rows.Count > 0)
         {
             GridViewtotalCiudadela.DataSource = registrosciud;
             GridViewtotalCiudadela.DataBind();
         }
         else
         {
             GridViewtotalCiudadela.DataSource = null;
             GridViewtotalCiudadela.DataBind();
         }
     }
     catch (Exception e)
     {
         notificacion.Visible  = true;
         txtnotifica.InnerText = "" + e.Message;
     }
 }