예제 #1
0
        private void obtenerImplementos()
        {
            try
            {
                cSGGIIMPLEMENTONegocios Implemento = new cSGGIIMPLEMENTONegocios(Global.gCOD_APLICACION, "CA", 2, "cosejo");
                DT_Implementos = new DataTable();
                DT_Implementos = Implemento.SeleccionarTodos();
                String aDataSet = "[";
                int cantidadColumnas = DT_Implementos.Columns.Count;
                for (int IndiceImplementos = 0; IndiceImplementos < DT_Implementos.Rows.Count; IndiceImplementos++)
                {

                    aDataSet += "['" + DT_Implementos.Rows[IndiceImplementos][0] + "','" + DT_Implementos.Rows[IndiceImplementos][1].ToString() + "','" + DT_Implementos.Rows[IndiceImplementos][3].ToString() + "','" + DT_Implementos.Rows[IndiceImplementos][4] + "','" + DT_Implementos.Rows[IndiceImplementos][2].ToString() + "']";
                    if (IndiceImplementos + 1 != DT_Implementos.Rows.Count)
                    {
                        aDataSet += ",";
                    }
                }
                aDataSet += "]";

                if (!Page.ClientScript.IsStartupScriptRegistered("TablaInventario"))
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "TablaInventario", "<script type=\"text/javascript\"> CrearTablaInventario(" + aDataSet + ");</script>");
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alerta", "<script type=\"text/javascript\"> alert(" + "'" + ex.Message + "'" + ");</script>");
            }
        }
예제 #2
0
 private void ObtenerImplementos()
 {
     cSGGIIMPLEMENTONegocios tempImplemento = new cSGGIIMPLEMENTONegocios(Global.gCOD_APLICACION, "CA", 0, "0");
     _inventario = tempImplemento.SeleccionarTodos();
 }
예제 #3
0
 protected void BotonReportesInventario_Click(object sender, EventArgs e)
 {
     String MensajeDevuelto = "";
     try
     {
         cSGGIIMPLEMENTONegocios Implemento = new cSGGIIMPLEMENTONegocios(Global.gCOD_APLICACION, "CA", 2, "cosejo");
         DataTable DT_Implementos = Implemento.SeleccionarTodos();
         llenarTablaImplementos(DT_Implementos);
         LabelMensaje.ForeColor = System.Drawing.Color.Blue;
     }
     catch (Exception ex)
     {
         MensajeDevuelto = ex.Message;
         LabelMensaje.ForeColor = System.Drawing.Color.Red;
     }
     LabelMensaje.Text = MensajeDevuelto;
 }