本文整理汇总了C#中BaseService.GetDataNotParam方法的典型用法代码示例。如果您正苦于以下问题:C# BaseService.GetDataNotParam方法的具体用法?C# BaseService.GetDataNotParam怎么用?C# BaseService.GetDataNotParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseService
的用法示例。
在下文中一共展示了BaseService.GetDataNotParam方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get
public IEnumerable<Eva_SalesTypeMultiModel> Get()
{
BaseService service = new BaseService();
string status = string.Empty;
var listEntity = service.GetDataNotParam<Eva_SalesTypeMultiModel>(ConstantSql.hrm_eva_sp_get_SalesType_multi,UserLogin, ref status);
if (listEntity != null)
{
var listModel = listEntity.Translate<Eva_SalesTypeMultiModel>();
return listModel;
}
return new List<Eva_SalesTypeMultiModel>();
}
示例2: Post
public Eva_SaleBonusModel Post([Bind]Eva_SaleBonusModel model)
{
#region Validate
string message = string.Empty;
string status=string.Empty;
var baseService = new ActionService(UserLogin);
var bService = new BaseService();
var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Eva_SaleBonusModel>(model, "Eva_SaleBonus", ref message);
if (!checkValidate)
{
model.ActionStatus = message;
return model;
}
#endregion
#region kt trùng dữ liệu với Jobttile,KPI,Type theo mức phần %
List<object> lst=new List<object>();
var lstSaleBonus = bService.GetDataNotParam<Eva_SaleBonusEntity>(ConstantSql.hrm_eva_getdata_SaleBonus,UserLogin, ref status).ToList();
if (lstSaleBonus != null && lstSaleBonus.Count != 0)
{
if (model.ID == Guid.Empty)
{
if (lstSaleBonus.Where(x => x.JobTittleID == model.JobTittleID && x.SalesTypeID == model.SalesTypeID && x.Type == model.Type && x.FromPercent <= model.ToPercent && x.ToPercent >= model.FromPercent).Count() > 0)
{
model.SetPropertyValue(Constant.ActionStatus, NotificationType.Error + "," + string.Format(ConstantMessages.FieldDuplicate.TranslateString(), ConstantDisplay.HRM_Evaluation_Information.TranslateString()));
return model;
}
}
else
{
lstSaleBonus = lstSaleBonus.Where(x => x.ID != model.ID).ToList();
if (lstSaleBonus.Where(x => x.JobTittleID == model.JobTittleID && x.SalesTypeID == model.SalesTypeID && x.Type == model.Type && x.FromPercent <= model.ToPercent && x.ToPercent >= model.FromPercent).Count() > 0)
{
model.SetPropertyValue(Constant.ActionStatus, NotificationType.Error + "," + string.Format(ConstantMessages.FieldDuplicate.TranslateString(), ConstantDisplay.HRM_Evaluation_Information.TranslateString()));
return model;
}
}
}
#endregion
model.ActionStatus = "Success";
var service = new ActionService(UserLogin);
return service.UpdateOrCreate<Eva_SaleBonusEntity, Eva_SaleBonusModel>(model);
}