本文整理汇总了C#中ActionService类的典型用法代码示例。如果您正苦于以下问题:C# ActionService类的具体用法?C# ActionService怎么用?C# ActionService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionService类属于命名空间,在下文中一共展示了ActionService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetById
public Rec_JobConditionModel GetById(Guid id)
{
string status = string.Empty;
var model = new Rec_JobConditionModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Rec_JobConditionEntity>(id, ConstantSql.hrm_rec_sp_get_JobConditionById, ref status);//note
if (entity != null)
{
model = entity.CopyData<Rec_JobConditionModel>();
if (model.ConditionName == ConditionName.E_DISEASEIDS.ToString() && !string.IsNullOrEmpty(model.Value1))
{
var service1 = new BaseService();
var lst = service1.GetData<Cat_ComputingLevelMultiEntity>(model.Value1, ConstantSql.hrm_cat_sp_get_LevelGeneralByIds, UserLogin ,ref status).ToList();
var ids = model.Value1
.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => Common.OracleToDotNet(x.ToString()))
.ToList();
model.Value1 = string.Join(",", ids);
model.DiseaseIDs = string.Join(",", ids);
// model.ArrDisease = lst;
}
}
model.ActionStatus = status;
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:29,代码来源:Rec_JobConditionController.cs
示例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);
}
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Can_MealPriceTypeSettingController.cs
示例3: Post
public FIN_ApproveCashAdvanceModel Post([Bind]FIN_ApproveCashAdvanceModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<FIN_ApproveCashAdvanceModel>(model, "FIN_ApproveCashAdvance", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
if(!string.IsNullOrEmpty(model.Other))
{
model.IsEntertaiment = null;
model.TravelRequestID = null;
}
if(model.IsEntertaiment == true)
{
model.TravelRequestID = null;
}
return service.UpdateOrCreate<Fin_ApproveCashAdvanceEntity, FIN_ApproveCashAdvanceModel>(model);
}
开发者ID:dtafe,项目名称:vnr,代码行数:27,代码来源:FIN_ApproveCashAdvanceController.cs
示例4: Post
public Sys_LockObjectItemModel Post(Sys_LockObjectItemModel model)
{
ActionService service = new ActionService(UserLogin);
var lockItemServices = new Sys_LockObjectItemServices();
string message = string.Empty;
if(model.ObjectName.IndexOf(',') > 1)
{
string[] objName = model.ObjectName.Split(',');
if (objName.Length > 0)
{
foreach (var item in objName)
{
Sys_LockObjectItemEntity entity = new Sys_LockObjectItemEntity();
entity = model.CopyData<Sys_LockObjectItemEntity>();
entity.ObjectName = item;
// model = service.UpdateOrCreate<Sys_LockObjectItemEntity, Sys_LockObjectItemModel>(model);
model.ActionStatus = lockItemServices.Add(entity);
}
}
return model;
}
return service.UpdateOrCreate<Sys_LockObjectItemEntity, Sys_LockObjectItemModel>(model);
}
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Sys_LockObjectItemController.cs
示例5: GetById
public Cat_RateInsuranceModel GetById(Guid id)
{
string status = string.Empty;
var model = new Cat_RateInsuranceModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Cat_RateInsuranceEntity>(id, ConstantSql.hrm_cat_sp_get_RateInsuranceById, ref status);
if (entity!=null)
{
model = entity.CopyData<Cat_RateInsuranceModel>();
#region nhân 100 cho các tỉ lệ (để hiển thị %)
if (model != null)
{
model.SocialInsCompRate = model.SocialInsCompRate*100 ;
model.SocialInsEmpRate = model.SocialInsEmpRate * 100;
model.HealthInsCompRate = model.HealthInsCompRate * 100;
model.HealthInsEmpRate = model.HealthInsEmpRate * 100;
model.UnemployInsCompRate = model.UnemployInsCompRate * 100;
model.UnemployInsEmpRate = model.UnemployInsEmpRate * 100;
}
#endregion
}
model.ActionStatus = status;
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:26,代码来源:Cat_RateInsuranceController.cs
示例6: DeleteOrRemove
public FIN_ApproveTravelCostModel DeleteOrRemove(string id)
{
ActionService service = new ActionService(UserLogin);
var result1 = service.DeleteOrRemove<FIN_TravelRequestEntity, FIN_TravelRequestModel>(id);
var result= result1.CopyData<FIN_ApproveTravelCostModel>();
return result;
}
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:FIN_ApproveTravelCostController.cs
示例7: DeleteOrRemove
/// <summary>
/// [Chuc.Nguyen] - Xóa hoặc chuyển đổi trạng thái của Ngân Hàng(Tra_Certificate) sang IsDelete
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Tra_TraineeCertificateModel DeleteOrRemove(string id)
{
ActionService service = new ActionService(UserLogin);
var traineeCertificateServices = new Tra_TraineeCertificateServices();
string status = string.Empty;
var result = new Tra_TraineeCertificateModel();
Guid[] _TraineeIds = null;
var Ids = id.Substring(7);
if(Ids != null)
{
_TraineeIds = Ids.Split(',').Select(s => Guid.Parse(s)).ToArray();
}
var objTraineeCertificate = new List<object>();
objTraineeCertificate.Add(1);
objTraineeCertificate.Add(int.MaxValue -1);
var lstTraineeCertificate = traineeCertificateServices.GetData<Tra_TraineeCertificateEntity>(objTraineeCertificate, ConstantSql.hrm_tra_sp_get_TraineeCertificate,UserLogin, ref status).ToList();
if (lstTraineeCertificate != null)
{
lstTraineeCertificate = lstTraineeCertificate.Where(s => _TraineeIds.Contains(s.TraineeID.Value)).ToList();
}
var lstTraineeCertificateIds = lstTraineeCertificate.Select(s => s.ID).ToList();
var strIds = string.Join(",", lstTraineeCertificateIds.ToArray());
if (!string.IsNullOrEmpty(strIds))
{
var strRemoveIds = DeleteType.Remove.ToString() + "," + strIds;
result = service.DeleteOrRemove<Tra_TraineeCertificateEntity, Tra_TraineeCertificateModel>(strRemoveIds);
return result;
}
return result;
}
开发者ID:dtafe,项目名称:vnr,代码行数:37,代码来源:Tra_TraineeCertificateController.cs
示例8: 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);
}
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Cat_HDTJobGroupController.cs
示例9: 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);
}
开发者ID:dtafe,项目名称:vnr,代码行数:26,代码来源:Rec_InterviewCampaignDetailController.cs
示例10: DeleteOrRemove
public Rec_RecruitmentHistoryModel DeleteOrRemove(string id)
{
ActionService service = new ActionService(UserLogin);
var result = service.DeleteOrRemove<Rec_RecruitmentHistoryEntity, Rec_RecruitmentHistoryModel>(id);
return result;
}
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Rec_RecruitmentHistoryController.cs
示例11: DeleteOrRemove
public FIN_ClaimCostPaymentApproveModel DeleteOrRemove(string id)
{
ActionService service = new ActionService(UserLogin);
var result1 = service.DeleteOrRemove<FIN_ClaimEntity, FIN_ClaimModel>(id);
var result = result1.CopyData<FIN_ClaimCostPaymentApproveModel>();
return result;
}
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:FIN_ClaimCostPaymentApproveController.cs
示例12: Post
public Cat_RateInsuranceModel Post([Bind]Cat_RateInsuranceModel model)
{
#region Validate
string message = string.Empty;
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_RateInsuranceModel>(model, "Cat_RateInsurance", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
ActionService service = new ActionService(UserLogin);
#region chia 100 cho các tỉ lệ (để hiển thị %)
if (model != null)
{
model.SocialInsCompRate = model.SocialInsCompRate / 100;
model.SocialInsEmpRate = model.SocialInsEmpRate / 100;
model.HealthInsCompRate = model.HealthInsCompRate / 100;
model.HealthInsEmpRate = model.HealthInsEmpRate / 100;
model.UnemployInsCompRate = model.UnemployInsCompRate / 100;
model.UnemployInsEmpRate = model.UnemployInsEmpRate / 100;
}
#endregion
return service.UpdateOrCreate<Cat_RateInsuranceEntity, Cat_RateInsuranceModel>(model);
}
开发者ID:dtafe,项目名称:vnr,代码行数:27,代码来源:Cat_RateInsuranceController.cs
示例13: DeleteOrRemove
/// <summary>
/// [Chuc.Nguyen] - Xóa hoặc chuyển đổi trạng thái của Ngân Hàng(Tra_Certificate) sang IsDelete
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Tra_ClassModel DeleteOrRemove(string id)
{
var model = new Tra_ClassModel();
ActionService service = new ActionService(UserLogin);
var baseServices = new Tra_ClassServices();
//var baseService = new BaseService();
bool isDelete = true;
string status = "";
var idItem = id.Split(',');
foreach (var item in idItem)
{
var idInt = Guid.Empty;
Guid.TryParse(item, out idInt);
if (idInt != Guid.Empty)
{
var objs = new List<object>();
objs.Add(Guid.Parse(item));
var result = baseServices.GetData<Tra_TraineeEntity>(objs, ConstantSql.hrm_cat_sp_get_TraineeByClassID, UserLogin, ref status);
if (result != null && result.Count > 0)
{
isDelete = false;
break;
}
}
}
if (isDelete)
model = service.DeleteOrRemove<Tra_ClassEntity, Tra_ClassModel>(id);
else
{
status = ConstantMessages.YouMustDeleteDetailRecord.TranslateString();
model.SetPropertyValue(Constant.ActionStatus, status);
}
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:39,代码来源:Tra_ClassController.cs
示例14: GetById
public Eva_PerformanceModel GetById(Guid id)
{
string status = string.Empty;
var performanceService = new Eva_PerformanceServices();
var model = new Eva_PerformanceModel();
var service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Eva_PerformanceEntity>(id, ConstantSql.hrm_eva_sp_get_PerformanceById, ref status);
if (entity != null)
{
model = entity.CopyData<Eva_PerformanceModel>();
// model.AttachFileLast = model.AttachFile;
#region Đọc Xml từ db và chuyển sang string
if (model != null)
{
var doc = performanceService.ReadXml(model.AttachFile, AttachFileEntity.FieldNames.FullName);
model.AttachFileLast = string.Join(",", doc.ToArray());
model.AttachFile = model.AttachFileLast;
model.AttachFiles = doc;
}
#endregion
}
model.ActionStatus = status;
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:28,代码来源:Eva_Performance360Controller.cs
示例15: GetById
/// <summary>
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Tra_RequirementTrainModel GetById(Guid id)
{
string status = string.Empty;
var model = new Tra_RequirementTrainModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Tra_RequirementTrainEntity>(id, ConstantSql.hrm_tra_sp_get_RequirementTrainIds, ref status);
if (entity!=null)
{
model = entity.CopyData<Tra_RequirementTrainModel>();
if (entity.PersonRequirement != null)
{
Guid profileid = Guid.Parse(entity.PersonRequirement);
var entityprofile = service.GetByIdUseStore<Tra_RequirementTrainEntity>(profileid, ConstantSql.hrm_hr_sp_get_ProfileById, ref status);
if (entityprofile != null && entityprofile.ProfileID != null && entityprofile.ProfileName != null)
{
model.ProfileID = entityprofile.ID;
model.ProfileName = entityprofile.ProfileName;
model.CodeEmp = entityprofile.CodeEmp;
}
}
}
if (model.IsTrainingOutside != null && model.IsTrainingOutside == false)
model.IsTrainingInside = true;
model.ActionStatus = status;
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:30,代码来源:Tra_RequirementTrainCustormController.cs
示例16: GetById
/// <summary>
/// [Chuc.Nguyen] - Lấy dữ liệu bảng Tai Nạn(Hre_Accident) theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public FIN_ClaimModel GetById(Guid id)
{
string status = string.Empty;
var model = new FIN_ClaimModel();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<FIN_ClaimEntity>(id, ConstantSql.hrm_hr_sp_get_ClaimById, ref status);
if (entity != null)
{
model = entity.CopyData<FIN_ClaimModel>();
if (!string.IsNullOrEmpty(model.Other))
{
model.IsManufactureName = true;
}
else {
model.IsProfile = true;
}
if(model.IsCashAdvance != null && model.IsCashAdvance == false)
{
model.IsNoneCashAdvance = true;
}
if (model.IsCashAdvance != null && model.IsCashAdvance == true)
{
model.IsNoneCashAdvance = false;
}
}
model.ActionStatus = status;
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:37,代码来源:FIN_ClaimController.cs
示例17: Get
// GET api/<controller>/5
public Cat_UnusualAllowanceCfgModel Get(Guid id)
{
var profileName = string.Empty;
var service = new Cat_UnusualAllowanceCfgServices();
ActionService actionService = new ActionService(UserLogin);
var result = actionService.GetByIdUseStore<Cat_UnusualAllowanceCfgEntity>(id, ConstantSql.hrm_cat_sp_get_UnusualAllowanceCfgId, ref status);
if (result == null)
{
return new Cat_UnusualAllowanceCfgModel();
}
var cat_UnsualAllowanceCfgEntity = new Cat_UnusualAllowanceCfgModel
{
ID = result.ID,
Code = result.Code,
Comment = result.Comment,
UnusualAllowanceCfgName = result.UnusualAllowanceCfgName,
IsAddToHourlyRate = result.IsAddToHourlyRate,
IsChargePIT = result.IsChargePIT,
IsExcludePayslip = result.IsExcludePayslip,
MethodCalculation = result.MethodCalculation,
Formula = result.Formula,
EDType = result.EDType,
Amount = result.Amount,
Type = result.Type
};
return cat_UnsualAllowanceCfgEntity;
}
开发者ID:dtafe,项目名称:vnr,代码行数:32,代码来源:Cat_UnusualAllowanceCfgController.cs
示例18: GetById
/// <summary>
/// [Son.Vo] - Lấy dữ liệu OrgStructure(Cat_OrgStructure) theo Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public CatOrgStructureModel GetById(Guid id)
{
string status = string.Empty;
var model = new CatOrgStructureModel();
var orgServices = new Cat_OrgMoreInforServices();
ActionService service = new ActionService(UserLogin);
var entity = service.GetByIdUseStore<Cat_OrgStructureEntity>(id,ConstantSql.hrm_cat_sp_get_OrgStructureById ,ref status);
var objs = new List<object>();
objs.Add(Common.DotNetToOracle(id.ToString()));
var orgInfoEntity = orgServices.GetData<Cat_OrgMoreInforEntity>(objs, ConstantSql.hrm_hr_sp_get_OrgMoreInfoByOrgID, UserLogin, ref status).FirstOrDefault();
if (entity != null)
{
model = entity.CopyData<CatOrgStructureModel>();
if (orgInfoEntity != null)
{
model.ServicesType = orgInfoEntity.ServicesType;
model.BillingAddress = orgInfoEntity.BillingAddress;
model.ContractFrom = orgInfoEntity.ContractFrom;
model.ContractTo = orgInfoEntity.ContractTo;
model.BillingCompanyName = orgInfoEntity.BillingCompanyName;
model.TaxCode = orgInfoEntity.TaxCode;
model.DescriptionInfo = orgInfoEntity.Description;
model.DurationPay = orgInfoEntity.DurationPay;
model.RecipientInvoice = orgInfoEntity.RecipientInvoice;
model.TelePhone = orgInfoEntity.TelePhone;
model.CellPhone = orgInfoEntity.CellPhone;
model.EmailInfo = orgInfoEntity.Email;
model.OrgMoreInforID = (Guid?)orgInfoEntity.ID;
}
}
model.ActionStatus = status;
return model;
}
开发者ID:dtafe,项目名称:vnr,代码行数:40,代码来源:CatOrgStructureController.cs
示例19: 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;
}
开发者ID:dtafe,项目名称:vnr,代码行数:39,代码来源:Tra_ClassController.cs
示例20: 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;
}
开发者ID:dtafe,项目名称:vnr,代码行数:58,代码来源:Att_LeavedayController.cs
注:本文中的ActionService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论