Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline GendrixonEvgeny  
#1 Posted : Monday, November 6, 2017 12:02:44 PM(UTC)
GendrixonEvgeny


Rank: YAF Forumling

Reputation:

Joined: 11/5/2017(UTC)
Posts: 9

Hi guys. Please, tell me how to send a query to a header or a separate page from a new table? Type SELECT count(*) FROM NEW_TABLE WHERE Statistic = "1"
Sponsor
Offline GendrixonEvgeny  
#2 Posted : Tuesday, November 7, 2017 1:15:43 PM(UTC)
GendrixonEvgeny


Rank: YAF Forumling

Reputation:

Joined: 11/5/2017(UTC)
Posts: 9

No one knows?)
Offline GendrixonEvgeny  
#3 Posted : Sunday, November 12, 2017 8:24:09 AM(UTC)
GendrixonEvgeny


Rank: YAF Forumling

Reputation:

Joined: 11/5/2017(UTC)
Posts: 9

What am I doing wrong? Posted in YAF.Data.MsSql model ADO.NET EDM -> Code First from the database. Specified connection yafnet(YAF). Created a file with the function Functions.cs in which he indicated:

using System;
using System.Linq;
using System.Net.Sockets;
using YAF.Data.MsSql;

namespace YAF
{
public static class Functions
{
public static string AccountsCount
{
get
{
using (CustomBase entity = new CustomBase())
{
int accountsCount = entity.ACCOUNTS_INFO.Count();
return accountsCount.ToString();
}
}
}
}
}

Then for the test indicated in the forum.ascx following:
<table>
<tr>
<td>Accounts:</td>
<td><%# Functions.AccountsCount %></td>
</tr>
</table>

After starting the application, I get: Screenshot_2.png

Guys. Very much I ask, prompt where was mistaken. I am just learning...
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error