本文整理汇总了C#中BaseService.ActionData方法的典型用法代码示例。如果您正苦于以下问题:C# BaseService.ActionData方法的具体用法?C# BaseService.ActionData怎么用?C# BaseService.ActionData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseService
的用法示例。
在下文中一共展示了BaseService.ActionData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public void Execute()
{
if (!string.IsNullOrWhiteSpace(JobArgs))
{
BaseService service = new BaseService();
string status = string.Empty;
var taskArgs = JobArgs.Split('|');
JobType = taskArgs.Length > 0 ? taskArgs[0] : string.Empty;
var procedure = taskArgs.Length > 1 ? taskArgs[1] : string.Empty;
var email = taskArgs.Length > 2 ? taskArgs[2] : string.Empty;
try
{
//Gọi lệnh thực thi câu stored procedure
service.ActionData(procedure,ref status);
}
catch (Exception ex)
{
//Gọi hàm gửi mail và throw exception để lớp dưới ghi log
//Sử dụng TaskName làm tiêu đề mail gửi đi + exception
SendMail(email, JobType, ex.GetExceptionMessage());
throw;
}
}
}
示例2: ImportRecruitmentHistory
public void ImportRecruitmentHistory(string candidateIds, string UserLogin)
{
using (var context = new VnrHrmDataContext())
{
var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
var repo = new Rec_RecruitmentCampaignRepository(unitOfWork);
var repoCandidate = new Rec_CandidateRepository(unitOfWork);
var lstIds = candidateIds.Split(',');
List<Guid> listID = new List<Guid>();
for (int i = 0; i < lstIds.Length; i++)
{
try
{
listID.Add(Guid.Parse(lstIds[i].ToString()));
}
catch
{ }
}
BaseService baseService = new BaseService();
string status = string.Empty;
var listCandidates = repoCandidate.FindBy(x => listID.Contains(x.ID)).ToList();
foreach (var candidateModel in listCandidates)
{
List<object> lstObjhistory = new List<object>();
lstObjhistory.Add(candidateModel.IdentifyNumber);
lstObjhistory.Add(candidateModel.CandidateName);
lstObjhistory.Add(candidateModel.DateOfBirth);
lstObjhistory.Add(candidateModel.DateApply);
var recruimentHistory = baseService.ActionData<Rec_RecruitmentHistoryEntity>(lstObjhistory, ConstantSql.hrm_rec_sp_checkduplidaterecruimentHistory, true, UserLogin, ref status).FirstOrDefault();
if (recruimentHistory != null)
{
recruimentHistory.CandidateName = candidateModel.CandidateName;
recruimentHistory.DateOfBirth = candidateModel.DateOfBirth;
recruimentHistory.Gender = candidateModel.Gender;
recruimentHistory.Phone = candidateModel.Phone;
recruimentHistory.Mobile = candidateModel.Mobile;
recruimentHistory.Email = candidateModel.Email;
recruimentHistory.YearOfExperience = candidateModel.YearOfExperience.Value != null ? candidateModel.YearOfExperience.Value : 0;
recruimentHistory.PositionID = candidateModel.PositionID;
recruimentHistory.JobVacancyID = candidateModel.JobVacancyID;
recruimentHistory.DateApply = candidateModel.DateApply;
recruimentHistory.ScorePotential = candidateModel.ScorePotential;
recruimentHistory.HealthStatus = candidateModel.HealthStatus;
recruimentHistory.IdentifyNumber = candidateModel.IdentifyNumber;
baseService.Edit(recruimentHistory);
}
else
{
Rec_RecruitmentHistoryEntity recruimentHistoryentity = new Rec_RecruitmentHistoryEntity();
recruimentHistoryentity.CandidateID = candidateModel.ID;
recruimentHistoryentity.CandidateName = candidateModel.CandidateName;
recruimentHistoryentity.DateOfBirth = candidateModel.DateOfBirth;
recruimentHistoryentity.Gender = candidateModel.Gender;
recruimentHistoryentity.Phone = candidateModel.Phone;
recruimentHistoryentity.Mobile = candidateModel.Mobile;
recruimentHistoryentity.Email = candidateModel.Email;
recruimentHistoryentity.YearOfExperience = candidateModel.YearOfExperience.Value != null ? candidateModel.YearOfExperience.Value : 0;
recruimentHistoryentity.PositionID = candidateModel.PositionID;
recruimentHistoryentity.JobVacancyID = candidateModel.JobVacancyID;
recruimentHistoryentity.DateApply = candidateModel.DateApply;
recruimentHistoryentity.ScorePotential = candidateModel.ScorePotential;
recruimentHistoryentity.HealthStatus = candidateModel.HealthStatus;
recruimentHistoryentity.PassFilterResume = candidateModel.PassFilterResume;
recruimentHistoryentity.Status = candidateModel.Status;
recruimentHistoryentity.IdentifyNumber = candidateModel.IdentifyNumber;
baseService.Add(recruimentHistoryentity);
}
}
repo.SaveChanges();
}
}
示例3: Execute
public void Execute()
{
if (!string.IsNullOrWhiteSpace(JobArgs))
{
BaseService service = new BaseService();
string status = string.Empty;
var taskArgs = JobArgs.Split('|');
JobType = taskArgs.Length > 0 ? taskArgs[0] : string.Empty;
var procedure = taskArgs.Length > 1 ? taskArgs[1] : string.Empty;
var email = taskArgs.Length > 2 ? taskArgs[2] : string.Empty;
try
{
if (procedure == "SendMailForgetTAMScanLog")
{
SendMailForgetTAMScanLog();
}
else if (procedure == "SendMailContract")
{
LibraryService.SendMailContract();
}
else if (procedure == "SendMailEvalution")
{
LibraryService.SendMailEvalution();
}
else
{
//Gọi lệnh thực thi câu stored procedure
service.ActionData(procedure,7200, ref status);
service.SendMail(JobType, email, status, "");
//SendMail(email, JobType, status);
//List<object> obj = new List<object>();
//service.UpdateData<Eva_EvalutionData>(obj, ConstantSql.hrm_vnr_RemoveEvalutionData, ref status);
}
}
catch (Exception ex)
{
//Gọi hàm gửi mail và throw exception để lớp dưới ghi log
//Sử dụng TaskName làm tiêu đề mail gửi đi + exception
// SendMail(email, JobType, ex.GetExceptionMessage());
service.SendMail(JobType, email, ex.GetExceptionMessage(), "");
throw;
}
}
}