本文整理汇总了C#中Select.And方法的典型用法代码示例。如果您正苦于以下问题:C# Select.And方法的具体用法?C# Select.And怎么用?C# Select.And使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Select
的用法示例。
在下文中一共展示了Select.And方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: dxcboDestControl_ItemsRequestedByFilterCondition
protected void dxcboDestControl_ItemsRequestedByFilterCondition(object source, ListEditItemsRequestedByFilterConditionEventArgs e)
{
ASPxComboBox _combo = (ASPxComboBox)source;
if (_combo != null)
{
string[] _cols = { "EmployeesTable.EmployeeID, EmployeesTable.Name", "EmployeesTable.DepartmentID", "OfficeTable.OfficeID", " NameAndAddressBook.CompanyID" };
string[] _order = { "Name" };
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).
InnerJoin(DAL.Logistics.OfficeTable.OfficeIDColumn, DAL.Logistics.EmployeesTable.OfficeIDColumn).
InnerJoin(DAL.Logistics.NameAndAddressBook.CountryIDColumn, DAL.Logistics.OfficeTable.CountryIDColumn);
_qry.And(DAL.Logistics.EmployeesTable.LiveColumn).IsEqualTo(true).OrderAsc(_order);
IDataReader _rd1 = _qry.ExecuteReader();
_combo.DataSource = _rd1;
_combo.ValueField = "EmployeeID";
_combo.ValueType = typeof(int);
_combo.TextField = "Name";
_combo.DataBindItems();
}
}
示例2: dxcboDestControl_ItemRequestedByValue
//end incremental filtering agentarorigin
/// <summary>
/// destinatiobn controller
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
protected void dxcboDestControl_ItemRequestedByValue(object source, ListEditItemRequestedByValueEventArgs e)
{
ASPxComboBox _combo = (ASPxComboBox)source;
ASPxComboBox _destinationagent = (ASPxComboBox)this.fmvTemplate.FindControl("dxcboAgentAtDestinationIDEdit");
if (_combo != null)
{
string[] _cols = { "EmployeesTable.EmployeeID, EmployeesTable.Name", "EmployeesTable.DepartmentID", "OfficeTable.OfficeID", " NameAndAddressBook.CompanyID" };
string[] _order = { "Name" };
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).
InnerJoin(DAL.Logistics.OfficeTable.OfficeIDColumn, DAL.Logistics.EmployeesTable.OfficeIDColumn).
InnerJoin(DAL.Logistics.NameAndAddressBook.CountryIDColumn, DAL.Logistics.OfficeTable.CountryIDColumn);
if (_destinationagent != null && _destinationagent.SelectedItem != null && _destinationagent.Value != null)
{
int _filter = wwi_func.vint(_destinationagent.SelectedItem.GetValue("CountryID").ToString());
if (_filter > 0) { _qry.Where("CountryID").IsEqualTo(_filter); }
}
_qry.And(DAL.Logistics.EmployeesTable.LiveColumn).IsEqualTo(true).OrderAsc(_order);
IDataReader _rd1 = _qry.ExecuteReader();
_combo.DataSource = _rd1;
_combo.ValueField = "EmployeeID";
_combo.ValueType = typeof(int);
_combo.TextField = "Name";
_combo.DataBindItems();
}
}
示例3: bind_destination_controller
//end bind origin port controller
protected void bind_destination_controller(string destinationAgentID)
{
ASPxComboBox _combo = (ASPxComboBox)this.fmvTemplate.FindControl("dxcboDestinationPortControllerID");
if (_combo != null)
{
string[] _cols = { "EmployeesTable.EmployeeID, EmployeesTable.Name", "EmployeesTable.DepartmentID", "OfficeTable.OfficeID"};
string[] _order = { "Name" };
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).
InnerJoin(DAL.Logistics.OfficeTable.OfficeIDColumn, DAL.Logistics.EmployeesTable.OfficeIDColumn);
if (!string.IsNullOrEmpty(destinationAgentID))
{
int _filter = wwi_func.vint(destinationAgentID);
_qry.Where("OfficeID").IsEqualTo(_filter);
}
_qry.And(DAL.Logistics.EmployeesTable.LiveColumn).IsEqualTo(true).OrderAsc(_order);
DataTable _dt = _qry.ExecuteDataSet().Tables[0];
IDataReader _rd1 = _qry.ExecuteReader();
_combo.DataSource = _rd1;
_combo.ValueField = "EmployeeID";
_combo.ValueType = typeof(int);
_combo.TextField = "Name";
_combo.DataBindItems();
}
}
示例4: bind_origin_controller
protected void bind_origin_controller(string originAgentID)
{
//260211 some older jobs have an origin controller but no origin agent in those cases don't display the origin controller
//must have a filter or display nothing
if (!string.IsNullOrEmpty(originAgentID))
{
ASPxComboBox _dxcboController = (ASPxComboBox)this.fmvTemplate.FindControl("dxcboOriginPortControllerID");
if (_dxcboController != null)
{
string[] _cols = { "EmployeesTable.EmployeeID, EmployeesTable.Name", "EmployeesTable.DepartmentID", "OfficeTable.OfficeID", " NameAndAddressBook.CompanyID" };
string[] _order = { "Name" };
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).
InnerJoin(DAL.Logistics.OfficeTable.OfficeIDColumn, DAL.Logistics.EmployeesTable.OfficeIDColumn).
InnerJoin(DAL.Logistics.NameAndAddressBook.CountryIDColumn, DAL.Logistics.OfficeTable.CountryIDColumn);
if (!string.IsNullOrEmpty(originAgentID))
{
int _filter = wwi_func.vint(originAgentID);
if (_filter > 0) { _qry.Where("CompanyID").IsEqualTo(_filter); }
}
_qry.And(DAL.Logistics.EmployeesTable.LiveColumn).IsEqualTo(true).OrderAsc(_order);
IDataReader _rd1 = _qry.ExecuteReader();
_dxcboController.DataSource = _rd1;
_dxcboController.ValueField = "EmployeeID";
_dxcboController.ValueType = typeof(int);
_dxcboController.TextField = "Name";
_dxcboController.DataBindItems();
}
}
}
示例5: Laydanhmuckhoa
public static DataTable Laydanhmuckhoa(string NoitruNgoaitru, int PhongChucnang)
{
try
{
SqlQuery sqlQuery = new Select().From(VDmucKhoaphong.Schema).Where(VDmucKhoaphong.Columns.KieuKhoaphong).IsEqualTo("KHOA");
if (PhongChucnang > -1)
sqlQuery.And(VDmucKhoaphong.Columns.PhongChucnang).IsEqualTo(PhongChucnang);
if (NoitruNgoaitru != "ALL")
sqlQuery.And(VDmucKhoaphong.Columns.NoitruNgoaitru).IsEqualTo(NoitruNgoaitru);
return sqlQuery.ExecuteDataSet().Tables[0];
}
catch
{
return null;
}
}
示例6: bind_destination_controller
protected void bind_destination_controller(int countryId)
{
ASPxComboBox _combo = (ASPxComboBox)this.fmvAddresses.FindControl("dxcboDestinationPortControllerIDEdit");
if (_combo != null)
{
string[] _cols = { "EmployeesTable.EmployeeID, EmployeesTable.Name", "EmployeesTable.DepartmentID", "OfficeTable.OfficeID"};
string[] _order = { "Name" };
//don't need nameandaddressbook as get countryid from officetable
//SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).
// InnerJoin(DAL.Logistics.OfficeTable.OfficeIDColumn, DAL.Logistics.EmployeesTable.OfficeIDColumn).
// InnerJoin(DAL.Logistics.NameAndAddressBook.CountryIDColumn, DAL.Logistics.OfficeTable.CountryIDColumn);
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).
InnerJoin(DAL.Logistics.OfficeTable.OfficeIDColumn, DAL.Logistics.EmployeesTable.OfficeIDColumn);
if (countryId > 0)
{
_qry.Where("CountryID").IsEqualTo(countryId);
}
_qry.And(DAL.Logistics.EmployeesTable.LiveColumn).IsEqualTo(1).OrderAsc(_order);
//string _q = _qry.ToString(); //fo testing
//DataTable _dt = _qry.ExecuteDataSet().Tables[0]; //for testing
IDataReader _rd1 = _qry.ExecuteReader();
_combo.DataSource = _rd1;
_combo.ValueField = "EmployeeID";
_combo.ValueType = typeof(int);
_combo.TextField = "Name";
_combo.DataBindItems();
}
}