本文整理汇总了C#中ActionService.GetData方法的典型用法代码示例。如果您正苦于以下问题:C# ActionService.GetData方法的具体用法?C# ActionService.GetData怎么用?C# ActionService.GetData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionService
的用法示例。
在下文中一共展示了ActionService.GetData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetById
/// <summary>
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Tra_ClassModel GetById(Guid id)
{
string status = string.Empty;
var model = new Tra_ClassModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Tra_ClassEntity>(id, ConstantSql.hrm_tra_sp_get_ClassById, ref status);
if (entity!=null)
{
if (entity.TrainerOtherList != null)
entity.TrainerOtherList = entity.TrainerOtherList.Replace(" ", "");
model = entity.CopyData<Tra_ClassModel>();
if(model.IsTrainingOut == false)
{
model.IsTrainingInside = true;
}
if (entity.Teacher != null)
{
//Guid profileid = Guid.Parse(entity.Teacher);
var lstEntityprofile = service.GetData<Tra_RequirementTrainEntity>(entity.Teacher, ConstantSql.hrm_hr_sp_get_ProfileById, ref status);
if (lstEntityprofile!=null && lstEntityprofile.Count > 0)
{
var entityprofile = lstEntityprofile[0];
if (entityprofile != null && entityprofile.ProfileID != null && entityprofile.ProfileName != null)
{
model.ProfileID = entityprofile.ID;
model.ProfileName = entityprofile.ProfileName;
model.CodeEmp = entityprofile.CodeEmp;
}
}
}
}
model.ActionStatus = status;
return model;
}
示例2: Post
public Rec_InterviewCampaignDetailModel Post([Bind]Rec_InterviewCampaignDetailModel model)
{
ActionService service = new ActionService(UserLogin);
string status = string.Empty;
if (model.InterviewCampaignID != null)
{
var interviewcampaign = service.GetData<Rec_InterviewCampaignEntity>(Common.DotNetToOracle(model.InterviewCampaignID.ToString()), ConstantSql.hrm_rec_sp_get_InterviewCampaignById, ref status).FirstOrDefault();
if (interviewcampaign != null)
{
model.DateFrom = interviewcampaign.DateInterviewFrom;
model.DateTo = interviewcampaign.DateInterviewTo;
model.LevelInterview = interviewcampaign.LevelInterview;
}
}
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Rec_InterviewCampaignDetailModel>(model, "Rec_InterviewCampaignDetail", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
return service.UpdateOrCreate<Rec_InterviewCampaignDetailEntity, Rec_InterviewCampaignDetailModel>(model);
}
示例3: GetById
public Att_LeaveDayModel GetById(Guid id)
{
string status = string.Empty;
var model = new Att_LeaveDayModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Att_LeaveDayEntity>(id, ConstantSql.hrm_att_sp_get_LeaveDayById, ref status);
if (entity != null)
{
model = entity.CopyData<Att_LeaveDayModel>();
if (model.LeaveHours != null && model.LeaveHours > 0)
{
if (model.DurationType == LeaveDayDurationType.E_FIRSTHALFSHIFT.ToString() || model.DurationType == LeaveDayDurationType.E_LASTHALFSHIFT.ToString())
{
var guiId = model.ProfileID;
var start = model.DateStart;
var end = model.DateEnd;
if (guiId != null && guiId != Guid.Empty && start != null && end != null)
{
var listRoster = service.GetData<Att_RosterEntity>(guiId, ConstantSql.hrm_att_sp_get_RosterByProfileId, ref status);
if (listRoster != null)
{
for (DateTime i = start; i <= end; i = i.AddDays(1))
{
var roster = listRoster.Where(d => d.DateStart <= i && d.DateEnd >= i).FirstOrDefault();
if (roster != null)
{
var shift = SearchShift(roster, i);
if (shift != null && shift != Guid.Empty)
{
var catShift = service.GetByIdUseStore<Cat_ShiftEntity>((Guid)shift, ConstantSql.hrm_cat_sp_get_ShiftById, ref status);
if (catShift != null)
{
if (model.DurationType == LeaveDayDurationType.E_FIRSTHALFSHIFT.ToString())
{
model.HoursFrom = catShift.InTime;
model.HoursTo = catShift.InTime.AddHours(catShift.CoBreakOut);
break;
}
else
{
model.HoursFrom = catShift.InTime.AddHours(catShift.CoBreakIn);
model.HoursTo = catShift.InTime.AddHours(catShift.CoOut);
break;
}
}
}
}
}
}
}
}
}
}
model.ActionStatus = status;
return model;
}
示例4: GetById
/// <summary>
/// Chú ý là mượn page để get list Master
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public List<Rep_MasterModel> GetById(Guid id)
{
string status = string.Empty;
var model = new List<Rep_MasterModel>();
ActionService service = new ActionService(UserLogin);
var listModel = new List<object>();
listModel.AddRange(new object[3]);
listModel[1] = 1;
listModel[2] = Int32.MaxValue - 1;
var entity = service.GetData<Rep_MasterModel>(listModel, ConstantSql.hrm_rep_sp_get_Master, ref status);
return entity != null ? entity.ToList() : new List<Rep_MasterModel>();
}
示例5: GetById
/// <summary>
/// [Tam.Le] - Lấy dữ liệu MachineOfLine theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Can_MachineOfLineModel GetById(Guid id)
{
string status = string.Empty;
var model = new Can_MachineOfLineModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<Can_MachineOfLineEntity>(id, ConstantSql.hrm_can_sp_get_machineoflinebyid, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Can_MachineOfLineModel>();
}
model.ActionStatus = status;
return model;
}
示例6: GetById
/// <summary>
/// [Son.Vo] - Lấy dữ liệu Relatives(Hre_Relatives) theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Hre_RelativesModel GetById(Guid id)
{
string status = string.Empty;
var model = new Hre_RelativesModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<Hre_RelativesEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_RelativesById, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Hre_RelativesModel>();
}
model.ActionStatus = status;
return model;
}
示例7: GetById
public Rep_ConditionItemModel GetById(Guid id)
{
string status = string.Empty;
var model = new Rep_ConditionItemModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<Rep_ConditionItemEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_rep_sp_get_ConditionItemByID, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Rep_ConditionItemModel>();
}
model.ActionStatus = status;
return model;
}
示例8: GetById
public Can_MealAllowanceTypeSettingModel GetById(Guid id)
{
string status = string.Empty;
var model = new Can_MealAllowanceTypeSettingModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<Can_MealAllowanceTypeSettingEntity>(id, ConstantSql.hrm_can_sp_get_mealallowtypebyid, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Can_MealAllowanceTypeSettingModel>();
}
model.ActionStatus= status;
return model;
}
示例9: GetById
/// <summary>
/// [Quan.Nguyen] - Lấy dữ liệu Cat_TAMScanReasonMiss(Cat_TAMScanReasonMiss) theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Cat_TAMScanReasonMissModel GetById(Guid id)
{
string status = string.Empty;
var model = new Cat_TAMScanReasonMissModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<Cat_TAMScanReasonMissEntity>(id, ConstantSql.hrm_cat_sp_get_TAMScanReasonMiss_ById, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Cat_TAMScanReasonMissModel>();
}
model.ActionStatus = status;
return model;
}
示例10: GetById
/// <summary>
/// [Tin.Nguyen] - Lấy dữ liệu Tủ Đồ(Lau_Locker) theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Lau_LaundryRecordModel GetById(Guid id)
{
string status = string.Empty;
var model = new Lau_LaundryRecordModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<LMS_LaundryRecordEntity>(id, ConstantSql.hrm_lau_sp_get_LaundryRecord_byId, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Lau_LaundryRecordModel>();
}
model.ActionStatus = status;
return model;
}
示例11: Get
public Can_TamScanLogModel Get(Guid id)
{
string status = string.Empty;
var model = new Can_TamScanLogModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetData<Can_TamScanLogEntity>(id, ConstantSql.hrm_can_sp_get_tamscanlogbyid, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Can_TamScanLogModel>();
}
model.ActionStatus = status;
return model;
}
示例12: GetById
/// <summary>
/// [Son.Vo] - Lấy dữ liệu Trình độ chuyên môn(Hre_Qualification) theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Hre_ProfileLanguageLevelModel GetById(Guid id)
{
string status = string.Empty;
var model = new Hre_ProfileLanguageLevelModel();
ActionService service = new ActionService(UserLogin);
//var entity = service.GetByIdUseStore<Hre_QualificationEntity>(id,ConstantSql.hrm_hr_sp_get_QualificationById, ref status);
var entity = service.GetData<Hre_ProfileLanguageLevelEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_ProfileLanguageById, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<Hre_ProfileLanguageLevelModel>();
}
model.ActionStatus = status;
return model;
}
示例13: GetMultiChildSick
public JsonResult GetMultiChildSick(string text, Guid profileId)
{
string status = string.Empty;
List<object> lstParam = new List<object>();
lstParam.Add(text);
lstParam.Add(profileId);
var service = new ActionService(UserLogin);
var get = service.GetData<Ins_ChildSickEntity>(lstParam, ConstantSql.hrm_ins_sp_get_ChildSick_Multi, ref status);
var result = get.Select(item => new Ins_ChildSickModel()
{
ID = item.ID,
ChildSickName = item.ChildSickName
});
return Json(result, JsonRequestBehavior.AllowGet);
}
示例14: CheckProfileStoWorked
//Check nv da nghi viec
public JsonResult CheckProfileStoWorked(Guid profileid)
{
ActionService service = new ActionService(UserLogin);
if (profileid != Guid.Empty)
{
string status = string.Empty;
var entity = service.GetData<Hre_ProfileEntity>(Common.DotNetToOracle(profileid.ToString()), ConstantSql.hrm_hr_sp_get_ProfileById, ref status).FirstOrDefault();
if (entity != null && entity.DateQuit != null && entity.DateQuit < DateTime.Now)
{
return Json("error");
}
}
return Json("success");
}
示例15: Post
public Hre_CandidateHistoryModel Post([Bind]Hre_CandidateHistoryModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Hre_CandidateHistoryModel>(model, "Hre_CandidateHistory", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
string status = string.Empty;
var candidateHistoryservices = new Hre_CandidateHistoryServices();
ActionService service = new ActionService(UserLogin);
if(model.CandidateID != null && model.CandidateID != Guid.Empty)
{
var profileBycandidateID = service.GetData<Hre_ProfileEntity>(Common.DotNetToOracle(model.CandidateID.ToString()), ConstantSql.hrm_hr_sp_get_ProfileByCandidateID, ref status).FirstOrDefault();
if (profileBycandidateID != null)
{
var canhisbyprofile = service.GetData<Hre_CandidateHistoryEntity>(Common.DotNetToOracle(profileBycandidateID.ID.ToString()), ConstantSql.hrm_hr_sp_get_CandidateHistoryByProfileId, ref status).FirstOrDefault();
if (canhisbyprofile != null)
{
model.ID = canhisbyprofile.ID;
model.ProfileID = canhisbyprofile.ProfileID;
}
}
}
if (model.ProfileID != null && model.ProfileID != Guid.Empty)
{
var profile = service.GetData<Hre_ProfileEntity>(Common.DotNetToOracle(model.ProfileID.ToString()), ConstantSql.hrm_hr_sp_get_ProfileById, ref status).FirstOrDefault();
if (profile != null)
{
if(profile.CandidateID != null)
{
var canhisbyprofile = service.GetData<Hre_CandidateHistoryEntity>(Common.DotNetToOracle(profile.CandidateID.ToString()), ConstantSql.hrm_hr_sp_get_CandidateHistoryByCandidateId, ref status).FirstOrDefault();
if (canhisbyprofile != null)
{
model.ID = canhisbyprofile.ID;
model.CandidateID = canhisbyprofile.CandidateID;
}
}
}
}
return service.UpdateOrCreate<Hre_CandidateHistoryEntity, Hre_CandidateHistoryModel>(model);
}