本文整理汇总了C#中Staff.SelectSQL方法的典型用法代码示例。如果您正苦于以下问题:C# Staff.SelectSQL方法的具体用法?C# Staff.SelectSQL怎么用?C# Staff.SelectSQL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff.SelectSQL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SearchData
protected void SearchData()
{
String dat = txt_contractStartDate.Text;
//String tim = txt_happen_Time.Text;
Staff _operator = new Staff("Company");
string condition = " WHERE 1=1";
if (txt_Query_Reason.Text != "")
{
condition += " AND MaterialName like '%" + txt_Query_Reason.Text.Trim() + "%' ";
}
if (dat != "" )
{
condition += " AND (RelnventoryDate BETWEEN '" + dat + " 00:00:00' AND '" + dat + " 23:59:59')";
}
//condition += query_company;
DataSet ds = _operator.SelectSQL("SELECT * FROM [MROS].[dbo].[ICS_ReInventory] " + condition + " ORDER BY [RelnventoryDate] DESC ");
Session["DS_INT"] = ds;
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
gv.DataSource = ds;
gv.DataBind();
}
示例2: SearchData
protected void SearchData()
{
Staff _operator = new Staff("Company");
string conditionName = ddlst_SearchType.SelectedValue;
string condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " WHERE " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' " : "");
//condition += query_company;
DataSet ds = _operator.SelectSQL("SELECT [MaterialID],[MaterialName],[Quantity],[MaterialCost] FROM [View_ICS_Inventory] " + condition + " ");
Session["DS_INT"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
}