using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { #region WebAPPFormParam public class WebAPPFormParam : BasicBaseObject { public delegate void ItemChanged(); #region Constructor public WebAPPFormParam() { _nformObjectID = 0; _assessmentBy = (0); _nobjectID = 0; _dAssessmentDate = DateTime.MinValue; } #endregion #region Properties #region DataType : EnumAssessmentFormType private EnumAssessmentFormType _assessmentFormType; public EnumAssessmentFormType AssessmentFormType { get { return _assessmentFormType; } set { _assessmentFormType = value; } } #endregion #region FormID : int private int _nformObjectID; public int FormID { get { return _nformObjectID; } set { _nformObjectID = value; } } #endregion #region AssessmentBy : ID private int _assessmentBy; public int AssessmentBy { get { return _assessmentBy; } set { _assessmentBy = value; } } #endregion #region AssessmentDate : DateTime private DateTime _dAssessmentDate; public DateTime AssessmentDate { get { return _dAssessmentDate; } set { _dAssessmentDate = value; } } #endregion #region ObjectID : int private int _nobjectID; public int ObjectID { get { return _nobjectID; } set { _nobjectID = value; } } #endregion public List ParamDetails { get; set; } #region AssessmentFor : EnumAssessmentFor private EnumAssessmentFor _assessmentFor; public EnumAssessmentFor AssessmentFor { get { return _assessmentFor; } set { _assessmentFor = value; } } #endregion //#region WebAppFormParamDetails : List //private List _paramDetailes; //public List ParamDetails //{ // get // { // if (_paramDetailes == null && !this.ID.IsUnassigned) // { // _paramDetailes = WebAPPFormParamDetails.Service.GetParamDetails(this.ID.Integer); // //_salaryEmpCostCenters = new List(); // } // return _paramDetailes; // } // set // { // _paramDetailes = value; // } //} //#endregion #endregion //#region Service Factory IWebAPPFormParamService : IWebAPPFormParamService //internal static IWebAPPFormParamService Service //{ // get { return Services.Factory.CreateService(typeof(IWebAPPFormParamService)); } //} //#endregion //#region Functions //public static WebAPPFormParam Get(int id) //{ // WebAPPFormParam webAPPFormParam = null; // #region Cache Header // webAPPFormParam = (WebAPPFormParam)_cache["Get",id]; // if (webAPPFormParam != null) // return webAPPFormParam; // #endregion // webAPPFormParam = WebAPPFormParam.Service.Get(id); // #region Cache Footer // _cache.Add(webAPPFormParam, "Get", id); // #endregion // return webAPPFormParam; //} //public static WebAPPFormParam Get(int formId, int objectID) //{ // WebAPPFormParam webAPPFormParam = null; // #region Cache Header // webAPPFormParam = (WebAPPFormParam)_cache["Get", formId, objectID]; // if (webAPPFormParam != null) // return webAPPFormParam; // #endregion // webAPPFormParam = WebAPPFormParam.Service.Get(formId, objectID); // #region Cache Footer // _cache.Add(webAPPFormParam, "Get", formId, objectID); // #endregion // return webAPPFormParam; //} //public static List Get() //{ // #region Cache Header // List webAPPFormParams = _cache["Get"] as List; // if (webAPPFormParams != null) // return webAPPFormParams; // #endregion // try // { // webAPPFormParams = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(webAPPFormParams, "Get"); // #endregion // return webAPPFormParams; //} //public static List GetParams(int formId, int objectID) //{ // #region Cache Header // List webAPPFormParams = _cache["Get"] as List; // if (webAPPFormParams != null) // return webAPPFormParams; // #endregion // try // { // webAPPFormParams = Service.GetParams(formId, objectID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(webAPPFormParams, "Get"); // #endregion // return webAPPFormParams; //} //public int Save() //{ // base.SetAuditTrailProperties(); // return WebAPPFormParam.Service.Save(this); //} //public void Delete(int formId, int objectID) //{ // WebAPPFormParam.Service.Delete(formId, objectID); //} //public void Delete() //{ // WebAPPFormParam.Service.Delete(this.ID); //} ////public void DeleteOb(int id) ////{ //// WebAPPFormParam.Service.Delete(ID); ////} //public void Save(List webAPPFormParams) //{ // base.SetAuditTrailProperties(); // foreach (var item in webAPPFormParams) // { // item.SetAuditTrailProperties(); // } // WebAPPFormParam.Service.Save(webAPPFormParams); //} //public static List GetParamDetails(int ParamId) //{ // List oWebAPPFormParamDetails = null; // oWebAPPFormParamDetails = Service.GetParamDetails(ParamId); // return oWebAPPFormParamDetails; //} //#endregion } #endregion #region IWebAPPFormParamService public interface IWebAPPFormParamService { WebAPPFormParam Get(int id); WebAPPFormParam Get(int formId,int objectID); List GetParams(int formId, int objectID); List Get(); int Save(WebAPPFormParam item); void Save(List letters); void Delete(int formId, int objectID); void Delete(int id); //void DeleteOb(int id); List GetParamDetails(int ParamId); } #endregion }