本文整理汇总了C#中API.DAL.ConnectionManager.ExecuteScalarWrapper方法的典型用法代码示例。如果您正苦于以下问题:C# ConnectionManager.ExecuteScalarWrapper方法的具体用法?C# ConnectionManager.ExecuteScalarWrapper怎么用?C# ConnectionManager.ExecuteScalarWrapper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类API.DAL.ConnectionManager
的用法示例。
在下文中一共展示了ConnectionManager.ExecuteScalarWrapper方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckMailExist
public Int32 CheckMailExist(string reportId)
{
ConnectionManager conManager = new ConnectionManager(ConName);
Int32 ID = 0;
try
{
String sql = "GetReportID " + reportId;
Object id = conManager.ExecuteScalarWrapper(sql);
ID = Convert.ToInt32(id);
}
catch (Exception ex)
{
throw (ex);
}
finally
{
if (conManager.IsNotNull())
{
conManager.Dispose();
}
}
return ID;
}
示例2: GetAllAcc_VoucherDet
public static Decimal GetAllAcc_VoucherDet(Int32 orgKey, string fromDate, string toDate, Int32 head,string spName)
{
ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
Decimal balance = 0.0M;
string search = "";
search = head + "," + orgKey + ",'" + fromDate + "','" + toDate+"'";
try
{
String sql = "EXEC "+spName+" "+ search + "";
Object oppBal = conManager.ExecuteScalarWrapper(sql);
balance = Convert.ToDecimal(oppBal);
}
catch (Exception ex)
{
throw (ex);
}
finally
{
if (conManager.IsNotNull())
{
conManager.Dispose();
}
}
return balance;
}
示例3: GetHKName
public static String GetHKName(Int32 HKID)
{
ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
String HKName = "";
try
{
String sql = "select HKName from HouseKeepingValue Where HKID=" + HKID;
Object Name = conManager.ExecuteScalarWrapper(sql);
HKName = Convert.ToString(Name);
}
catch (Exception ex)
{
throw (ex);
}
finally
{
if (conManager.IsNotNull())
{
conManager.Dispose();
}
}
return HKName;
}