本文整理汇总了C#中Select.ExecuteDataSet方法的典型用法代码示例。如果您正苦于以下问题:C# Select.ExecuteDataSet方法的具体用法?C# Select.ExecuteDataSet怎么用?C# Select.ExecuteDataSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Select
的用法示例。
在下文中一共展示了Select.ExecuteDataSet方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
}
示例2: bind_orders_to_container
/// <summary>
/// datebinding for orders grid
/// </summary>
/// <param name="containerid">int id of current container from formview</param>
protected void bind_orders_to_container(int containerid)
{
string[] _cols = { "ContainerSubTable.ContainerSubID", "ContainerSubTable.ContainerID", "ContainerSubTable.OrderNumber", "ContainerSubTable.Packages",
"ContainerSubTable.PackageTypeID", "PackageTypeTable.PackageType", "ContainerSubTable.Weight", "ContainerSubTable.Cbm", "ContainerSubTable.OrderID" };
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.ContainerSubTable).
LeftOuterJoin(DAL.Logistics.PackageTypeTable.PackageTypeIDColumn, DAL.Logistics.ContainerSubTable.PackageTypeIDColumn).
Where(DAL.Logistics.ContainerSubTable.ContainerIDColumn).IsEqualTo(containerid);
DataTable _tbl = _qry.ExecuteDataSet().Tables[0];
this.dxgrdContainerOrders.DataSource = _tbl;
this.dxgrdContainerOrders.KeyFieldName = "ContainerSubID";
this.dxgrdContainerOrders.DataBind();
}
示例3: 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;
}
}
示例4: HoanTatBenhNhan
private void HoanTatBenhNhan()
{
SqlQuery sql =
new Select().From(TTestInfo.Schema.Name).Where(TTestInfo.Columns.SentStatus).IsEqualTo(1).And(
TTestInfo.Columns.PatientId).IsEqualTo(
Utility.Int32Dbnull(grdPatients.GetValue("Patient_ID")));
DataTable dataTable = sql.ExecuteDataSet().Tables[0];
SqlQuery sql1 =
new Select().From(TTestInfo.Schema.Name).Where(TTestInfo.Columns.PatientId).
IsEqualTo(Utility.Int32Dbnull(grdPatients.GetValue("Patient_ID")));
DataTable dataTable1 = sql1.ExecuteDataSet().Tables[0];
int countTestID = dataTable1.Rows.Count;
int countSentStatus = dataTable.Rows.Count;
if (countSentStatus == countTestID)
{
new Update(LPatientInfo.Schema.Name).Set(LPatientInfo.Columns.IsFinal).EqualTo(1).Where(
LPatientInfo.Columns.PatientId).IsEqualTo(
Utility.Int32Dbnull(grdPatients.GetValue("Patient_ID"))).Execute();
grdPatients.SetValue("IsFinal", 1);
grdPatients.UpdateData();
mv_DTPatientInfor.AcceptChanges();
grdResultDetail.AllowEdit = InheritableBoolean.True;
}
else
{
new Update(LPatientInfo.Schema.Name).Set(LPatientInfo.Columns.IsFinal).EqualTo(0).Where(
LPatientInfo.Columns.PatientId).IsEqualTo(
Utility.Int32Dbnull(grdPatients.GetValue("Patient_ID"))).Execute();
grdPatients.SetValue("IsFinal", 0);
grdPatients.UpdateData();
mv_DTPatientInfor.AcceptChanges();
grdResultDetail.AllowEdit = InheritableBoolean.True;
}
}
示例5: bind_cbo_contact
//end bind currency type
/// <summary>
/// databind final destination list when country is selected
/// </summary>
protected void bind_cbo_contact()
{
//check controlling office id
Int32 _cid = Page.Session["user"] != null ? (Int32)((UserClass)Page.Session["user"]).controlOfficeId : 1; //default 1 - liverpool office?
Int32 _oid = _cid >= 1? _cid: 1;
if (_oid > 0)
{
string[] _cols = { "EmployeeID, Name, EmailAddress" };
string[] _order = { "Name" };
SqlQuery _qry = new Select(_cols).From(DAL.Logistics.Tables.EmployeesTable).Where("OfficeID").IsEqualTo(_oid).And("Live").IsEqualTo(true).And("EmailAddress").IsNotNull().OrderAsc(_order) ;
//EmployeesTableCollection _contacts = new EmployeesTableCollection();
//_contacts.LoadAndCloseReader(_qry.ExecuteReader());
DataSet _dt = (DataSet)_qry.ExecuteDataSet(); // _contacts.ToDataTable();
this.dxcbocontact.DataSource = _dt;
this.dxcbocontact.ValueField = "EmailAddress";
this.dxcbocontact.TextField = "Name";
this.dxcbocontact.DataBind();
}
}
示例6: 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);
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();
}
}
示例7: dxcboDestControl_ItemRequestedByValue
/// <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.fmvAddresses.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);
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();
}
}