示例#1
0
        protected void Cargarcentros(int idCentro)
        {
            List <capascccmex.metadatos.centro> oCamposCat = new List <capascccmex.metadatos.centro>();

            capascccmex.biz.centro      obj  = new capascccmex.biz.centro();
            Dictionary <Int64?, string> dcat = new Dictionary <Int64?, string>();

            bool adm   = Convert.ToBoolean(Session["prmAdmin"]);
            bool pemex = Convert.ToBoolean(Session["prmPemex"]);

            if (adm == true || pemex == true)
            {
                oCamposCat = obj.GetBizCentro(null, 0, 0);
            }
            else
            {
                oCamposCat = obj.GetBizCentro(idCentro, 0, 0);
            }
            Session["tempCatCentros"] = oCamposCat;
            //----------------------------------------
            foreach (var item in oCamposCat)
            {
                dcat.Add(convertir.toInt32(item.IdCentro), (string)item.Centro);
            }

            cmbcentro.DataSource     = dcat;
            cmbcentro.DataTextField  = "Value";
            cmbcentro.DataValueField = "Key";
            cmbcentro.DataBind();
        }
        void cargarcentros()
        {
            List<capascccmex.metadatos.centro> oCamposCat = new List<capascccmex.metadatos.centro>();
            capascccmex.biz.centro obj = new capascccmex.biz.centro();
            Dictionary<Int64?, string> dcat = new Dictionary<Int64?, string>();

            RadComboBox cmbcat = (RadComboBox)RadPanelBar1.FindItemByValue("info").FindControl("cmbcentro");
            try
            {
                oCamposCat = obj.GetBizCentro(null, 0, 0);
                //----------------------------------------
                foreach (var item in oCamposCat)
                {
                    dcat.Add(convertir.toNInt64(item.IdCentro), (string)item.Centro);
                }

                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 centros", null);
            }
        }
示例#3
0
        protected void cmbCentro_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            try
            {
                capascccmex.biz.centro obj = new capascccmex.biz.centro();
                List <capascccmex.metadatos.centro> listaCampos = new List <capascccmex.metadatos.centro>();

                listaCampos = obj.GetBizCentro(null, 0, 0);

                RadComboBox rcmb = (RadComboBox)sender;

                foreach (var _row in listaCampos)
                {
                    RadComboBoxItem item = new RadComboBoxItem();
                    //{
                    //Text=_row.Nombre,Value=_row.IdPerito.ToString()
                    //};
                    item.Text  = _row.Centro;
                    item.Value = _row.IdCentro.ToString();
                    string _centro   = _row.Centro;
                    string _idcentro = _row.IdCentro.ToString();
                    //string _rf = _row.RegimenFiscal;

                    item.Attributes.Add("Codigo", _idcentro);
                    item.Attributes.Add("Nombre", _centro);
                    //item.Attributes.Add("RegimenFiscal", _rf);
                    rcmb.Items.Add(item);
                    item.DataBind();
                }
            }
            catch (Exception ex)
            {
                windowManager1.RadAlert("Error: " + ex.Message.ToString(), 400, 100, "Cargando Centros", null);
            }
        }
示例#4
0
        void cargarcentros()
        {
            List <capascccmex.metadatos.centro> oCamposCat = new List <capascccmex.metadatos.centro>();

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

            try
            {
                oCamposCat = obj.GetBizCentro(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 centros", null);
            }
        }
        protected void CargarCentros()
        {
            List <capascccmex.metadatos.centro> oCamposCat = new List <capascccmex.metadatos.centro>();

            capascccmex.biz.centro   obj  = new capascccmex.biz.centro();
            Dictionary <int, string> dcat = new Dictionary <int, string>();

            //RadComboBox cmbcat = (RadComboBox)RadPanelBar1.FindItemByValue("info").FindControl("cmbcentro");

            oCamposCat = obj.GetBizCentro(null, 0, 0);
            //----------------------------------------
            foreach (var item in oCamposCat)
            {
                dcat.Add(convertir.toInt16(item.IdCentro), (string)item.Centro);
            }

            cmbcentro.DataSource     = dcat;
            cmbcentro.DataTextField  = "Value";
            cmbcentro.DataValueField = "Key";
            cmbcentro.DataBind();
        }