43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
|
|
using System;
|
||
|
|
using System.Data;
|
||
|
|
using System.Linq;
|
||
|
|
using System.Text;
|
||
|
|
using Ease.Core.DataAccess;
|
||
|
|
using HRM.BO;
|
||
|
|
|
||
|
|
|
||
|
|
namespace HRM.DA
|
||
|
|
{
|
||
|
|
#region UserObject
|
||
|
|
public class UserObjectDA
|
||
|
|
{
|
||
|
|
#region Constructor
|
||
|
|
public UserObjectDA() { }
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
#region Insert function
|
||
|
|
public static void Insert(TransactionContext tc, UserObject oItem)
|
||
|
|
{
|
||
|
|
tc.ExecuteNonQuery("INSERT INTO UserObject(UserObjectID, Name, FieldValues, FieldDataTypes, CreatedBy, CreateDate, ProjectID)" +
|
||
|
|
" VALUES(%n, %s, %s, %s, %n, %d, %n)", oItem.ID, oItem.Name, oItem.FieldValues, oItem.FieldDataTypes, oItem.CreatedBy, oItem.CreatedDate, oItem.FundTypeID);
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
#region Update function
|
||
|
|
public static void Update(TransactionContext tc, UserObject oItem)
|
||
|
|
{
|
||
|
|
tc.ExecuteNonQuery("UPDATE UserObject SET Name=%s, FieldValues=%s, FieldDataTypes=%s, Modifiedby=%n, ModifiedDate=%d" +
|
||
|
|
" WHERE UserObjectID=%n", oItem.Name, oItem.FieldValues, oItem.FieldDataTypes, oItem.ID);
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
#region Get Function
|
||
|
|
public static IDataReader Get(TransactionContext tc,int fundTypeID)
|
||
|
|
{
|
||
|
|
return tc.ExecuteReader("SELECT * FROM FM_UserObject where FundTypeID=%n", fundTypeID);
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
}
|