56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using Furion.DependencyInjection;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RoadFlow.Data
|
|
{
|
|
public class FlowButton:RoadFlowRepository<RoadFlow.Model.rf_flowbutton>,IFlowButton, ITransient
|
|
{
|
|
/// <summary>
|
|
/// 得到一个按钮
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public Model.rf_flowbutton Get(string id)
|
|
{
|
|
return GetOneById(id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到按钮显示标题(多语言时)
|
|
/// </summary>
|
|
/// <param name="language">语言</param>
|
|
/// <param name="flowButton">按钮实体</param>
|
|
/// <param name="note">输出备注</param>
|
|
/// <returns></returns>
|
|
public string GetLanguageTitle(Model.rf_flowbutton flowButton, out string note, string language = "zh-CN")
|
|
{
|
|
note = string.Empty;
|
|
if (null == flowButton)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
string title;
|
|
switch (language)
|
|
{
|
|
case "en-US":
|
|
title = flowButton.Title_en;
|
|
note = flowButton.Note_en;
|
|
break;
|
|
case "zh":
|
|
title = flowButton.Title_zh;
|
|
note = flowButton.Note_zh;
|
|
break;
|
|
default:
|
|
title = flowButton.Title;
|
|
note = flowButton.Note;
|
|
break;
|
|
}
|
|
return title;
|
|
}
|
|
}
|
|
}
|