HI,
I hit the error as attached when I have 2 users perform same action at the same time. Any ideas?
Beside, may I know any special thing I need to take care of in web environment?
Please advice. Urgent!
public class LeavePersonalApplication : LeavePersonalApplicationBasePage
{
protected ResultSet Submit(ActionType actionType)
{
ResultSet result = new ResultSet();
this.LVELeaves.SubmitterAction = actionType;
this.LVELeaves.OwnerAction = actionType;
DocHelper docHelper = new DocHelper((IEmployeesBO)this.Owner,
(IEmployeesBO)this.Submitters,
(IDocumentsBO)this.LeaveAppUserControl.LVELeaves, Guid.NewGuid().ToString());
result = docHelper.Submit();
return result;
}
}
public class DocHelper
{
public DocHelper(VfsEmpInterface.IEmployeesBO documentOwner,
VfsEmpInterface.IEmployeesBO documentSubmitter,
VfsGenInterface.IDocumentsBO document)
{
if (documentOwner != null)
this.DocumentOwner = documentOwner;
else
throw new NullReferenceException("DocHelper: Document's Owner has Null Reference during Initialization.");
if (documentSubmitter != null)
this.DocumentSubmitter = documentSubmitter;
else
throw new NullReferenceException("DocHelper: Document's Submitter has Null Reference during Initialization.");
if (document != null)
this.Document = document;
else
throw new NullReferenceException("DocHelper: Document has Null Reference during Initialization.");
this.TransactionKey = new Guid().ToString();
this.document.SysDocId = SysDocBO.SysDocId;
}
public DocHelper(VfsEmpInterface.IEmployeesBO documentOwner,
VfsEmpInterface.IEmployeesBO documentSubmitter,
VfsGenInterface.IDocumentsBO document,
string transactionKey): this(documentOwner, documentSubmitter, document)
{
this.TransactionKey = transactionKey;
}
public VfsGenBO.ResultSet Submit()
{
VfsGenBO.ResultSet result = new VfsGenBO.ResultSet();
VfsWfBO.TasksBO task = new VfsWfBO.TasksBO();
BusinessLayerExtension.TransactionBegin(VfsWfHelper.WfHelper.WORKFLOW_DSKEY, this.TransactionKey, IsolationLevel.ReadCommitted);
BusinessLayerExtension.TransactionBegin(ESSLVE_DSKEY, this.TransactionKey, IsolationLevel.ReadCommitted);
BusinessLayerExtension.TransactionBegin(HRMSLVE_DSKEY, this.TransactionKey, IsolationLevel.ReadCommitted);
// Save data here
}
}