本文整理汇总了C#中Microsoft.GetParameterValue方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.GetParameterValue方法的具体用法?C# Microsoft.GetParameterValue怎么用?C# Microsoft.GetParameterValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.GetParameterValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteLoginUser
private Arthur.PurchaseEntryDL.TransactionResult DeleteLoginUser(Microsoft.Practices.EnterpriseLibrary.Data.Database db, System.Data.Common.DbTransaction transaction)
{
Arthur.PurchaseEntryDL.TransactionResult transactionResult;
int i = 0;
System.Data.Common.DbCommand dbCommand = db.GetStoredProcCommand("spDeleteLoginUser");
db.AddInParameter(dbCommand, "LoginID", System.Data.DbType.Int32, this._loginId);
db.AddParameter(dbCommand, "Return Value", System.Data.DbType.Int32, System.Data.ParameterDirection.ReturnValue, "Return Value", System.Data.DataRowVersion.Default, i);
db.ExecuteNonQuery(dbCommand, transaction);
i = (int)db.GetParameterValue(dbCommand, "Return Value");
transactionResult = i == -1 ? new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Failure, "Failure Deleted") : new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Success, "Successfully Deleted");
return transactionResult;
}
示例2: AddEditLoginUser
private Arthur.PurchaseEntryDL.TransactionResult AddEditLoginUser(Microsoft.Practices.EnterpriseLibrary.Data.Database db, System.Data.Common.DbTransaction transaction)
{
int i;
Arthur.PurchaseEntryDL.TransactionResult transactionResult;
bool bl;
i = 0;
System.Data.Common.DbCommand dbCommand = db.GetStoredProcCommand("spAddEditLoginUser");
db.AddInParameter(dbCommand, "LoginID", System.Data.DbType.Int32, this._loginId);
db.AddInParameter(dbCommand, "CompanyID", System.Data.DbType.Int32, this._companyId);
db.AddInParameter(dbCommand, "UserName", System.Data.DbType.String, this._userName);
db.AddInParameter(dbCommand, "Password", System.Data.DbType.String, this._password);
db.AddInParameter(dbCommand, "RoleID", System.Data.DbType.String, this._roleId);
db.AddInParameter(dbCommand, "LoginAccess", System.Data.DbType.Boolean, this._loginAccess);
db.AddInParameter(dbCommand, "AddEditOption", System.Data.DbType.Int16, this._addEditOption);
db.AddParameter(dbCommand, "Return Value", System.Data.DbType.Int32, System.Data.ParameterDirection.ReturnValue, "Return Value", System.Data.DataRowVersion.Default, i);
db.ExecuteNonQuery(dbCommand, transaction);
this._loginId = (int)db.GetParameterValue(dbCommand, "Return Value");
bl = i != 0;
if (!bl)
{
transactionResult = new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Failure, "User Name Already Exists. Please Change Some Other Name");
}
else
{
bl = i != -1;
if (!bl)
{
bl = this._addEditOption != 1;
if (!bl)
{
return new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Failure, "Failure Updated");
}
transactionResult = new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Failure, "Failure Adding");
}
else
{
bl = this._addEditOption != 1;
transactionResult = !bl ? new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Success, "Successfully Updated") : new Arthur.PurchaseEntryDL.TransactionResult(Arthur.PurchaseEntryDL.TransactionStatus.Success, "Successfully Added");
}
}
return transactionResult;
}