Files
OpenAuth.Net/OpenAuth.App/Form/FormFactory.cs

25 lines
650 B
C#
Raw Normal View History

using System;
using OpenAuth.Repository.Domain;
2025-04-02 23:31:38 +08:00
using Infrastructure;
2026-05-24 23:34:27 +08:00
using SqlSugar;
namespace OpenAuth.App
{
public class FormFactory
{
2026-05-24 23:34:27 +08:00
public static IForm CreateForm(Form form, ISqlSugarClient sugarClient)
{
2025-04-02 23:31:38 +08:00
if (form.FrmType == Define.FORM_TYPE_DYNAMIC)
{
2026-05-24 23:34:27 +08:00
return new LeipiForm(sugarClient);
2025-04-02 23:31:38 +08:00
}else if (form.FrmType == Define.FORM_TYPE_DEVELOP)
{
throw new Exception("自定义表单不需要创建数据库表");
}
2025-04-02 23:31:38 +08:00
else
{
2026-05-24 23:34:27 +08:00
return new DragForm(sugarClient);
}
}
}
}