C# Class Com.Aote.ObjectTools.SearchObject

查询条件对象,有一个Condition属性,表示最后产生的字符串形式的条件结果,该字符串是按照HQL语句 要求的形式制作的,为了书写方便,在配置中,小于号用"^"代替了,把条件给最终结果时,注意转换。 在查询时,如果条件没有发生变化,采用添加空格的方式,迫使条件发生变化,以便每次点击查询按钮都能起作用。 为了方便配置,如果没有输入查询条件,则条件设置成 1=1 当成条件为真进行处理。
Inheritance: CustomTypeHelper, IName
Show file Open project: DuBin1988/restv2 Class Usage Examples

Public Properties

Property Type Description
CanSearchProperty System.Windows.DependencyProperty

Public Methods

Method Description
New ( ) : void
NewPropertyValue ( string propertyName ) : void
Search ( ) : void

产生查询条件,把输入的内容,根据配置转换成完整的HQL的条件格式。各输入内容用“and”连接。 如果条件没有发生变化,通过添加空格的方式迫使其变化。 如果没有条件,设置条件为 1=1 当做条件为真处理。

SearchClear ( ) : void

清空查询对象,用于界面上置空操作

Private Methods

Method Description
GetCondition ( string name, object value ) : string

获取某个输入字段转换出来的条件,如果没有设置,则默认为字段名=输入内容

OnCanSearchChanged ( DependencyObject dp, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Method Details

New() public method

public New ( ) : void
return void

NewPropertyValue() public method

public NewPropertyValue ( string propertyName ) : void
propertyName string
return void

Search() public method

产生查询条件,把输入的内容,根据配置转换成完整的HQL的条件格式。各输入内容用“and”连接。 如果条件没有发生变化,通过添加空格的方式迫使其变化。 如果没有条件,设置条件为 1=1 当做条件为真处理。
public Search ( ) : void
return void

SearchClear() public method

清空查询对象,用于界面上置空操作
public SearchClear ( ) : void
return void

Property Details

CanSearchProperty public static property

public static DependencyProperty,System.Windows CanSearchProperty
return System.Windows.DependencyProperty