コード例 #1
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableUserId.Checked)
        {
            string fromValueAsString = tbxUserIdMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(UserFields.UserId, Convert.ToInt32(opUserId.SelectedValue), chkNotUserId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnablePassword.Checked)
        {
            string fromValueAsString = tbxPasswordMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(UserFields.Password, Convert.ToInt32(opPassword.SelectedValue), chkNotPassword.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableFullName.Checked)
        {
            string fromValueAsString = tbxFullNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(UserFields.FullName, Convert.ToInt32(opFullName.SelectedValue), chkNotFullName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #2
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableCategoryId.Checked)
        {
            string fromValueAsString = tbxCategoryIdMiFrom.Text;
            string toValueAsString   = tbxCategoryIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(CategoryFields.CategoryId, Convert.ToInt32(opCategoryId.SelectedValue), chkNotCategoryId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCategoryName.Checked)
        {
            string fromValueAsString = tbxCategoryNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(CategoryFields.CategoryName, Convert.ToInt32(opCategoryName.SelectedValue), chkNotCategoryName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableDescription.Checked)
        {
            string fromValueAsString = tbxDescriptionMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(CategoryFields.Description, Convert.ToInt32(opDescription.SelectedValue), chkNotDescription.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #3
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableShipperId.Checked)
        {
            string fromValueAsString = tbxShipperIdMiFrom.Text;
            string toValueAsString   = tbxShipperIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ShipperFields.ShipperId, Convert.ToInt32(opShipperId.SelectedValue), chkNotShipperId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCompanyName.Checked)
        {
            string fromValueAsString = tbxCompanyNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(ShipperFields.CompanyName, Convert.ToInt32(opCompanyName.SelectedValue), chkNotCompanyName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnablePhone.Checked)
        {
            string fromValueAsString = tbxPhoneMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(ShipperFields.Phone, Convert.ToInt32(opPhone.SelectedValue), chkNotPhone.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #4
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableAuditActionTypeId.Checked)
        {
            string fromValueAsString = tbxAuditActionTypeIdMiFrom.Text;
            string toValueAsString   = tbxAuditActionTypeIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(AuditActionTypeFields.AuditActionTypeId, Convert.ToInt32(opAuditActionTypeId.SelectedValue), chkNotAuditActionTypeId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableName.Checked)
        {
            string fromValueAsString = tbxNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(AuditActionTypeFields.Name, Convert.ToInt32(opName.SelectedValue), chkNotName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableEmployeeId.Checked)
        {
            string fromValueAsString = tbxEmployeeIdMiFrom.Text;
            string toValueAsString   = tbxEmployeeIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(EmployeeTerritoryFields.EmployeeId, Convert.ToInt32(opEmployeeId.SelectedValue), chkNotEmployeeId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableTerritoryId.Checked)
        {
            string fromValueAsString = tbxTerritoryIdMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeTerritoryFields.TerritoryId, Convert.ToInt32(opTerritoryId.SelectedValue), chkNotTerritoryId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableCustomerTypeId.Checked)
        {
            string fromValueAsString = tbxCustomerTypeIdMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(CustomerDemographyFields.CustomerTypeId, Convert.ToInt32(opCustomerTypeId.SelectedValue), chkNotCustomerTypeId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCustomerDesc.Checked)
        {
            string fromValueAsString = tbxCustomerDescMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(CustomerDemographyFields.CustomerDesc, Convert.ToInt32(opCustomerDesc.SelectedValue), chkNotCustomerDesc.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #7
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableSupplierId.Checked)
        {
            string fromValueAsString = tbxSupplierIdMiFrom.Text;
            string toValueAsString   = tbxSupplierIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.SupplierId, Convert.ToInt32(opSupplierId.SelectedValue), chkNotSupplierId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCompanyName.Checked)
        {
            string fromValueAsString = tbxCompanyNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.CompanyName, Convert.ToInt32(opCompanyName.SelectedValue), chkNotCompanyName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableContactName.Checked)
        {
            string fromValueAsString = tbxContactNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.ContactName, Convert.ToInt32(opContactName.SelectedValue), chkNotContactName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableContactTitle.Checked)
        {
            string fromValueAsString = tbxContactTitleMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.ContactTitle, Convert.ToInt32(opContactTitle.SelectedValue), chkNotContactTitle.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableAddress.Checked)
        {
            string fromValueAsString = tbxAddressMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.Address, Convert.ToInt32(opAddress.SelectedValue), chkNotAddress.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCity.Checked)
        {
            string fromValueAsString = tbxCityMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.City, Convert.ToInt32(opCity.SelectedValue), chkNotCity.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableRegion.Checked)
        {
            string fromValueAsString = tbxRegionMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.Region, Convert.ToInt32(opRegion.SelectedValue), chkNotRegion.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnablePostalCode.Checked)
        {
            string fromValueAsString = tbxPostalCodeMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.PostalCode, Convert.ToInt32(opPostalCode.SelectedValue), chkNotPostalCode.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCountry.Checked)
        {
            string fromValueAsString = tbxCountryMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.Country, Convert.ToInt32(opCountry.SelectedValue), chkNotCountry.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnablePhone.Checked)
        {
            string fromValueAsString = tbxPhoneMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.Phone, Convert.ToInt32(opPhone.SelectedValue), chkNotPhone.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableFax.Checked)
        {
            string fromValueAsString = tbxFaxMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.Fax, Convert.ToInt32(opFax.SelectedValue), chkNotFax.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableHomePage.Checked)
        {
            string fromValueAsString = tbxHomePageMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(SupplierFields.HomePage, Convert.ToInt32(opHomePage.SelectedValue), chkNotHomePage.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #8
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableOrderId.Checked)
        {
            string fromValueAsString = tbxOrderIdMiFrom.Text;
            string toValueAsString   = tbxOrderIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.OrderId, Convert.ToInt32(opOrderId.SelectedValue), chkNotOrderId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCustomerId.Checked)
        {
            string fromValueAsString = tbxCustomerIdMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.CustomerId, Convert.ToInt32(opCustomerId.SelectedValue), chkNotCustomerId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableEmployeeId.Checked)
        {
            string fromValueAsString = tbxEmployeeIdMiFrom.Text;
            string toValueAsString   = tbxEmployeeIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.EmployeeId, Convert.ToInt32(opEmployeeId.SelectedValue), chkNotEmployeeId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableOrderDate.Checked)
        {
            object fromValue = dtxOrderDateMiFrom.Value;
            object toValue   = dtxOrderDateMiTo.Value;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.OrderDate, Convert.ToInt32(opOrderDate.SelectedValue), chkNotOrderDate.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableRequiredDate.Checked)
        {
            object fromValue = dtxRequiredDateMiFrom.Value;
            object toValue   = dtxRequiredDateMiTo.Value;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.RequiredDate, Convert.ToInt32(opRequiredDate.SelectedValue), chkNotRequiredDate.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShippedDate.Checked)
        {
            object fromValue = dtxShippedDateMiFrom.Value;
            object toValue   = dtxShippedDateMiTo.Value;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShippedDate, Convert.ToInt32(opShippedDate.SelectedValue), chkNotShippedDate.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipVia.Checked)
        {
            string fromValueAsString = tbxShipViaMiFrom.Text;
            string toValueAsString   = tbxShipViaMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipVia, Convert.ToInt32(opShipVia.SelectedValue), chkNotShipVia.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableFreight.Checked)
        {
            string fromValueAsString = tbxFreightMiFrom.Text;
            string toValueAsString   = tbxFreightMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.Freight, Convert.ToInt32(opFreight.SelectedValue), chkNotFreight.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipName.Checked)
        {
            string fromValueAsString = tbxShipNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipName, Convert.ToInt32(opShipName.SelectedValue), chkNotShipName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipAddress.Checked)
        {
            string fromValueAsString = tbxShipAddressMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipAddress, Convert.ToInt32(opShipAddress.SelectedValue), chkNotShipAddress.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipCity.Checked)
        {
            string fromValueAsString = tbxShipCityMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipCity, Convert.ToInt32(opShipCity.SelectedValue), chkNotShipCity.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipRegion.Checked)
        {
            string fromValueAsString = tbxShipRegionMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipRegion, Convert.ToInt32(opShipRegion.SelectedValue), chkNotShipRegion.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipPostalCode.Checked)
        {
            string fromValueAsString = tbxShipPostalCodeMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipPostalCode, Convert.ToInt32(opShipPostalCode.SelectedValue), chkNotShipPostalCode.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableShipCountry.Checked)
        {
            string fromValueAsString = tbxShipCountryMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(OrderFields.ShipCountry, Convert.ToInt32(opShipCountry.SelectedValue), chkNotShipCountry.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #9
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableOrderId.Checked)
        {
            string fromValueAsString = tbxOrderIdMiFrom.Text;
            string toValueAsString   = tbxOrderIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderDetailFields.OrderId, Convert.ToInt32(opOrderId.SelectedValue), chkNotOrderId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableProductId.Checked)
        {
            string fromValueAsString = tbxProductIdMiFrom.Text;
            string toValueAsString   = tbxProductIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderDetailFields.ProductId, Convert.ToInt32(opProductId.SelectedValue), chkNotProductId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableUnitPrice.Checked)
        {
            string fromValueAsString = tbxUnitPriceMiFrom.Text;
            string toValueAsString   = tbxUnitPriceMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderDetailFields.UnitPrice, Convert.ToInt32(opUnitPrice.SelectedValue), chkNotUnitPrice.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableQuantity.Checked)
        {
            string fromValueAsString = tbxQuantityMiFrom.Text;
            string toValueAsString   = tbxQuantityMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderDetailFields.Quantity, Convert.ToInt32(opQuantity.SelectedValue), chkNotQuantity.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableDiscount.Checked)
        {
            string fromValueAsString = tbxDiscountMiFrom.Text;
            string toValueAsString   = tbxDiscountMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(OrderDetailFields.Discount, Convert.ToInt32(opDiscount.SelectedValue), chkNotDiscount.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #10
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableAuditInfoId.Checked)
        {
            string fromValueAsString = tbxAuditInfoIdMiFrom.Text;
            string toValueAsString   = tbxAuditInfoIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(AuditInfoFields.AuditInfoId, Convert.ToInt32(opAuditInfoId.SelectedValue), chkNotAuditInfoId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableActionDateTime.Checked)
        {
            object fromValue = dtxActionDateTimeMiFrom.Value;
            object toValue   = dtxActionDateTimeMiTo.Value;
            toAdd = GeneralUtils.CreatePredicate(AuditInfoFields.ActionDateTime, Convert.ToInt32(opActionDateTime.SelectedValue), chkNotActionDateTime.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableAffectedEntityName.Checked)
        {
            string fromValueAsString = tbxAffectedEntityNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(AuditInfoFields.AffectedEntityName, Convert.ToInt32(opAffectedEntityName.SelectedValue), chkNotAffectedEntityName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableAuditActionTypeId.Checked)
        {
            string fromValueAsString = tbxAuditActionTypeIdMiFrom.Text;
            string toValueAsString   = tbxAuditActionTypeIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(AuditInfoFields.AuditActionTypeId, Convert.ToInt32(opAuditActionTypeId.SelectedValue), chkNotAuditActionTypeId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableActionData.Checked)
        {
            string fromValueAsString = tbxActionDataMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(AuditInfoFields.ActionData, Convert.ToInt32(opActionData.SelectedValue), chkNotActionData.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableUserId.Checked)
        {
            string fromValueAsString = tbxUserIdMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(AuditInfoFields.UserId, Convert.ToInt32(opUserId.SelectedValue), chkNotUserId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #11
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableEmployeeId.Checked)
        {
            string fromValueAsString = tbxEmployeeIdMiFrom.Text;
            string toValueAsString   = tbxEmployeeIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.EmployeeId, Convert.ToInt32(opEmployeeId.SelectedValue), chkNotEmployeeId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableLastName.Checked)
        {
            string fromValueAsString = tbxLastNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.LastName, Convert.ToInt32(opLastName.SelectedValue), chkNotLastName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableFirstName.Checked)
        {
            string fromValueAsString = tbxFirstNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.FirstName, Convert.ToInt32(opFirstName.SelectedValue), chkNotFirstName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableTitle.Checked)
        {
            string fromValueAsString = tbxTitleMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.Title, Convert.ToInt32(opTitle.SelectedValue), chkNotTitle.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableTitleOfCourtesy.Checked)
        {
            string fromValueAsString = tbxTitleOfCourtesyMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.TitleOfCourtesy, Convert.ToInt32(opTitleOfCourtesy.SelectedValue), chkNotTitleOfCourtesy.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableBirthDate.Checked)
        {
            object fromValue = dtxBirthDateMiFrom.Value;
            object toValue   = dtxBirthDateMiTo.Value;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.BirthDate, Convert.ToInt32(opBirthDate.SelectedValue), chkNotBirthDate.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableHireDate.Checked)
        {
            object fromValue = dtxHireDateMiFrom.Value;
            object toValue   = dtxHireDateMiTo.Value;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.HireDate, Convert.ToInt32(opHireDate.SelectedValue), chkNotHireDate.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableAddress.Checked)
        {
            string fromValueAsString = tbxAddressMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.Address, Convert.ToInt32(opAddress.SelectedValue), chkNotAddress.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCity.Checked)
        {
            string fromValueAsString = tbxCityMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.City, Convert.ToInt32(opCity.SelectedValue), chkNotCity.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableRegion.Checked)
        {
            string fromValueAsString = tbxRegionMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.Region, Convert.ToInt32(opRegion.SelectedValue), chkNotRegion.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnablePostalCode.Checked)
        {
            string fromValueAsString = tbxPostalCodeMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.PostalCode, Convert.ToInt32(opPostalCode.SelectedValue), chkNotPostalCode.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCountry.Checked)
        {
            string fromValueAsString = tbxCountryMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.Country, Convert.ToInt32(opCountry.SelectedValue), chkNotCountry.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableHomePhone.Checked)
        {
            string fromValueAsString = tbxHomePhoneMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.HomePhone, Convert.ToInt32(opHomePhone.SelectedValue), chkNotHomePhone.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableExtension.Checked)
        {
            string fromValueAsString = tbxExtensionMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.Extension, Convert.ToInt32(opExtension.SelectedValue), chkNotExtension.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableNotes.Checked)
        {
            string fromValueAsString = tbxNotesMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.Notes, Convert.ToInt32(opNotes.SelectedValue), chkNotNotes.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableReportsTo.Checked)
        {
            string fromValueAsString = tbxReportsToMiFrom.Text;
            string toValueAsString   = tbxReportsToMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.ReportsTo, Convert.ToInt32(opReportsTo.SelectedValue), chkNotReportsTo.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnablePhotoPath.Checked)
        {
            string fromValueAsString = tbxPhotoPathMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(EmployeeFields.PhotoPath, Convert.ToInt32(opPhotoPath.SelectedValue), chkNotPhotoPath.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }
コード例 #12
0
    /// <summary>
    /// Handles the Click event of the btnSearchSubSet control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnSearchSubSet_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        _filter = new PredicateExpression();
        IPredicate toAdd = null;

        if (chkEnableProductId.Checked)
        {
            string fromValueAsString = tbxProductIdMiFrom.Text;
            string toValueAsString   = tbxProductIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.ProductId, Convert.ToInt32(opProductId.SelectedValue), chkNotProductId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableProductName.Checked)
        {
            string fromValueAsString = tbxProductNameMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.ProductName, Convert.ToInt32(opProductName.SelectedValue), chkNotProductName.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableSupplierId.Checked)
        {
            string fromValueAsString = tbxSupplierIdMiFrom.Text;
            string toValueAsString   = tbxSupplierIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.SupplierId, Convert.ToInt32(opSupplierId.SelectedValue), chkNotSupplierId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableCategoryId.Checked)
        {
            string fromValueAsString = tbxCategoryIdMiFrom.Text;
            string toValueAsString   = tbxCategoryIdMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.CategoryId, Convert.ToInt32(opCategoryId.SelectedValue), chkNotCategoryId.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableQuantityPerUnit.Checked)
        {
            string fromValueAsString = tbxQuantityPerUnitMiFrom.Text;
            string toValueAsString   = string.Empty;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.QuantityPerUnit, Convert.ToInt32(opQuantityPerUnit.SelectedValue), chkNotQuantityPerUnit.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableUnitPrice.Checked)
        {
            string fromValueAsString = tbxUnitPriceMiFrom.Text;
            string toValueAsString   = tbxUnitPriceMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.UnitPrice, Convert.ToInt32(opUnitPrice.SelectedValue), chkNotUnitPrice.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableUnitsInStock.Checked)
        {
            string fromValueAsString = tbxUnitsInStockMiFrom.Text;
            string toValueAsString   = tbxUnitsInStockMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.UnitsInStock, Convert.ToInt32(opUnitsInStock.SelectedValue), chkNotUnitsInStock.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableUnitsOnOrder.Checked)
        {
            string fromValueAsString = tbxUnitsOnOrderMiFrom.Text;
            string toValueAsString   = tbxUnitsOnOrderMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.UnitsOnOrder, Convert.ToInt32(opUnitsOnOrder.SelectedValue), chkNotUnitsOnOrder.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableReorderLevel.Checked)
        {
            string fromValueAsString = tbxReorderLevelMiFrom.Text;
            string toValueAsString   = tbxReorderLevelMiTo.Text;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.ReorderLevel, Convert.ToInt32(opReorderLevel.SelectedValue), chkNotReorderLevel.Checked,
                                                 fromValueAsString, toValueAsString);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (chkEnableDiscontinued.Checked)
        {
            object fromValue = chkDiscontinuedMiFrom.Checked;
            object toValue   = null;
            toAdd = GeneralUtils.CreatePredicate(ProductFields.Discontinued, Convert.ToInt32(opDiscontinued.SelectedValue), chkNotDiscontinued.Checked,
                                                 fromValue, toValue);
            if (toAdd != null)
            {
                _filter.Add(toAdd);
            }
        }
        if (SearchClicked != null)
        {
            SearchClicked(this, new EventArgs());
        }
    }