AdminMaster.aspx.cs

דף זה הוא הקוד מאחור של AdminMaster.aspx
 avatar
user_2706180
csharp
a month ago
1.0 kB
1
Indexable
Never
using System;
using System.Collections.Generic;
//using System.Linq;
//using System.Web;
//using System.Web.UI;
//using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

namespace YoadMadrid.Pages
{
    public partial class AdminMaster : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session == null || Session["Admin"] == null || !(bool)Session["Admin"])
            {
                Response.Redirect("/Pages/MainMaster.aspx");
            }


            else
            {
                if (!IsPostBack)
                {
                    string SQLStr = "SELECT * FROM " + Helper.tblName;
                    DataSet ds = Helper.RetrieveTable(SQLStr);
                    DataTable dt = ds.Tables[0];
                    string table = Helper.BuildSimpleUsersTable(dt);
                    tableDiv.InnerHtml = table;
                }
            }

        }
    }

}
Leave a Comment