-
Notifications
You must be signed in to change notification settings - Fork 0
/
DesignFormDataList.cs
49 lines (37 loc) · 1.36 KB
/
DesignFormDataList.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Objects;
using System.Linq;
using System.Text;
using System.Data;
using Pelesys.Data;
namespace Pelesys.Scheduling
{
[MetadataTypeAttribute(typeof(Metadata))]
public partial class DesignFormDataList
{
#region Mandatory
public static ObjectContext GetContextByEntityNamespace(string entityNamespace)
{
return new Pelesys.Scheduling.SchedulingEntity();
}
#endregion
#region Method
static public List<DesignFormDataList> GetAllDataList()
{
return DesignFormDataList.LoadList<DesignFormDataList>("select [type], Category from SCH.DesignformDatalist group by [type], category order by Category ");
}
static public DataTable GetAllDataListCategory()
{
String SQL = "select Category, Category from Sch.DesignformDatalist group by category";
DBManager db = new DBManager();
return db.GetDataTableFromSQL(SQL);
}
public static List<DesignFormDataList> GetDataListByType(String Type)
{
return DesignFormDataList.LoadListWhere<DesignFormDataList>("Where T.Category ='" + Type + "'" );
}
#endregion
}
}