问题描述
HEllo团队,
我收到的错误如下:
HEllo Team,
I am getting the error as follow:
Error 2'QBPO.Application.Bpo.DataManagers.QBpoDataManager'
does not contain a definition for 'UpdateQCProcessed'
and no extension method 'UpdateQCProcessed' accepting a first argument
of type 'QBPO.Application.Bpo.DataManagers.QBpoDataManager' could be found
(are you missing a using directive or an assembly reference?)
因为我在.cs文件中的引用和命名空间中添加了.dll。
然后我也得到错误。亲切帮助。
请找代码
公共结果添加(IEntityBase entityBase)
{
结果结果= null;
尝试
{
IUserEntity userEntity = entityBase as IUserEntity;
Logger.Write(Inside BpoManagerWrite.Add(),LogType.Information);
QBpoDataManager bpoDataManager = new QBpoDataManager();
OcrDataManager ocrDataManager = new OcrDataManager();
result = new Result();
ICustomerLoanData customerLoanData = QBpoEntityCreator.GetCustomerLoanDataEntity();
using( TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.Required,CommonUtility.GetRequireTransactionOptions()))
{
if(userEntity.Role == QBPOUserRole.QbpoQcUser.ToString())
{
bpoDataManager.Update(entityBase);
bpoDataManager.UpdateQCProcessed(entityBase);
}
其他
{
////添加LoanDataTable
bpoDataManager.Add(entityBase);
////更新OCRLoan Tbl Table.Processed = 1,更新者= 1,更新日期=现在
ocrDataManager.Update(entityBase);
}
transactionScope.Complete();
}
Logger.Write(退出BpoManagerWrite.Add(),LogType.Information);
}
catch(异常异常)
{
exception.HandleException(Global.CONSTSTREXCPOLICYBUSINESS);
result.AddError(Technical发生了错误。请联系系统管理员);
}
返回结果;
}
和NameSpace是:
as i have added the .dll in references and Namespace in the .cs file.
Then also i am getting the error .Kindly help.
Pls find the code
public Result Add(IEntityBase entityBase)
{
Result result = null;
try
{
IUserEntity userEntity = entityBase as IUserEntity;
Logger.Write("Inside BpoManagerWrite.Add()", LogType.Information);
QBpoDataManager bpoDataManager = new QBpoDataManager();
OcrDataManager ocrDataManager = new OcrDataManager();
result = new Result();
ICustomerLoanData customerLoanData = QBpoEntityCreator.GetCustomerLoanDataEntity();
using (TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.Required, CommonUtility.GetRequireTransactionOptions()))
{
if(userEntity.Role == QBPOUserRole.QbpoQcUser.ToString())
{
bpoDataManager.Update(entityBase);
bpoDataManager.UpdateQCProcessed(entityBase);
}
else
{
////Add in LoanDataTable
bpoDataManager.Add(entityBase);
////Update in OCRLoan Tbl Table.Processed= 1, updated by =1 , updated date = Now
ocrDataManager.Update(entityBase);
}
transactionScope.Complete();
}
Logger.Write("Exiting BpoManagerWrite.Add()", LogType.Information);
}
catch (Exception exception)
{
exception.HandleException(Global.CONSTSTREXCPOLICYBUSINESS);
result.AddError("Technical Error occured. Please contact to system administrator");
}
return result;
}
and NameSpace are:
namespace QBPO.Application.Bpo.BusinessManagers
{
using System;
using System.Transactions;
using QBPO.Application.Bpo.BusinessInterfaces;
using QBPO.Application.Bpo.DataManagers;
using QBPO.Entities.Bpo;
using QBPO.Entities.Bpo.Entity.Interfaces;
using QBPO.Entities.UserManagement;
using QBPO.Framework;
}
其次,这是我调用方法的DataManagerCode
}
Secondily this is the DataManagerCode where i am calling the method
public int UpdateQCProcessed(IEntityBase entityBase)
{
int rowsAffected = int.MinValue;
try
{
Logger.Write("Inside QBpoDataManager.UpdateQCProcessed()", LogType.Information);
ICustomerLoanData customerLoanDataEntity = entityBase as ICustomerLoanData;
CommonDataAccess.CreateStoredProcCommandWrapper(QBpoConstants.SPUPDATECUSTOMERLOANDATA);
CommonDataAccess.AddInParameter(QBpoConstants.CUSTOMERLOANDATAID, DbType.Int32, customerLoanDataEntity.Id);
CommonDataAccess.AddInParameter(QBpoConstants.UPDATEDON, DbType.DateTime, DateTime.Now.ObjectToDBDateTime());
CommonDataAccess.AddInParameter(QBpoConstants.UPDATEDBY, DbType.Int32, customerLoanDataEntity.UpdatedBy);
rowsAffected = CommonDataAccess.ExceuteNonQuery();
Logger.Write("Exiting QBpoDataManager.UpdateQCProcessed()", LogType.Information);
}
catch (Exception exception)
{
throw exception;
}
return rowsAffected;
}
和命名空间是:
and Namespace are:
namespace QBPO.Application.Bpo.DataManagers
{
using System;
using System.Data;
using System.Text;
using QBPO.Entities.Bpo;
using QBPO.Entities.Bpo.Entity.Interfaces;
using QBPO.Entities.Common;
using QBPO.Entities.UserManagement;
using QBPO.Framework;
using QBPO.Framework.Application;
}
}
推荐答案
这篇关于如何解决程序集引用错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!