TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Weeman Osekre
NA
56
4k
Database with entity framework
Nov 3 2020 7:16 PM
I have a database(opos)which contains a table (unpaidchecks). I want to first all check if the data contains data and if it does I want to loop through it and compare the data from one of the columns (user) to libuser. Text , then if it’s the same I creat a dynamic button. The buttons are supposed to be created when the form loads
loads unpaidcheck uk =
new
unpaidcheck();
oposEntities gg =
new
oposEntities();
private
void
Interface_Load(
object
sender, EventArgs e) {
int
i = 0;
int
x = 0;
if
(gg.unpaidchecks.Count() != 0) {
foreach
(DataRow item
in
gg.uk. {
if
(uk.user.Contains(
this
.libuser.Text)) {
Button btn =
new
Button();
btn.Location =
new
Point(3 + i, 14 + x);
btn.Width = 160;
btn.Height = 80;
btn.BackColor = System.Drawing.Color.Red;
btn.ForeColor = System.Drawing.Color.Yellow;
btn.Text =
"Tabel"
+ item[
"tabel_no_"
].ToString();
btn.Click +=
new
EventHandler(btn_Click);
this
.panel3.Controls.Add(btn);
i += 10;
x += 10;
}
}
Reply
Answers (
4
)
I want the following output as my query. anyone please can you help me
Value of foreign key in not coming in the foreign table