protected void Page_Load(object sender, EventArgs e) { BeStyleRepository BeStyleDB=new BeStyleRepository(conStr); GridView2.DataSource = BeStyleDB.GetUsersAll(); GridView2.DataBind(); UserInfo user = BeStyleDB.GetUserByLogin("Vitaly"); Label1.Text = user.LastName; Label2.Text = user.Role; }
protected void Page_Load(object sender, EventArgs e) { BeStyleRepository BeStyleDB=new BeStyleRepository(conStr); GridView2.DataSource = BeStyleDB.GetAdminAll(); GridView2.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { connectionString = WebConfigurationManager.ConnectionStrings["BeStyleDB"].ConnectionString; BeStyleRepository db = new BeStyleRepository(connectionString); }