Exemple #1
0
 private void txtbFAX_TextChanged(object sender, EventArgs e)
 {
     if (!MyRegEx.Validate(txtbFAX.Text, MyRegEx.OnlyDigits) && txtbFAX.Text != string.Empty)
     {
         errorPCustomer.SetError(txtbFAX, "רק ספרות");
     }
     else
     {
         errorPCustomer.SetError(txtbFAX, string.Empty);
     }
 }
Exemple #2
0
 private void txtbAddress_TextChanged(object sender, EventArgs e)
 {
     if (!MyRegEx.Validate(txtbAddress.Text, MyRegEx.OnlyCharsSpacesAndApostropheDigitsHebrew) && txtbAddress.Text != string.Empty)
     {
         errorPCustomer.SetError(txtbAddress, "רק אותיות גרש ורווחים מותרים");
     }
     else
     {
         errorPCustomer.SetError(txtbAddress, string.Empty);
     }
 }
Exemple #3
0
 private void txtbEmail_TextChanged(object sender, EventArgs e)
 {
     if (!MyRegEx.Validate(txtbEmail.Text, MyRegEx.OnlyFormatEmail) && txtbEmail.Text != string.Empty)
     {
         errorPCustomer.SetError(txtbEmail, "חייב להיות מבנה של מייל");
     }
     else
     {
         errorPCustomer.SetError(txtbEmail, string.Empty);
     }
 }
        /*  private void UpdateOrAddAttachment(tblAttachments attachment)
         * {
         *    var objFileStream = new FileStream(FileName, FileMode.Open, FileAccess.Read);
         *    int intLength = Convert.ToInt32(objFileStream.Length);
         *    const int threeMega = 3145728;
         *    if (intLength > threeMega)
         *    {
         *        MessageBox.Show("The selected file is larger than 3 MB!!!", "Big File", MessageBoxButtons.OK,
         *                        MessageBoxIcon.Warning);
         *        return;
         *    }
         *
         *    byte[] objData;
         *    objData = new byte[intLength];
         *    string[] strPath = FileName.Split(Convert.ToChar(@"\"));
         *    objFileStream.Read(objData, 0, intLength);
         *    objFileStream.Close();
         *    attachment.fileName = strPath[strPath.Length - 1]; //clip the full path - we just want last part!
         *    attachment.fileSize = intLength/1024; // KB instead of bytes
         *    attachment.attachment = objData; //our file
         * }*/

        private void txtbPriceType_TextChanged(object sender, EventArgs e)
        {
            if (!MyRegEx.Validate(txtbPriceType.Text, MyRegEx.OnlyCharsSpacesAndApostropheDigitsHebrew))
            {
                epManageProjectToCompany.SetError(txtbPriceType, "קלט לא חוקי");
                _canAdd = false;
            }
            else
            {
                epManageProjectToCompany.SetError(txtbPriceType, string.Empty);
                _canAdd = true;
            }
            EnableAdd();
        }
Exemple #5
0
 private void txtbCompanyNumber_TextChanged(object sender, EventArgs e)
 {
     if (!MyRegEx.Validate(txtbCompanyNumber.Text, MyRegEx.OnlyFiveDigits))
     {
         errorPCustomer.SetError(txtbCompanyNumber, "רק ספרות");
         canAdd = false;
     }
     else
     {
         errorPCustomer.SetError(txtbCompanyNumber, string.Empty);
         canAdd = true;
     }
     EnableAdd();
 }
Exemple #6
0
 private void txtbcompanyName_TextChanged(object sender, EventArgs e)
 {
     if (!MyRegEx.Validate(txtbcompanyName.Text, MyRegEx.OnlyCharsSpacesAndApostropheDigitsHebrew))
     {
         errorPCustomer.SetError(txtbcompanyName, "רק אותיות גרש ורווחים מותרים");
         canAdd = false;
     }
     else
     {
         errorPCustomer.SetError(txtbcompanyName, string.Empty);
         canAdd = true;
     }
     EnableAdd();
 }