private void CheckDuplicate()
        {
            if (!string.IsNullOrWhiteSpace(PONumberTextbox.Text) && SupplierDropdown.SelectedIndex != -1)
            {
                hasDuplicate = DuplicateChecker.CodeHasDuplicate(PONumberTextbox.Text.Trim(), PurchaseId, (int)SupplierDropdown.SelectedValue);
            }

            if (hasDuplicate)
            {
                PONumberTextbox.StateCommon.Content.Color1 = Color.Red;
            }
            else
            {
                PONumberTextbox.StateCommon.Content.Color1 = Color.Black;
            }
        }
        private void MemoTextbox_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(MemoTextbox.Text))
            {
                hasDuplicate = DuplicateChecker.CodeHasDuplicate(CodeType.PurchaseReturn, MemoTextbox.Text.Trim(), ReturnId);
            }

            if (hasDuplicate)
            {
                MemoTextbox.StateCommon.Content.Color1 = Color.Red;
            }
            else
            {
                MemoTextbox.StateCommon.Content.Color1 = Color.Black;
            }
        }
Beispiel #3
0
        private void UsernameTextbox_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(UsernameTextbox.Text))
            {
                hasDuplicate = DuplicateChecker.CodeHasDuplicate(CodeType.User, UsernameTextbox.Text.Trim(), UserId);
            }

            if (hasDuplicate)
            {
                UsernameTextbox.StateCommon.Content.Color1 = Color.Red;
            }
            else
            {
                UsernameTextbox.StateCommon.Content.Color1 = Color.Black;
            }
        }
Beispiel #4
0
        private void VoucherNumberTextbox_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(CounterNumberTextbox.Text))
            {
                hasDuplicate = DuplicateChecker.CodeHasDuplicate(CodeType.SalesPayment, CounterNumberTextbox.Text.Trim(), PurchaseCounterId);
            }

            if (hasDuplicate)
            {
                CounterNumberTextbox.StateCommon.Content.Color1 = Color.Red;
            }
            else
            {
                CounterNumberTextbox.StateCommon.Content.Color1 = Color.Black;
            }
        }
        private void InvoiceNumberTextbox_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(InvoiceNumberTextbox.Text))
            {
                hasDuplicate = DuplicateChecker.CodeHasDuplicate(CodeType.Sale, InvoiceNumberTextbox.Text.Trim(), SaleId);
            }

            if (hasDuplicate)
            {
                InvoiceNumberTextbox.StateCommon.Content.Color1 = Color.Red;
            }
            else
            {
                InvoiceNumberTextbox.StateCommon.Content.Color1 = Color.Black;
            }
        }
Beispiel #6
0
        private void BrandTextbox_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(BrandTextbox.Text))
            {
                hasDuplicate = DuplicateChecker.CodeHasDuplicate(CodeType.Brand, BrandTextbox.Text.Trim(), BrandId);
            }

            if (hasDuplicate)
            {
                BrandTextbox.ForeColor = Color.Red;
            }
            else
            {
                BrandTextbox.ForeColor = Color.Black;
            }
        }