本文整理汇总了C#中ActionService.UpdateOrCreate方法的典型用法代码示例。如果您正苦于以下问题:C# ActionService.UpdateOrCreate方法的具体用法?C# ActionService.UpdateOrCreate怎么用?C# ActionService.UpdateOrCreate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionService
的用法示例。
在下文中一共展示了ActionService.UpdateOrCreate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Post
public Cat_HDTJobGroupModel Post([Bind]Cat_HDTJobGroupModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_HDTJobGroupModel>(model, "Cat_HDTJobGroup", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
ActionService action = new ActionService(UserLogin);
string status = string.Empty;
if(model.ID!= null)
{
var resut = action.GetByIdUseStore<Cat_HDTJobGroupEntity>(model.ID, ConstantSql.hrm_cat_sp_get_HDTJobGroupById, ref status);
if (resut != null && resut.Status == EnumDropDown.Status.E_APPROVED.ToString())
{
model.ActionStatus = ConstantDisplay.StatusApproveCannotEdit.TranslateString();
return model;
}
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Cat_HDTJobGroupEntity, Cat_HDTJobGroupModel>(model);
}
示例2: Post
public Can_MealAllowanceTypeSettingModel Post([Bind]Can_MealAllowanceTypeSettingModel model)
{
ActionService service = new ActionService(UserLogin);
model.Standard = true;
return service.UpdateOrCreate<Can_MealAllowanceTypeSettingEntity, Can_MealAllowanceTypeSettingModel>(model);
}
示例3: 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);
}
示例4: Post
public Cat_GradeAttendanceModel Post([Bind]Cat_GradeAttendanceModel model)
{
model.RosterType = GradeRosterType.E_ISROSTER.ToString();
ActionService service = new ActionService(UserLogin);
if (model.FormulaAnnualLeave != null)
{
model.FormulaAnnualLeave = model.FormulaAnnualLeave.Replace("[+]", "+");
}
return service.UpdateOrCreate<Cat_GradeAttendanceEntity, Cat_GradeAttendanceModel>(model);
}
示例5: Post
public Sys_ConditionApprovedModel Post([Bind]Sys_ConditionApprovedModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Sys_ConditionApprovedModel>(model, "Sys_ConditionApproved", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Sys_ConditionApprovedEntity, Sys_ConditionApprovedModel>(model);
}
示例6: Post
public Cat_PivotModel Post([Bind]Cat_PivotModel model)
{
//#region Validate
//string message = NotificationType.Success.ToString();
//var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_PivotModel>(model, "Cat_Pivot", ref message);
//if (!checkValidate)
//{
// model.ActionStatus = message;
// return model;
//}
//#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Cat_PivotEntity, Cat_PivotModel>(model);
}
示例7: Post
public Cat_SyncModel Post([Bind]Cat_SyncModel model)
{
#region Validate
string message = NotificationType.Success.ToString();
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_SyncModel>(model, "Cat_Sync", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Cat_SyncEntity, Cat_SyncModel>(model);
}
示例8: Post
public Hre_VisaInfoModel Post([Bind]Hre_VisaInfoModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Hre_VisaInfoModel>(model, "Hre_VisaInfo", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Hre_VisaInfoEntity, Hre_VisaInfoModel>(model);
}
示例9: Post
public Rec_CandidateComputingLevelModel Post([Bind]Rec_CandidateComputingLevelModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Rec_CandidateComputingLevelModel>(model, "Rec_CandidateComputingLevel", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Rec_CandidateComputingLevelEntity, Rec_CandidateComputingLevelModel>(model);
}
示例10: Post
public Pur_MCAMModel Post([Bind]Pur_MCAMModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Pur_MCAMModel>(model, "Pur_MCAM_CreateOrUpdate", "Pur_MCAM", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Pur_MCAMEntity, Pur_MCAMModel>(model);
}
示例11: Post
public Tra_TraineeScoreModel Post([Bind]Tra_TraineeScoreModel model)
{
#region Validate
ActionService service = new ActionService(UserLogin);
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Tra_TraineeScoreModel>(model, "Tra_TraineeScore", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
return service.UpdateOrCreate<Tra_TraineeScoreEntity, Tra_TraineeScoreModel>(model);
}
示例12: Post
public Cat_UsualAllowanceLevelModel Post([Bind]Cat_UsualAllowanceLevelModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_UsualAllowanceLevelModel>(model, "Cat_UsualAllowanceLevel", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Cat_UsualAllowanceLevelEntity, Cat_UsualAllowanceLevelModel>(model);
}
示例13: Post
public Kai_RankMarkModel Post([Bind]Kai_RankMarkModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Kai_RankMarkModel>(model, "Kai_RankMark", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Kai_RankMarkEntity, Kai_RankMarkModel>(model);
}
示例14: Post
public Cat_NameEntityModel Post([Bind]Cat_NameEntityModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_NameEntityModel>(model, "Cat_NameEntity", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
model.NameEntityType = "E_Graduated_LEVEL";
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Cat_NameEntityEntity, Cat_NameEntityModel>(model);
}
示例15: Post
public Sal_RevenueForProfileModel Post([Bind]Sal_RevenueForProfileModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Sal_RevenueForProfileModel>(model, "Sal_RevenueForProfile", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
return service.UpdateOrCreate<Sal_RevenueForProfileEntity, Sal_RevenueForProfileModel>(model);
}