Can we write two events in one button?
Means, As a user I had filled one form and then I have click submit button. On that button I had written one event that:This whole form will go to the admin user. On that form admin user will select one item from drop-down which is hide for 1st user. Now,the admin user will click the submit button. And on that click event the form will be sent to the higher authority for approval.
My question is Admin is clicking the same button which clicked by 1st user. So, how can I differentiate the event in only one button.
That 1st time it will go to the admin and 2nd time it will go to the higher authority.

Sam HobbsPosted Mar 11, 2011, 2:14 AM
Sahil JaniPosted Mar 11, 2011, 1:00 AM
Thnks for giving me code. Actully, your code is working but my requirements is not being ful-filled.
Sahil JaniPosted Mar 11, 2011, 12:43 AM
My form is not depending upon the role base activity.
This form is accessed by all to fill-up. And I have only one button in that form on which I have to perform two activities one after the other.
So, is there any solution with you to do this thing?
Please help me regarding this.
Suthish NairPosted Mar 10, 2011, 1:55 PM
FroglegPosted Mar 10, 2011, 12:19 AM
bool firstClick = false;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (firstClick == false)
{
firstClick = true;
MessageBox.Show("First click");
}
else
{
firstClick = false;
MessageBox.Show("Second click");
}
}
}