Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     oWeb.ValidaSessionAdm();
     if (!IsPostBack)
     {
         CodBanner.Value = oWeb.GetData("CodBanner");
         if (!string.IsNullOrEmpty(CodBanner.Value))
         {
             DBConn oConn = new DBConn();
             if (oConn.Open())
             {
                 AppBanner oBanner = new AppBanner(ref oConn);
                 oBanner.CodBanner = CodBanner.Value;
                 DataTable dBanner = oBanner.Get();
                 if (dBanner != null)
                 {
                     if (dBanner.Rows.Count > 0)
                     {
                         txtTituloBanner.Text = dBanner.Rows[0]["nom_banner"].ToString();
                         rdCmbTipoBanner.Items.FindItemByValue(dBanner.Rows[0]["tipo_banner"].ToString()).Selected = true;
                         rdCmbEstado.Items.FindItemByValue(dBanner.Rows[0]["est_banner"].ToString()).Selected      = true;
                         Image.Visible = true;
                     }
                 }
                 dBanner = null;
             }
             oConn.Close();
         }
     }
 }
Exemple #2
0
        protected void LoadTreeApps()
        {
            RadTreeNode oNode;
            DBConn      oConn = new DBConn();

            if (oConn.Open())
            {
                AppBanner oBanner = new AppBanner(ref oConn);
                oBanner.EstBanner = "V";
                DataTable dBanner = oBanner.Get();
                if (dBanner != null)
                {
                    if (dBanner.Rows.Count > 0)
                    {
                        foreach (DataRow oRow in dBanner.Rows)
                        {
                            oNode = new RadTreeNode(oRow["nom_banner"].ToString(), "banners_" + oRow["cod_banner"].ToString());
                            rdTreeApps.Nodes.Add(oNode);
                        }
                    }
                }
                dBanner = null;
            }
            oConn.Close();
        }
Exemple #3
0
        protected void rdBanners_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                GridColumn oGridColumn;

                oGridColumn            = rdBanners.MasterTableView.Columns.FindByUniqueName("NomBanner");
                oGridColumn.HeaderText = oCulture.GetResource("Banner", "NomBanner");

                oGridColumn            = rdBanners.MasterTableView.Columns.FindByUniqueName("EstBanner");
                oGridColumn.HeaderText = oCulture.GetResource("Banner", "Estado");

                AppBanner oBanner = new AppBanner(ref oConn);
                rdBanners.DataSource = oBanner.Get();

                oConn.Close();
            }
        }