EchoTex_Payroll/HRM.BO/Survey/SurveyResult.cs
2024-10-14 10:01:49 +06:00

192 lines
3.9 KiB
C#

using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Reflection;
namespace HRM.BO
{
public class SurveyResult : AuditTrailBase
{
#region Constructor
public SurveyResult()
{
_surveyID = 0;
_employeeID = 0;
_questionID = 0;
_answerID = 0;
_isCorrect = false;
_forEmployeeID = 0;
_candidateID = 0;
_weight = 0;
}
#endregion
#region Properties
#region SurveyID : ID
private int _surveyID;
public int SurveyID
{
get { return _surveyID; }
set
{
_surveyID = value;
}
}
#endregion
#region EmployeeID : int
private int? _employeeID;
public int? EmployeeID
{
get { return _employeeID; }
set
{
_employeeID = value;
}
}
#endregion
#region QuestionID : int
private int _questionID;
public int QuestionID
{
get { return _questionID; }
set
{
_questionID = value;
}
}
#endregion
#region AnswerID : int
private int _answerID;
public int AnswerID
{
get { return _answerID; }
set
{
_answerID = value;
}
}
#endregion
#region IsCorrect : bool
private bool _isCorrect;
public bool IsCorrect
{
get { return _isCorrect; }
set
{
_isCorrect = value;
}
}
#endregion
#region ForEmployeeID : int
private int _forEmployeeID;
public int ForEmployeeID
{
get { return _forEmployeeID; }
set
{
_forEmployeeID = value;
}
}
#endregion
#region CandidateID : int
private int _candidateID;
public int CandidateID
{
get { return _candidateID; }
set
{
_candidateID = value;
}
}
#endregion
#region Weight : double
private double _weight;
public double Weight
{
get { return _weight; }
set
{
_weight = value;
}
}
#endregion
#region Service Factory IPFTransactionService : IPFTransactionService
internal static ISurveyResultService Service
{
get { return Services.Factory.CreateService<ISurveyResultService>(typeof(ISurveyResultService)); }
}
#endregion
#endregion
}
public class Result : AuditTrailBase
{
public double totalMark { get; set; }
public double? totalTime { get; set; }
public string takenTime { get; set; }
public int questionCount { get; set; }
public int answerCount { get; set; }
}
#region ISurveyResult Service
public interface ISurveyResultService
{
List<SurveyResult> GetSurveyResult(int surveyId);
List<SurveyResult> GetSurveyResult(int surveyId, string employeeIds);
List<SurveyResult> GetSurveyResult(int surveyId, int employeeId, int questionID);
List<SurveyResult> GetSurveyResult();
DataSet GetSurveyResultReport(int surveyID);
int Save(SurveyResult item);
void Save(List<SurveyResult> oSrslts);
void Delete(int id);
SurveyResult GetSurveyResultByCandidateID(int surveyId, int candidateId, int questionID);
void DeleteByCandidateID(int surveyId, int candidateId, int questionID);
List<SurveyResult> GetSurveyResults(int surveyId, int candidateId);
}
#endregion
}