示例#1
0
        void cargarProducto()
        {
            List <capascccmex.metadatos.producto> oCamposCat = new List <capascccmex.metadatos.producto>();

            capascccmex.biz.producto obj = new capascccmex.biz.producto();

            try
            {
                Dictionary <Int64?, string> dictionarycat1 = new Dictionary <Int64?, string>();
                oCamposCat = obj.GetBizProducto(null, 0, 0);
                //----------------------------------------
                foreach (var item in oCamposCat)
                {
                    dictionarycat1.Add(convertir.toNInt64(item.IdProducto), (string)item.Producto);
                }

                cmbproducto.DataSource     = dictionarycat1;
                cmbproducto.DataTextField  = "Value";
                cmbproducto.DataValueField = "Key";
                cmbproducto.DataBind();
                //----------------------------------------
            }
            catch (SqlException ex)
            {
                convertir.log("Error: " + ex.Message.ToString() + ", fecha: " + DateTime.Now.ToString());
                RadWindowManager1.RadAlert("Error: " + ex.Message.ToString(), 300, 100, "Cargando información de productos", null);
            }
        }
        void cargarProducto()
        {
            List<capascccmex.metadatos.producto> oCamposCat = new List<capascccmex.metadatos.producto>();
            capascccmex.biz.producto obj = new capascccmex.biz.producto();

            Dictionary<Int64?, string> dcat = new Dictionary<Int64?, string>();
            RadComboBox cmbcat = (RadComboBox)RadPanelBar1.FindItemByValue("info").FindControl("cmbproducto");
            try
            {
                oCamposCat = obj.GetBizProducto(null, 0, 0);
                //----------------------------------------
                foreach (var item in oCamposCat)
                {
                    dcat.Add(convertir.toNInt64(item.IdProducto), (string)item.Producto);
                }

                cmbcat.DataSource = dcat;
                cmbcat.DataTextField = "Value";
                cmbcat.DataValueField = "Key";
                cmbcat.DataBind();
                //----------------------------------------

            }
            catch (SqlException ex)
            {
                windowManager1.RadAlert("Error: " + ex.Message.ToString(), 300, 100, "Cargando información de productos", null);
            }
        }
        void cargarCatalogo()
        {
            List <capascccmex.metadatos.producto> oCamposCat = new List <capascccmex.metadatos.producto>();

            capascccmex.biz.producto obj = new capascccmex.biz.producto();

            try
            {
                oCamposCat = obj.GetBizProducto(null, 0, 0);
                Session["getCamposCat"] = oCamposCat;
                gridcccmex.DataSource   = oCamposCat;
                gridcccmex.DataBind();
                gridcccmex.Rebind();
                //----------------------------------------
            }
            catch (SqlException ex)
            {
                windowManager1.RadAlert("Error: " + ex.Message.ToString(), 300, 100, "Cargando información de productos", null);
            }
        }