本文整理汇总了C#中ServiceStationClient.ComponentUI.TextBox.TextChooser.SetDataSource方法的典型用法代码示例。如果您正苦于以下问题:C# TextChooser.SetDataSource方法的具体用法?C# TextChooser.SetDataSource怎么用?C# TextChooser.SetDataSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServiceStationClient.ComponentUI.TextBox.TextChooser
的用法示例。
在下文中一共展示了TextChooser.SetDataSource方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: tc_GetDataSourced
/// <summary>
/// 设置速查
/// </summary>
/// <param name="sqlString"></param>
void tc_GetDataSourced(TextChooser tc, string sqlString)
{
DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dvt);
if (dvt != null)
{
tc.Search();
}
}
示例2: Sup_NameBindData
/// <summary> 绑定供应商名称到选择器
/// </summary>
/// <param name="tc"></param>
/// <param name="sqlString"></param>
private static void Sup_NameBindData(TextChooser tc, string sqlString)
{
DataTable dt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dt);
if (dt != null)
{
tc.Search();
}
}
示例3: txtcSupplier_GetDataSourced
void txtcSupplier_GetDataSourced(TextChooser tc, string sqlString)
{
try
{
string fileds = "sup_code,sup_full_name";
sqlString = sqlString.Replace("*", fileds);
DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dvt);
if (dvt != null)
{
tc.Search();
}
}
catch (Exception ex)
{
HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
}
}
示例4: tc_GetDataSourced
/// <summary>
/// 设置速查
/// </summary>
/// <param name="sqlString"></param>
void tc_GetDataSourced(TextChooser tc, string sqlString)
{
try
{
DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dvt);
if (dvt != null)
{
tc.Search();
}
}
catch (Exception ex)
{
HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
}
}
示例5: tc_GetDataSourced
/// <summary>
/// 设置速查
/// </summary>
/// <param name="sqlString"></param>
void tc_GetDataSourced(TextChooser tc, string sqlString)
{
if (sqlString.Contains("v_vehicle"))
{
string fileds = string.Format(" license_plate,vin,engine_num,v_model,v_brand,v_color,turner,cust_code,cust_id,cust_name,cont_name,{0} phone ", EncryptByDB.GetDesFieldValue("cont_phone"));
sqlString = sqlString.Replace("*", fileds);
}
DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dvt);
if (dvt != null)
{
tc.Search();
}
}
示例6: PartsType_NameBindData
/// <summary> 绑定配件类型名称到选择器
/// </summary>
/// <param name="tc"></param>
/// <param name="sqlString"></param>
private static void PartsType_NameBindData(TextChooser tc, string sqlString)
{
// sqlString = string.Format(@"select dic_name from sys_dictionaries where dic_id not in
// (select parent_id from sys_dictionaries) and dic_name like '%{0}%'", tc.Text);
// DataTable dt = CommonFuncCall.GetDataSource(sqlString);
// tc.SetDataSource(dt);
// if (dt != null)
// {
// tc.Search();
// }
string dic_ids = string.Empty;
List<string> list_dic_id=new List<string>();
CreateTreeViewChildNode(list_dic_id, "sys_parts_category");
if(list_dic_id.Count>0)
{
foreach (string dic_id in list_dic_id)
{
dic_ids += "'" + dic_id + "',";
}
}
dic_ids = dic_ids.Trim(',');
sqlString = string.Format(@"select dic_name from sys_dictionaries where dic_id in ({0}) and dic_name like '%{1}%'", dic_ids, tc.Text);
DataTable dt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dt);
if (dt != null)
{
tc.Search();
}
}
示例7: PartsType_NameBindData
/// <summary> 绑定配件类型名称到选择器
/// </summary>
/// <param name="tc"></param>
/// <param name="sqlString"></param>
private static void PartsType_NameBindData(TextChooser tc, string sqlString)
{
sqlString = string.Format(@"select dic_name from sys_dictionaries where dic_id not in
(select parent_id from sys_dictionaries) and dic_name like '%{0}%'", tc.Text);
DataTable dt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dt);
if (dt != null)
{
tc.Search();
}
}
示例8: txtcCustName_GetDataSourced
void txtcCustName_GetDataSourced(TextChooser tc, string sqlString)
{
try
{
if (sqlString.Contains("tb_customer"))
{
string fileds = "cust_name,cust_code";
sqlString = sqlString.Replace("*", fileds);
}
else if (sqlString.Contains("tb_supplier"))
{
string fileds = "sup_code,sup_full_name";
sqlString = sqlString.Replace("*", fileds);
}
DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dvt);
if (dvt != null)
{
tc.Search();
}
}
catch (Exception ex)
{
HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
}
}
示例9: txtcCustName_GetDataSourced
void txtcCustName_GetDataSourced(TextChooser tc, string sqlString)
{
try
{
if (sqlString.Contains("tb_customer"))
{
string tables = "tb_customer a left join sys_dictionaries b on a.open_bank=b.dic_id ";
string fileds = "cust_id,cust_name,cust_code,bank_account,dic_name";
sqlString = sqlString.Replace("*", fileds);
sqlString = sqlString.Replace("tb_customer", tables);
}
else if (sqlString.Contains("tb_supplier"))
{
string fileds = "sup_id,sup_code,sup_full_name";
sqlString = sqlString.Replace("*", fileds);
}
DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
tc.SetDataSource(dvt);
if (dvt != null)
{
tc.Search();
}
}
catch (Exception ex)
{
HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
}
}