Common text box validation function for all the text boxes within the same form.
Using Sender parameter to handle.
private void textBoxLongStalk_Validating(object sender, CancelEventArgs e)
{
TextBox txt = sender as TextBox;
if (txt.Text != string.Empty)
{
if (isNumaric(txt) == false)
{
e.Cancel = true;
txt.Select(0, txt.Text.Length);
numaricError(txt);
}
if (isGraterThanSampleSize(txt) == true)
{
e.Cancel = true;
txt.Select(0, txt.Text.Length);
greaterThanSampleSizeError(txt);
}
displayRemainingBunchCount();
}
}
Subscribe to:
Post Comments (Atom)
Postgress - Read a XML file from a postgress table XML column
SELECT xmltable.* FROM xmldata, XMLTABLE('//ROWS/ROW' PASSING data COLUMNS id int PATH ...
-
if more than 65535 files in your temp folder, this error can occurs, To resolve this, remove all temporary files in C:/Windows/Temp ....
-
select upper(substr(CTY_CITY,1,1))|| substr(CTY_CITY,2,length(CTY_CITY)-1) as Ax from AGM_M_COUNTRY_CITY; update AGM_M_COUNTRY_CITY set ...
-
Common text box validation function for all the text boxes within the same form. Using Sender parameter to handle. private void tex...
No comments:
Post a Comment