예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oWeb.ValidaSessionAdm();
            if (!IsPostBack)
            {
                CodZona.Value = oWeb.GetData("CodZona");
                if (!string.IsNullOrEmpty(CodZona.Value))
                {
                    DBConn oConn = new DBConn();
                    if (oConn.Open())
                    {
                        CmsZona oZona = new CmsZona(ref oConn);
                        oZona.CodZona = CodZona.Value;
                        DataTable dZona = oZona.Get();
                        if (dZona != null)
                        {
                            if (dZona.Rows.Count > 0)
                            {
                                txtTitulo.Text        = dZona.Rows[0]["nom_zona"].ToString();
                                rdDescripcion.Content = dZona.Rows[0]["texto_zona"].ToString();
                                rdCmbEstado.Items.FindItemByValue(dZona.Rows[0]["est_zona"].ToString()).Selected = true;
                                chk_despliegue.Checked = (dZona.Rows[0]["ind_desp_cont"].ToString() == "V" ? true : false);
                            }
                        }
                        dZona = null;

                        oConn.Close();
                    }
                }
            }
        }
예제 #2
0
        protected void LoadTreeZonas()
        {
            RadTreeNode oNode;
            DBConn      oConn = new DBConn();

            if (oConn.Open())
            {
                CmsZona oZona = new CmsZona(ref oConn);
                oZona.EstZona = "V";
                DataTable dZona = oZona.Get();
                if (dZona != null)
                {
                    if (dZona.Rows.Count > 0)
                    {
                        foreach (DataRow oRow in dZona.Rows)
                        {
                            oNode = new RadTreeNode(oRow["nom_zona"].ToString(), "zona_" + oRow["cod_zona"].ToString());
                            rdTreeZona.Nodes.Add(oNode);
                        }
                    }
                }
                dZona = null;
                oConn.Close();
            }
        }
예제 #3
0
        protected void rdZona_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                CmsZona oZona = new CmsZona(ref oConn);

                GridColumn oGridColumn;

                oGridColumn            = rdZona.MasterTableView.Columns.FindByUniqueName("NomZona");
                oGridColumn.HeaderText = oCulture.GetResource("Zona", "NomZona");

                oGridColumn            = rdZona.MasterTableView.Columns.FindByUniqueName("EstZona");
                oGridColumn.HeaderText = oCulture.GetResource("Zona", "EstZona");

                rdZona.DataSource = oZona.Get();

                oConn.Close();
            }
        }