当前位置: 首页>>代码示例>>C#>>正文


C# BaseService.ActionData方法代码示例

本文整理汇总了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;
                }
            }
        }
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Sys_AutoBackupServices.cs

示例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();

            }
        }
开发者ID:dtafe,项目名称:vnr,代码行数:73,代码来源:Rec_RecruitmentHistoryServices.cs

示例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;
                    }
                }
            }
开发者ID:dtafe,项目名称:vnr,代码行数:48,代码来源:ScheduleTaskExcute.cs


注:本文中的BaseService.ActionData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。