Exemplo n.º 1
0
    private void cargarproductos()
    {
        try
        {
            ServicioCom21.ServicioCom21 _consulta = new ServicioCom21.ServicioCom21();
            DataSet _items = _consulta.Com21_consulta_productos();
            if (_items.Tables[0].Rows.Count > 0)
            {
                prosi.Visible = true;
                prono.Visible = false;

                GvItems.DataSource = _items.Tables[0];
                GvItems.DataBind();
            }
            else
            {
                prosi.Visible = false;
                prono.Visible = true;
            }
        }
        catch (Exception e)
        {
            Console.WriteLine("{0} Second exception caught.", e);
        }
    }
Exemplo n.º 2
0
        protected void PopulateGridView()
        {
            var sds = Mapping.GetMapping(_webApplication);

            if (sds == null)
            {
                GvItems.Visible      = false;
                lblNoTargets.Visible = true;
                return;
            }

            GvItems.DataSource = sds;
            GvItems.DataBind();
        }
Exemplo n.º 3
0
    private void consultaletra(string letra)
    {
        ServicioCom21.ServicioCom21 _consulta = new ServicioCom21.ServicioCom21();
        DataSet _letras = _consulta.Com21_consulta_productos_letra(letra);

        if (_letras.Tables[0].Rows.Count > 0)
        {
            GvItems.DataSource = _letras.Tables[0];
            GvItems.DataBind();
        }
        else
        {
            ScriptManager.RegisterStartupScript(upMantenimiento, upMantenimiento.GetType(), "click", "alert('No existen productos para la busqueda: " + letra + "');", true);
        }
    }
Exemplo n.º 4
0
    private void cargarproductos()
    {
        ServicioCom21.ServicioCom21 _consulta = new ServicioCom21.ServicioCom21();
        DataSet _items = _consulta.Com21_consulta_productos_sub_categoria();

        if (_items.Tables[0].Rows.Count > 0)
        {
            prosi.Visible      = true;
            prono.Visible      = false;
            GvItems.DataSource = _items.Tables[0];
            GvItems.DataBind();
        }
        else
        {
            prosi.Visible = false;
            prono.Visible = true;
        }
    }
Exemplo n.º 5
0
        private void ListUsers()
        {
            ArrayList users = CoreFunctions.getFeatureUsers(1000);

            DataTable dt = new DataTable();

            dt.Columns.Add("username");
            dt.Columns.Add("encusername");

            int cntUsers = 0;

            foreach (string username in users)
            {
                if (username != "")
                {
                    string[] sUserInfo = username.Split(':');

                    if (sUserInfo[1] == Request["feature"])
                    {
                        cntUsers++;
                        dt.Rows.Add(new string[] { sUserInfo[0], System.Web.HttpUtility.UrlEncode(sUserInfo[0]) });
                    }
                }
            }

            GvItems.DataSource = dt;
            GvItems.DataBind();

            lblUsage.Text = cntUsers.ToString();

            int actType = 0;

            SortedList slLevels = Act.GetAllAvailableLevels(out actType);

            try
            {
                lblMaxUsers.Text = slLevels[int.Parse(Request["feature"])].ToString();
            }
            catch { lblMaxUsers.Text = "0"; }
        }