本文整理汇总了C#中Staff.Select方法的典型用法代码示例。如果您正苦于以下问题:C# Staff.Select方法的具体用法?C# Staff.Select怎么用?C# Staff.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff.Select方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SearchData
protected void SearchData()
{
//string query_company = GetCompanyScope();
Staff _operator = new Staff("View_DeviceConfig");
string conditionName = ddlst_SearchType.SelectedValue;
string condition = "";
//若查詢日期則把模糊查詢like改為=
if (conditionName == "ContractStartDate" || conditionName == "ContractEndDate")
{
condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " = '" + txt_Query_Reason.Text.Trim() + "' " : "");
}
else
{
condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' " : "");
}
DataSet ds = _operator.Select(condition, "", "View_DeviceConfig");
Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
//for (int i = 0; i < gv.Rows.Count; i++)
//{
// if (gv.Rows[i].Cells[10].Text.Trim().Equals("True"))
// gv.Rows[i].Cells[10].Text = "男";
// else
// gv.Rows[i].Cells[10].Text = "女";
//}
}
示例2: SearchData
protected void SearchData()
{
gv_stockOutitem.DataSource = null;
gv_stockOutitem.DataBind();
lbl_stockitem.Visible = false;
//string query_company = GetCompanyScope();
Staff _operator = new Staff("View_ICS_StockOut_Record");
string conditionName = ddlst_SearchType.SelectedValue;
StringBuilder condition = new StringBuilder(txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' AND " : "");
//condition += query_company;
if (txt_startDateTime.Text.Length > 0 )
{
condition.Append(" StockOutDate >= '" + txt_startDateTime.Text + "' ");
}
if (txt_endDateTime.Text.Length > 0)
{
condition.Append("and StockOutDate <= '" + txt_endDateTime.Text + "' ");
}
DataSet ds = _operator.Select(condition.ToString(), "StockOutDate desc");
//Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
lbl_stockitem.Visible = true;
lbl_stockitem.Text = "查詢無資料";
}
}
示例3: SearchData
protected void SearchData()
{
//string query_company = GetCompanyScope();
Staff _operator = new Staff("View_ParkingRepairMaintainList");
string conditionName = ddlst_SearchType.SelectedValue;
StringBuilder condition = new StringBuilder();
if (conditionName.Equals("NotifyDate") || conditionName.Equals("RepairDeadline") || conditionName.Equals("RepairDate"))
{
if (txt_StartDate.Text.Length > 0 && txt_EndDate.Text.Length > 0)
{
condition.Append(conditionName + "> '" + txt_StartDate.Text + "' AND " + conditionName + "< '" + txt_EndDate.Text + "' AND");
}
else
{
if (txt_StartDate.Text.Length > 0)
{
condition.Append(conditionName + "> '" + txt_StartDate.Text + "' AND");
}
if (txt_EndDate.Text.Length > 0)
{
condition.Append(conditionName + "< '" + txt_EndDate.Text + "' AND");
}
}
}
else
{
condition.Append(txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' AND " : "");
}
condition.Append(" Status = '結案'");
//condition += query_company;
DataSet ds = _operator.Select(condition.ToString(), "NotifyDate DESC");
Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
//for (int i = 0; i < gv.Rows.Count; i++)
//{
// if (gv.Rows[i].Cells[10].Text.Trim().Equals("True"))
// gv.Rows[i].Cells[10].Text = "男";
// else
// gv.Rows[i].Cells[10].Text = "女";
//}
}
示例4: SearchData
protected void SearchData()
{
Staff _operator = new Staff("CD_CheckCycle");
string conditionName = ddlst_SearchType.SelectedValue;
string condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' " : "");
DataSet ds = _operator.Select(condition);
Session["DS_CD"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
}
示例5: SearchData
protected void SearchData()
{
//string query_company = GetCompanyScope();
Staff _operator = new Staff("Area_Data");
string conditionName = ddlst_SearchType.SelectedValue;
string condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim().Replace("'","") + "%' " : "");
//condition += query_company;
DataSet ds = _operator.Select(condition);
Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
}
示例6: SearchData
protected void SearchData()
{
//綁定設備資料
DataSet ds = new DataSet();
string eid = "";
if (Request.QueryString["EID"] != null)
eid = Request.QueryString["EID"];
if (eid.Length > 0)
ds = db.Select("Device_ID = '" + eid + "'", "", "View_DeviceConfig");
else
ds = db.Select("", "", "View_DeviceConfig");
gv2.DataSource = ds;
gv2.DataBind();
//綁定零件資料
DataSet ds_material = new DataSet();
if (eid.Length > 0)
ds = db.Select("Device_ID = '" + eid + "'", "", "CD_MaterialOfDevice");
else
ds = db.Select("", "", "CD_MaterialOfDevice");
if (ds.Tables[0].Rows.Count > 0)
{
lbl_materialTitle.Visible = true;
}
gv_MaterialShow.DataSource = ds;
gv_MaterialShow.DataBind();
//綁定通報資料
Staff _operator = new Staff("View_ParkingRepairMaintainList");
ds = _operator.Select("DeviceID = '" + eid + "'", " CaseID desc");
if (ds.Tables[0].Rows.Count > 0)
{
lbl_caseTitle.Visible = true;
}
Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
}
示例7: SearchData
protected void SearchData()
{
//string query_company = GetCompanyScope();
Staff _operator = new Staff("View_Contract");
string conditionName = ddlst_SearchType.SelectedValue;
string condition = "";
//若查詢日期則把模糊查詢like改為=
if (conditionName == "ContractStartDate" || conditionName == "ContractEndDate")
{
condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " = '" + txt_Query_Reason.Text.Trim() + "' " : "");
}
else
{
condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' " : "");
}
DataSet ds = _operator.Select(condition);
Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
}
示例8: SearchData
protected void SearchData()
{
//string query_company = GetCompanyScope();
Staff _operator = new Staff("View_ParkingRepairMaintainList");
string conditionName = ddlst_SearchType.SelectedValue;
string condition = "";
if (txt_Query_Reason.Text.Trim().Length > 0)
{
condition = conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' and Status != '結案' ";
}
else
{
condition = "Status != '結案'";
}
//string condition = (txt_Query_Reason.Text.Trim().Length > 0 ? " " + conditionName + " like '%" + txt_Query_Reason.Text.Trim() + "%' " : "");
//condition += " Status != '結案'";
string sort = "NotifyDate DESC";
//condition += query_company;
DataSet ds = _operator.Select(condition, sort);
Session["DS_MIS"] = ds;
gv.DataSource = ds;
gv.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
ShowMsg2(UpdatePanel1, "查詢無資料");
}
//for (int i = 0; i < gv.Rows.Count; i++)
//{
// if (gv.Rows[i].Cells[10].Text.Trim().Equals("True"))
// gv.Rows[i].Cells[10].Text = "男";
// else
// gv.Rows[i].Cells[10].Text = "女";
//}
}
示例9: SelectStaff
public void SelectStaff(Staff staff)
{
if (selectedStaff != null && !selectedStaff.canBeSelected)
return;
if (selectedStaff != null)
selectedStaff.Deselect();
selectedStaff = staff;
selectedStaff.Select();
}