本文整理汇总了C#中Dbconn.GetDataSet方法的典型用法代码示例。如果您正苦于以下问题:C# Dbconn.GetDataSet方法的具体用法?C# Dbconn.GetDataSet怎么用?C# Dbconn.GetDataSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dbconn
的用法示例。
在下文中一共展示了Dbconn.GetDataSet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetData
public DataSet GetData()
{
try
{
if (m_request == null || m_request.Tables.Count == 0 || m_request.Tables[0].Rows.Count == 0)
{
return null;
}
string strUser_id = m_request.Tables[0].Rows[0]["user_id"].ToString();
Dbconn conn = new Dbconn("MDM");
DataSet ds = conn.GetDataSet(@"
SELECT
t1.AM_S_dept_ID ,
t2.AM_Dept_NAME ,
t2.AM_Dept_NAME_all
FROM dbo.AM_User_Dept t1 WITH ( NOLOCK )
LEFT JOIN dbo.AM_Dept t2 WITH ( NOLOCK ) ON t1.am_S_dept_ID = t2.am_S_dept_ID
WHERE t1.AM_User_ID = "[email protected]"
");
return ds;
}
catch
{
throw ;
}
}
示例2: GetData
public DataSet GetData()
{
try
{
string strSQL = "";
string strwhere = m_request.Tables[0].Rows[0]["where"].ToString();
//if (strwhere == "")
//{
// strwhere = " 1=1 ";
//}ERP_TEST
Dbconn conn = new Dbconn("ERP_PROD");
strSQL = @"SELECT rtrim(CTSTKY) CTSTKY,rtrim(CTTX40) CTTX40 FROM CSYTAB WHERE CTSTKY like 'N2%' and CTSTKY not in ('N207','N209','N211') and CTSTCO= '" + strwhere + "'";
DataSet ds = conn.GetDataSet(strSQL);
return ds;
}
catch
{
throw;
}
}
示例3: GetData
/// <summary>
/// 根据Entity的编号获取MDM中Entity列的配置
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
DataSet ds = new DataSet();
DataSet dsRequest = new DataSet();
string strMainEntity = "";
strMainEntity = m_request.Tables[0].Rows[0]["Entity"].ToString();
//获取所有的列
Dbconn conn = new Dbconn("MDM_Master");
ds = conn.GetDataSet(@"
SELECT Property_Name FROM dbo.Lib_ExdPropertyList
WHERE Class_Name='" + strMainEntity + @"'
Order BY ColumnIndex
");
return ds;
}
catch
{
throw;
}
}
示例4: GetData
public DataSet GetData()
{
string strVexSSONewID = m_hzyMessage.VexSSONewID;
string strApp_UserID = m_hzyMessage.User_ID;
string strEnv_ID = m_hzyMessage.Env_ID;
if (string.IsNullOrEmpty(strVexSSONewID))
{
strVexSSONewID = "00000000-0000-0000-0000-000000000000";
}
if (strApp_UserID == "0")
{
strApp_UserID = "-1";
}
Dbconn conn = new Dbconn("VexSSO");
string strSQL = @"
SELECT t1.Authorization_ID ,
t1.Authorization_Name
FROM dbo.MDM_System_Authorization t1 WITH ( NOLOCK )
JOIN dbo.MDM_System_User_Authorization t2 WITH ( NOLOCK ) ON t1.Authorization_ID = t2.Authorization_ID
WHERE Env_ID = @param1
AND (VexSSONewID = @param0 OR [email protected])
AND ISNULL(HavaFlag, 0)=1
";
DataSet ds = conn.GetDataSet(strSQL, new string[3] { strVexSSONewID, strEnv_ID ,strApp_UserID});
return ds;
}
示例5: GetData
public DataSet GetData()
{
DataSet ds = null;
Dbconn conn = new Dbconn("MDM");
string strSQL = @" SELECT t1.WS_ID ,
TASK_ID,
WS_LogicName,
WS_Name,
URL,
Execute_type,
Execute_StartTime,
Execute_EndTime,
Execute_cycle,
Execute_DayStartTime,
Execute_DayEndTime,
Execute_WeekTime,
Execute_MonthTime,
Enabled
FROM dbo.WS_Scheduling t1 WITH ( NOLOCK )
WHERE
ISNULL(t1.Error_Count, 0) < 5";
if (m_request.Tables[0].Rows.Count >0 && m_request.Tables[0].Rows[0][0] != null)
{
strSQL += " AND UpdateTime > '" + Convert.ToDateTime(m_request.Tables[0].Rows[0][0]).ToString("yyyy-MM-dd HH:mm:ss") + "' ";
}
strSQL += "; SELECT * FROM WS_SchedulingParam;";
ds = conn.GetDataSet(strSQL);
return ds;
}
示例6: GetData
public DataSet GetData()
{
string strEnv_ID = m_request.Tables[0].Rows[0]["Env_ID"].ToString();
string strAuthorization_ID = m_request.Tables[0].Rows[0]["Authorization_ID"].ToString();
Dbconn conn = new Dbconn("MDM");
string strSQL = @"
SELECT t1.Menu_Id ,
t1.Menu_Code +' ' + t1.Menu_Name Menu_Name,
t1.Menu_Father_ID ,
ISNULL(t2.HavaFlag, 0) HavaFlag
FROM MDM_System_Menu t1 WITH ( NOLOCK )
LEFT JOIN dbo.MDM_System_Menu_AUZ t2 WITH ( NOLOCK ) ON t1.Menu_Id = t2.Menu_ID
AND [email protected]
WHERE t1.env_id = @param1
";
DataSet ds = conn.GetDataSet(strSQL, new string[2] { strAuthorization_ID,strEnv_ID });
//添加根目录行
ds.Tables[0].Rows.Add(new object[] { "0", "根目录", "-1", "0" });
return ds;
}
示例7: GetData
/// <summary>
/// 获取系统环境信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strWS_ID = m_request.Tables[0].Rows[0]["ws_id"].ToString();
Dbconn conn = new Dbconn("WSRR");
DataSet ds = conn.GetDataSet(@"
SELECT
Param_ID,
[Param_Index]
,[Param_Content]
,[Param_Name]
,[Param_Type]
,CASE ISNULL(Param_Must_Flag,0) WHEN 1 THEN '必须' WHEN '0' THEN '否' WHEN '2' THEN '系统默认' END AS Param_Must_Flag
,ISNULL(Param_Must_Flag,0) as Param_Must_Flagint
,[Default_Value]
FROM [WSRR].[dbo].[WS_Param]
WHERE WS_ID='" + strWS_ID + "' ");
return ds;
}
catch
{
throw;
}
}
示例8: GetData
/// <summary>
/// 获取系统用户信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strUser_ID = m_hzyMessage.User_ID;
Dbconn conn = new Dbconn("VexSSO");
DataSet ds = conn.GetDataSet(@"
SELECT
[App_UserID]
,[App_UserName]
,[App_UserName_CN]
,[Chang_Password_Time]
FROM [dbo].[MDM_System_User]
WHERE [email protected]
", new string[1]{strUser_ID});
return ds;
}
catch
{
throw;
}
}
示例9: GetData
public DataSet GetData()
{
Dbconn conn = new Dbconn("MDM");
return conn.GetDataSet(@"
SELECT t1.WS_ID ,
WS_LogicName
FROM dbo.WS_Scheduling t1 WITH ( NOLOCK )
WHERE t1.Enabled = 1
AND ( t1.Last_Execute_Right_Time IS NULL
OR ( DATEDIFF(s, t1.Last_Execute_Right_Time, GETDATE()) > t1.Excute_cycle
AND ISNULL(t1.Error_Count, 0) < 5
AND ISNULL(Execute_type, 'cycle') = 'cycle'
)
--按日
OR ( ( t1.Last_Execute_Right_Time IS NULL
--取今天没有跑过的数据
OR t1.Last_Execute_Right_Time < CONVERT(VARCHAR(10), GETDATE(), 23)
+ ' ' + t1.Execute_StartTime
--取今天跑过了,但是到了下一次的执行时间
OR DATEDIFF(s, t1.Last_Execute_Right_Time, GETDATE()) > t1.Excute_cycle
)
AND ISNULL(t1.Error_Count, 0) < 5
AND CONVERT(VARCHAR(8), GETDATE(), 14) > Execute_StartTime
AND ISNULL(Execute_type, 'cycle') = 'day'
)
)
ORDER BY WS_ID ;
SELECT *
FROM WS_SchedulingParam
");
}
示例10: GetData
/// <summary>
/// 根据权限和Market表名,获取Filter信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strAUZ = m_request.Tables[0].Rows[0]["AUZ"].ToString();
string strMarketTableName = m_request.Tables[0].Rows[0]["MarketTableName"].ToString();
Dbconn conn = new Dbconn("MDM_Master");
DataSet returnDs = conn.GetDataSet(@"
SELECT Main_Entity ,
t3.Table_Property_Name + ' ' + t1.Fittler AS Filter
FROM dbo.Lib_AUZ_Fittler t1 WITH ( NOLOCK )
FULL JOIN dbo.Lib_View_TableColumn t3 WITH ( NOLOCK ) ON t3.Porperty_ID = t1.property_ID
LEFT JOIN [dbo].[Lib_View_Table] t4 WITH ( NOLOCK ) ON t4.Table_ID = t3.Table_ID
LEFT JOIN dbo.Lib_ExdPropertyList t2 WITH ( NOLOCK ) ON t1.property_ID = t2.Property_ID
WHERE Table_Name = '" + strMarketTableName + @"'
AND AUZ LIKE '%【" + strAUZ + @"】%'
");
return returnDs;
}
catch
{
throw;
}
}
示例11: GetData
/// <summary>
/// 获取某个Market的Entity的所有属性列表
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
DataSet ds = new DataSet();
DataSet dsRequest = new DataSet();
string strEntity = "";
string strMarketTableName = "";
strEntity = m_request.Tables[0].Rows[0]["Entity"].ToString();
strMarketTableName = m_request.Tables[0].Rows[0]["MarketTableName"].ToString();
//获取所有的列
Dbconn conn = new Dbconn("MDM_Master");
ds = conn.GetDataSet(@"
SELECT t1.MainEntity,t2.Porperty_Name,t2.Table_Property_Name FROM dbo.Lib_View_Table t1
LEFT JOIN dbo.Lib_View_TableColumn t2 ON t1.Table_ID = t2.Table_ID
WHERE Table_Name='" + strMarketTableName + @"'
AND Entity='" + strEntity + @"'
AND Table_Type='Market'
");
return ds;
}
catch
{
throw;
}
}
示例12: GetData
/// <summary>
/// 获取MDM人员信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strVexSSONewID = m_hzyMessage.VexSSONewID;
Dbconn conn = new Dbconn("VexSSO");
DataSet ds = conn.GetDataSet(@"
SELECT 0 [Employee_ID] ,
t2.[Name] ,
'' [Sex] ,
t2.Phone [Phone] ,
t1.VexSSOLoginUser [Moblie] ,
t1.VexSSOLoginUser [SSO_UserName] ,
NULL [In_Time] ,
NULL [Leave_Time] ,
NULL [Leave_Flag] ,
NULL [IsActived]
FROM B01_MDM.[VEXSSOUser] t1
LEFT JOIN B01_MDM.[VexSSOUserInfo] t2 ON t2.VexSSONewId = t1.VexSSONewID
WHERE [email protected]
", new string[1] { strVexSSONewID });
return ds;
}
catch
{
throw;
}
}
示例13: GetData
/// <summary>
/// 获取公司信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
Dbconn conn = new Dbconn("MDM");
DataSet ds = conn.GetDataSet(@"
SELECT
[Company_ID]
,[Company_Name]
,[Company_sn]
,[Company_Address]
,[Fax]
,[Tax_ID]
,[Bank_Name]
,[Bank_ID]
,[Createtime]
,[Updatetime]
,Convert(bigint,t1.[Timestamps]) Timestamps
FROM [MDM].[dbo].[MDM_Company] t1 WITH(NOLOCK)
");
return ds;
}
catch
{
throw;
}
}
示例14: GetData
/// <summary>
/// 获取系统用户信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strEnv_SN = "";
string strApp_UserName = "";
if (m_request != null && m_request.Tables[0].Rows.Count > 0)
{
if (m_request.Tables[0].Columns.Contains("Env_SN"))
{
strEnv_SN = m_request.Tables[0].Rows[0]["Env_SN"].ToString();
}
if (m_request.Tables[0].Columns.Contains("App_UserName"))
{
strApp_UserName = m_request.Tables[0].Rows[0]["App_UserName"].ToString();
if (strApp_UserName != "")
{
strApp_UserName = "'" + strApp_UserName.Replace("'", "''").Replace(",", "','") + "'";
}
}
}
if (strApp_UserName == "")
{
throw new Exception("请输入用户名");
}
if (strEnv_SN == "")
{
throw new Exception("请输入环境简称");
}
Dbconn conn = new Dbconn("VexSSO");
DataSet ds = conn.GetDataSet(@"
SELECT
[App_UserID]
,[App_UserName]
,[App_UserName_CN]
,[Chang_Password_Time]
FROM [dbo].[MDM_System_User] with(nolock)
WHERE App_UserName in (" + strApp_UserName + @")
AND EXISTS(SELECT 1 FROM dbo.MDM_System_Env with(nolock)
WHERE [email protected]
AND MDM_System_User.Env_ID=MDM_System_Env.Env_ID
)
", new string[1] { strEnv_SN });
return ds;
}
catch
{
throw;
}
}
示例15: GetData
/// <summary>
/// 根据XML内容询店铺查询
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
DataSet ds = new DataSet();
DataSet ds_Return = new DataSet();
DataSet dsRequest = new DataSet();
Dbconn conn = new Dbconn();
ArrayList listAMSendList = new ArrayList();
string strXML = "";
string strSQL = "";
strXML = m_request.Tables[0].Rows[0]["XML"].ToString();
//XML是前台传入
ds = Common.Common.GetDSByExcelXML(strXML);
if (ds.Tables["OPTYPE"].Rows[0][0].ToString().ToUpper() == "GET")
//读取ROWS到/ROWS 中的参数
{
conn = new Dbconn("MDM");
//if (ds.Tables["LIST"].Rows[0]["CONO"].ToString().Trim() == "YL")
//{
// conn = new Dbconn("YL_F22");
//}
string strWHERE = " and 1=1";
if (ds.Tables["LIST"].Columns.Contains("Condition"))
{
if (ds.Tables["LIST"].Rows[0]["Condition"].ToString().Trim() != "")
//读取LIST之间参数
{
strWHERE += " AND (" + ds.Tables["LIST"].Rows[0]["Condition"].ToString().Trim() + ")";
}
}
strSQL = @" SELECT
DEPOT.J_DQ,
DEPOT.J_DEPOTID,
SUBSTRING(POSUSER.J_NOTES,3,LEN(POSUSER.J_NOTES)) AS J_NOTES
FROM POSUSER,DEPOT
WHERE POSUSER.J_DEPOTID=DEPOT.J_DEPOTID " + strWHERE;
ds_Return = conn.GetDataSet(strSQL);
}
return ds_Return;
}
catch
{
throw;
}
}