You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/SysMng/Models/SYSTASK/SysTaskModel.cs

352 lines
9.3 KiB
C#

2 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HcUtility.Core;
using Newtonsoft.Json;
//using DSWeb.Areas.CommMng.Helper;
namespace DSWeb.Areas.SysMng.Models.SysTask
{
[JsonObject]
public class TaskStateMC : ModelObjectBillHead
{
#region
private decimal _ID = 0;
private string _NAME = string.Empty;
private string _STATEKEY = string.Empty;
private string _DESCRIPTION = string.Empty;
private string _PROP1 = string.Empty;
private string _PROP2 = string.Empty;
private string _PROP3 = string.Empty;
private string _PROP4 = string.Empty;
private string _PROP5 = string.Empty;
private string _NAMEREF = string.Empty;
#endregion
#region
[ModelDB(MDBType = ModelDBOprationType.EditDelete, IsPrimary = true)]
public decimal ID
{
get { return _ID; }
set { _ID = value; }
}
[ModelDB]
public string STATEKEY
{
get { return _STATEKEY; }
set { _STATEKEY = value; }
}
[ModelDB]
public string NAME
{
get { return _NAME; }
set { _NAME = value; }
}
[ModelDB]
public string DESCRIPTION
{
get { return _DESCRIPTION; }
set { _DESCRIPTION = value; }
}
[ModelDB]
public string PROP1
{
get { return _PROP1; }
set { _PROP1 = value; }
}
[ModelDB]
public string PROP2
{
get { return _PROP2; }
set { _PROP2 = value; }
}
[ModelDB]
public string PROP3
{
get { return _PROP3; }
set { _PROP3 = value; }
}
[ModelDB]
public string PROP4
{
get { return _PROP4; }
set { _PROP4 = value; }
}
[ModelDB]
public string PROP5
{
get { return _PROP5; }
set { _PROP5 = value; }
}
public string NAMEREF
{
get { return _STATEKEY + "-" + _NAME; }
set { }
}
#endregion
override public string getSQL()
{
return "select ID,STATEKEY,NAME,DESCRIPTION,PROP1,PROP2,PROP3,PROP4,PROP5 from Sys_Task_State ";
}
public TaskStateMC()
{
TableName = "Sys_Task_State";
}
override public string GetBillNoFieldName()
{
return "ID";
}
override public string GetTimeMarkFieldName()
{
return "";
}
}
[JsonObject]
public class TaskExecutionMC : ModelObjectBillHead
{
#region
//private decimal _INDEXID = 0;
private decimal _ID = 0;
private string _STATEKEY = string.Empty;
private string _NAME = string.Empty;
private string _DESCRIPTION = string.Empty;
private string _PROP1 = string.Empty;
private string _PROP2 = string.Empty;
private string _PROP3 = string.Empty;
private string _PROP4 = string.Empty;
private string _PROP5 = string.Empty;
private string _NAMEREF = string.Empty;
#endregion
#region
[ModelDB(MDBType = ModelDBOprationType.EditDelete, IsPrimary = true)]
public decimal ID
{
get { return _ID; }
set { _ID = value; }
}
[ModelDB]
public string STATEKEY
{
get { return _STATEKEY; }
set { _STATEKEY = value; }
}
[ModelDB]
public string NAME
{
get { return _NAME; }
set { _NAME = value; }
}
[ModelDB]
public string DESCRIPTION
{
get { return _DESCRIPTION; }
set { _DESCRIPTION = value; }
}
[ModelDB]
public string PROP1
{
get { return _PROP1; }
set { _PROP1 = value; }
}
[ModelDB]
public string PROP2
{
get { return _PROP2; }
set { _PROP2 = value; }
}
[ModelDB]
public string PROP3
{
get { return _PROP3; }
set { _PROP3 = value; }
}
[ModelDB]
public string PROP4
{
get { return _PROP4; }
set { _PROP4 = value; }
}
[ModelDB]
public string PROP5
{
get { return _PROP5; }
set { _PROP5 = value; }
}
public string NAMEREF
{
get { return _STATEKEY + "-" + _DESCRIPTION; }
set { }
}
#endregion
override public string getSQL()
{
return "select ID,STATEKEY,NAME,DESCRIPTION,PROP1,PROP2,PROP3,PROP4,PROP5 from Sys_Task_Execution ";
}
public TaskExecutionMC()
{
TableName = "Sys_Task_Execution";
}
override public string GetBillNoFieldName()
{
return "ID";
}
override public string GetTimeMarkFieldName()
{
return "";
}
}
[JsonObject]
public class TaskProgressIndexMC : ModelObjectBillHead
{
#region
private decimal _ID = 0;
private string _EXECUTIONID = string.Empty;
private string _EXECUTIONNAME = string.Empty;
private string _EXECUTIONREF = string.Empty;
private string _DESCRIPTION = string.Empty;
private string _CURRENTSTATEID = string.Empty;
private string _CURRENTSTATENAME = string.Empty;
private string _CURRENTSTATEREF = string.Empty;
private string _FINISHSTATEID = string.Empty;
private string _FINISHSTATENAME = string.Empty;
private string _FINISHSTATEREF = string.Empty;
private string _PROP1 = string.Empty;
private string _PROP2 = string.Empty;
private string _PROP3 = string.Empty;
private string _PROP4 = string.Empty;
private string _PROP5 = string.Empty;
#endregion
#region
[ModelDB(MDBType = ModelDBOprationType.EditDelete, IsPrimary = true)]
public decimal ID
{
get { return _ID; }
set { _ID = value; }
}
[ModelDB]
public string EXECUTIONID
{
get { return _EXECUTIONID; }
set { _EXECUTIONID = value; }
}
public string EXECUTIONNAME
{
get { return _EXECUTIONNAME; }
set { _EXECUTIONNAME = value; }
}
public string EXECUTIONREF
{
get { return _EXECUTIONID + '-' + _EXECUTIONNAME; }
//set { _EXECUTIONREF = value; }
}
[ModelDB]
public string DESCRIPTION
{
get { return _DESCRIPTION; }
set { _DESCRIPTION = value; }
}
[ModelDB]
public string CURRENTSTATEID
{
get { return _CURRENTSTATEID; }
set { _CURRENTSTATEID = value; }
}
public string CURRENTSTATENAME
{
get { return _CURRENTSTATENAME; }
set { _CURRENTSTATENAME = value; }
}
public string CURRENTSTATEREF
{
get { return _CURRENTSTATEID + '-' + _CURRENTSTATENAME; }
//set { _CURRENTSTATEREF = value; }
}
[ModelDB]
public string FINISHSTATEID
{
get { return _FINISHSTATEID; }
set { _FINISHSTATEID = value; }
}
public string FINISHSTATENAME
{
get { return _FINISHSTATENAME; }
set { _FINISHSTATENAME = value; }
}
public string FINISHSTATEREF
{
get { return _FINISHSTATEID + '-' + _FINISHSTATENAME; }
//set { _FINISHSTATEREF = value; }
}
[ModelDB]
public string PROP1
{
get { return _PROP1; }
set { _PROP1 = value; }
}
[ModelDB]
public string PROP2
{
get { return _PROP2; }
set { _PROP2 = value; }
}
[ModelDB]
public string PROP3
{
get { return _PROP3; }
set { _PROP3 = value; }
}
[ModelDB]
public string PROP4
{
get { return _PROP4; }
set { _PROP4 = value; }
}
[ModelDB]
public string PROP5
{
get { return _PROP5; }
set { _PROP5 = value; }
}
#endregion
override public string getSQL()
{
return " select ID,EXECUTIONID,(select DESCRIPTION from Sys_Task_Execution where STATEKEY = EXECUTIONID) EXECUTIONNAME,DESCRIPTION,CURRENTSTATEID,(select name from Sys_Task_State where STATEKEY = CURRENTSTATEID) CURRENTSTATENAME,FINISHSTATEID,(select name from Sys_Task_State where STATEKEY=FINISHSTATEID) FINISHSTATENAME,PROP1,PROP2,PROP3,PROP4,PROP5 from Sys_Task_Progress_Index ";
}
public TaskProgressIndexMC()
{
TableName = "Sys_Task_Progress_Index";
}
override public string GetBillNoFieldName()
{
return "EXECUTIONID";
}
override public string GetTimeMarkFieldName()
{
return "";
}
}
}