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 MittalPosted Jan 13, 2016, 4:11 AM
JomarMark TamargoPosted Jan 13, 2016, 4:07 AM
JomarMark TamargoPosted Jan 13, 2016, 3:59 AM
Nishant MittalPosted Jan 13, 2016, 1:45 AM