本文整理汇总了C#中Dbconn类的典型用法代码示例。如果您正苦于以下问题:C# Dbconn类的具体用法?C# Dbconn怎么用?C# Dbconn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Dbconn类属于命名空间,在下文中一共展示了Dbconn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: 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
");
}
开发者ID:huaminglee,项目名称:Code,代码行数:35,代码来源:WSScheduling_GetCurrentExecuteList.cs
示例2: GetData
/// <summary>
/// VEX框架的主入口
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strXML = m_request.Tables[0].Rows[0]["XML"].ToString();
ds = Common.Common.GetDSByExcelXML(strXML);
DataTable dt_OPTYPE = ds.Tables["OPTYPE"];
string strOPTYPE = dt_OPTYPE.Rows[0][0].ToString();
strComp = m_hzyMessage.Env_SN;
conn = new Dbconn(strComp);
switch (strOPTYPE) {
case "cmbGetSupplier": cmbGetSupplier(); break;
case "cmbGetPo": cmbGetPo(); break;
case "cmbGetFailure": cmbGetFailure(); break;
case "cmbGetAP": cmbGetAP(); break;
case "onExpandRow": onExpandRow(); break;
case "Search": Search(); break;
case "winGetDetailOld": winGetDetailOld(); break;
case "winGetDetailNew": winGetDetailNew(); break;
case "Insert": Insert(); break;
case "GetWH": GetWH(); break;
};
return dsReturn;
}
catch
{
conn.RollbackTransaction();
throw;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:35,代码来源:POReceipt.cs
示例3: GetORGTreeByID
/// <summary>
/// 根据faterid 获取组织机构树
/// </summary>
/// <returns></returns>
public DataSet GetORGTreeByID(Dbconn conn, String strType)
{
DataSet ds = new DataSet();
String strSQL = "";
//获取条件值
string strXML = m_request.Tables[0].Rows[0]["XML"].ToString();
DataSet dsXML = Common.Common.GetDSByExcelXML(strXML);
string strPage = dsXML.Tables["LIST"].Rows[0]["Page"].ToString();
string strNum = dsXML.Tables["LIST"].Rows[0]["Num"].ToString();
string strCons = dsXML.Tables["LIST"].Rows[0]["Cons"].ToString();
string strOrderBy = dsXML.Tables["LIST"].Rows[0]["OrderBy"].ToString();
string[] strParam = new string[] { };
strSQL = @" SELECT [OZ1_OrgCode], [OZ1_OrgName], [OZ1_FatherId]
, [OZ1_OrgType], [OZ1_ID], [OZ1_CONO], [OZ1_DIVI], [OZ1_FatherId] As [OZ1_FatherIdT]
, [OZ1_CostCenterCode], [OZ1_DepartmentManager]
, [OZ1_MDeptCode], [OZ1_ShopCode], [OZ1_OrgEnable]
, [OZ1_CostCenterEnable], [OZ1_BusdepartmentEnable]
, [OZ1_ShopEnable], [OZ1_State], [OZ1_ModelType], [OZ1_BMMoney]
, [OZ1_Brand], [OZ1_Com], [OZ1_CostCenterCode1], [OZ1_BMPer]
, OZ1_Com1, OZ1_ComCode1, OZ1_ISBranch, OZ1_CostCenterCode2
FROM [F01_CERT].[OZ1_Organization]
WHERE 1=1 AND OZ1_OrgType <> '业务线' " + strCons + strOrderBy;
ds = conn.GetDataSet(strSQL);
return ds;
}
开发者ID:huaminglee,项目名称:Code,代码行数:30,代码来源:PE_OA_OZ_Organization.cs
示例4: 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 ;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:31,代码来源:MDM_User_Dept_GetbyUser.cs
示例5: Execute
/// <summary>
/// 编辑WS信息
/// </summary>
/// <returns></returns>
public bool Execute()
{
Dbconn conn = new Dbconn("WSRR");
try
{
if(m_request == null
|| m_request.Tables.Count==0
|| m_request.Tables[0].Rows.Count == 0)
{
return true;
}
string strParam_ID = m_request.Tables[0].Rows[0]["Param_ID"].ToString();
ArrayList listTable = new ArrayList();
listTable.Add("WS_Param");
conn.BeginTransaction();
conn.TableLock(listTable);
string strWhere = " Param_ID = '" + strParam_ID + "'";
conn.Delete("WS_Param", strWhere);
conn.CommitTransaction();
return true;
}
catch
{
conn.RollbackTransaction();
throw;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:37,代码来源:WS_Param_Delete.cs
示例6: GetData
/// <summary>
/// VEX框架的主入口
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strXML = "";
string filter = "";
m_conn = new Dbconn(m_hzyMessage.Env_SN);
strXML = m_request.Tables[0].Rows[0]["XML"].ToString();
ds = Common.Common.GetDSByExcelXML(strXML);
DataTable dt_OPTYPE = ds.Tables["OPTYPE"];
if (dt_OPTYPE.Rows[0][0].ToString().ToUpper() == "BrandInfo".ToUpper()) //品牌信息查询无分页带模糊查询
{
filter = m_request.Tables[0].Rows[0]["q"].ToString(); // 实时条件,用于下拉框查询数据
Get(filter);
}
if (dt_OPTYPE.Rows[0][0].ToString().ToUpper() == "BrandInfoForPageList".ToUpper()) //供应商信息查询有分页
{
BrandInfoForPageList();
}
else if (dt_OPTYPE.Rows[0][0].ToString().ToUpper() == "EDIT".ToUpper())//供应商新增修改操作
{
EDIT();
}
return ds_Return;
}
catch
{
m_conn.RollbackTransaction();
throw;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:36,代码来源:Brand.cs
示例7: Execute
/// <summary>
/// 删除系统权限信息
/// </summary>
/// <returns></returns>
public bool Execute()
{
Dbconn conn = new Dbconn("MDM");
try
{
string strAuthorization_ID = m_request.Tables[0].Rows[0]["Authorization_ID"].ToString();
m_request.Tables[0].Columns.Remove("Authorization_ID");
ArrayList listTable = new ArrayList();
listTable.Add("MDM_System_Authorization");
listTable.Add("MDM_System_Menu_AUZ");
conn.BeginTransaction();
conn.TableLock(listTable);
if (strAuthorization_ID != "")
{
string strWhere = " Authorization_ID=" + strAuthorization_ID;
conn.Delete("MDM_System_Authorization", strWhere);
conn.Delete("MDM_System_Menu_AUZ", strWhere);
}
conn.CommitTransaction();
return true;
}
catch
{
conn.RollbackTransaction();
throw;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:37,代码来源:MDM_System_Authorization_Delete.cs
示例8: GetWorkFlowTaskList
/// <summary>
/// 根据条件获取待办任务数据集 条件-分页-排序等
/// </summary>
/// <returns></returns>
public DataSet GetWorkFlowTaskList(Dbconn conn, String strType)
{
DataSet ds = new DataSet();
String strSQL = "";
//获取条件值
string strXML = m_request.Tables[0].Rows[0]["XML"].ToString();
DataSet dsXML = Common.Common.GetDSByExcelXML(strXML);
string strPage = dsXML.Tables["LIST"].Rows[0]["Page"].ToString();
string strNum = dsXML.Tables["LIST"].Rows[0]["Num"].ToString();
string strCons1 = dsXML.Tables["LIST"].Rows[0]["Cons1"].ToString();
string strCons2 = dsXML.Tables["LIST"].Rows[0]["Cons2"].ToString();
string strCons3 = dsXML.Tables["LIST"].Rows[0]["Cons3"].ToString();
string strOrderBy = dsXML.Tables["LIST"].Rows[0]["OrderBy"].ToString();
String strXMLC = "【操作类型,GET】【实体,任务查询】【CONO,】【DIVI,】"
+ "【《W》页码," + strPage + "】【《W》记录数," + strNum + "】"
+ "【《W》查询条件1," + strCons1 + "】"
+ "【《W》查询条件2," + strCons2 + "】"
+ "【《W》查询条件3," + strCons3 + "】"
+ "【排序方式," + strOrderBy + "】"
+ "【Type," + strType + "】"
+ "【返回内容, 任务列表】";
ds = conn.GetDataSetBySP("SRV_BPM.WorkFlowTask_APP", new string[4] { "@InputFormat", "@OutputFormat"
, "@OutputContentType", "@ConditionStr" }
, new string[4] { "AML", "DB", "RS", strXMLC });
return ds;
}
开发者ID:huaminglee,项目名称:Code,代码行数:33,代码来源:PE_OA_TaskCenter.cs
示例9: 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;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:34,代码来源:WS_Param_GetListByWS_ID.cs
示例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;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:35,代码来源:MDM_Lib_AUZ_Filter_GetListByAUZ.cs
示例11: GetData
/// <summary>
/// 获取执行任务参数信息
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
string strXML = string.Empty;
strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); //获取参数XML
DataSet dsRequest = Common.Common.GetDSByExcelXML(strXML); //转换XML到DataSet
string strTaskID = dsRequest.Tables[1].Rows[0]["task_id"].ToString(); //获取参数TaskID
if (string.IsNullOrEmpty(m_hzyPageInfo.Sort))
{
m_hzyPageInfo.Sort = "CreateTime";
m_hzyPageInfo.Order = "desc ";
}
Dbconn conn = new Dbconn("WSRR"); //创建连接类
string strSQL = @"SELECT
[Auto_ID]
,[TASK_ID]
,[Execute_StartTime]
,[Execute_EndTime]
,[Execute_Result]
,[Execute_Message]
,[CreateTime]
FROM [dbo].[WS_Scheduling_Execute_log]
WHERE TASK_ID='" + strTaskID + "' ";
DataSet ds = conn.GetDataSetForPageList(strSQL, new string[0], m_hzyPageInfo); //调用方法,获取分页数据
return ds;
}
catch
{
throw;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:38,代码来源:WSServiceCall_Log_GetListByTaskID.cs
示例12: 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;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:29,代码来源:PLM_Contrast_EditByXML.cs
示例13: 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;
}
开发者ID:huaminglee,项目名称:Code,代码行数:26,代码来源:MDM_System_Menu_AUZ_GetList.cs
示例14: 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;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:35,代码来源:MDM_GetEntityPropertyList.cs
示例15: 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;
}
开发者ID:huaminglee,项目名称:Code,代码行数:32,代码来源:MDM_System_User_Authorization_GetListBySession_ID.cs
示例16: GetData
/// <summary>
/// VEX框架的主入口
/// </summary>
/// <returns></returns>
public DataSet GetData()
{
try
{
//接收XML的内容
string strXML = "",
strOPTYPE = "";
strXML = m_request.Tables[0].Rows[0]["XML"].ToString();
strComp = m_hzyMessage.Env_SN;
conn = new Dbconn(strComp);
m_RequestXML = Common.Common.GetDSByExcelXML(strXML);
DataTable dt_OPTYPE = m_RequestXML.Tables["OPTYPE"];
dt_DefList = m_RequestXML.Tables["List"];
strOPTYPE = dt_OPTYPE.Rows[0][0].ToString();
switch (strOPTYPE)
{
case "GET": Get(); break;
case "GetOnExpandRow": GetOnExpandRow(); break;
case "GetSearch": GetSearch(); break;
case "GetSKC": GetSKC(); break;
case "SetDefective": SetDefective(); break;
case "GetPrintSearch": GetPrintSearch(); break;
};
return m_ReturnData;
}
catch
{
conn.RollbackTransaction();
throw;
};
}
开发者ID:huaminglee,项目名称:Code,代码行数:38,代码来源:Defective.cs
示例17: FindFatherMenu
private void FindFatherMenu(DataSet ds, Dbconn conn)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string strMenuFatherID = ds.Tables[0].Rows[i]["MenuFatherID"].ToString();
if (strMenuFatherID == "")
{
continue;
}
DataRow[] dr = ds.Tables[0].Select("MenuID='" + strMenuFatherID+"'"); //找到是否已经存在父节点
if (dr.Length > 0)
{
continue;
}
DataTable dt = conn.GetDataTable(@"
SELECT MenuID ,
MenuName ,
MenuFatherID ,
ActionURL
FROM F01_Cert.Menu
WHERE MenuID='" + strMenuFatherID + @"'
", new string[0]);
if (dt.Rows.Count > 0)
{
ds.Tables[0].ImportRow(dt.Rows[0]);
}
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:30,代码来源:Menu.cs
示例18: 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;
}
开发者ID:huaminglee,项目名称:Code,代码行数:31,代码来源:WSScheduling_GetCurrentExecuteList.cs
示例19: GetData
public DataSet GetData()
{
try
{
string strType = m_request.Tables[0].Rows[0]["type"].ToString();
Dbconn conn = new Dbconn("PE_OA");
DataSet ds = new DataSet();
if (strType == "New" || strType == "Upd")
{
ds = SetPOApply(conn, strType);
}
else if (strType == "GetHs" || strType == "GetDs")
{
ds = GetPOApplyList(conn, strType);
}
else if (strType == "FlowOut")
{
ds = ActFlowOut(conn, strType);
}
else if (strType == "LinkCCAS")
{
ds = LinkCCAS(conn, strType);
}
else if (strType == "GetYSInfo")
{
ds = GetYSInfo(conn, strType);
}
return ds;
}
catch
{
throw;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:35,代码来源:PE_OA_LV_POApply.cs
示例20: 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;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:38,代码来源:MDM_Company_GetList.cs
注:本文中的Dbconn类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论