private void txtProductName_Leave(object sender, EventArgs e)
        {
            if (txtProductName.GetString().Length == 0)
            {
                return;
            }

            if (ProductImplementation.FindByProductName(txtProductName.GetString(), productData.Id) != null)
            {
                "Duplicate Product Name!".ShowInformation();
                txtProductName.Text = "";
                txtProductName.Focus();
            }
        }
        private void txtProductName_Leave(object sender, EventArgs e)
        {
            invoiceDetail.ProductData   = null;
            invoiceDetail.ProductDataId = 0;
            if (txtProductName.GetStringLength() == 0)
            {
                return;
            }

            invoiceDetail.ProductData = ProductImplementation.FindByProductName(txtProductName.GetString());
            if (invoiceDetail.ProductData == null)
            {
                "Please Enter Valid Product Name".ShowError();
                return;
            }
            invoiceDetail.ProductDataId = invoiceDetail.ProductData.Id;
            txtProductName.Text         = invoiceDetail.ProductName;
            if (operationType == OperationType.New)
            {
                txtSalesRate.Value = (decimal)invoiceDetail.ProductData.SalesRate;
                txtGstRate.Value   = (decimal)invoiceDetail.ProductData.GstRate;
            }
        }