Question for return to validateMe if there is an error validated.
private void tsbSave_Click(object sender, EventArgs e)
{
ValidateMe(); this for my error provider
1. Question how can i return in ValidateMe() if the field is error? n

ot continuing this line below...

try
{
DialogResult Mresult = MessageBox.Show("Do you want save this data?", "Message", MessageBoxButtons.YesNo);
if(Mresult == DialogResult.Yes)
{
// .........
}
else if (Mresult == DialogResult.No)
{
return;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
DisableField();
ClearField();
}
private void ValidateMe()
{
bool bValidIqama = ValidateIqama();
if (bValidIqama)
{
MessageBox.Show("Confirm");
}
else
MessageBox.Show("Please fill-up all the required information", "Required");
}

Nishant MittalRank #692 · 3.5K reputationPosted Jan 12, 2016, 11:11 PM EST
Nishant MittalRank #692 · 3.5K reputationPosted Jan 12, 2016, 8:45 PM EST
JomarMark Tamargo27 reputationPosted Jan 12, 2016, 10:59 PM EST
JomarMark Tamargo27 reputationPosted Jan 12, 2016, 11:07 PM EST