I MADE A PROGRAM IN WHICH I DIVIDED THE PROGRAM INTO 3PARTS.
1.BUSINESS LOGIC
bt1 = new Button();
bt1.Text = "OK";
bt1.Location = new Point(50, 90);
.......................bt1.Click += bt1_Click;........................
bt2 = new Button();
bt2.Text = "CANCEL";
bt2.Location = new Point(140, 90);
...................bt2.Click += bt2_Click;...................
THIS BUTTON bt1.click and bt2.click function
void bt2_Click(object sender, EventArgs e)
{
Application.Exit();
}
void bt1_Click(object sender, EventArgs e)
{
Process.Start(tb1.Text);
}
}
}
this function should appear in business logic page but its coming in presentation logic page

Manoj BhoirRank #599 · 4K reputationPosted Jun 26, 2015, 8:50 AM EDT
btn1_click and btn2_click both are events and both should appear in presentation logic. You can move code you are writing inside these events in business layer and call this inside these events.
Julin James25 reputationPosted Jun 27, 2015, 8:13 AM EDT
Vignesh ManiRank #98 · 22.1K reputationPosted Jun 27, 2015, 10:51 AM EDT