/// <summary> /// Finds and return cEmployeeQuadrant objects matching the specified criteria /// </summary> /// <param name="i_oFilter">Filter criteria (WHERE clause)</param> /// <returns>cEmployeeQuadrant objects</returns> public static List <cEmployeeQuadrant> Find(cFilter i_oFilter) { DataTable dt = Find_DataTable(i_oFilter, null); List <cEmployeeQuadrant> l = new List <cEmployeeQuadrant>(); cEmployeeQuadrant oObj; for (int i = 0; i < dt.Rows.Count; i++) { oObj = new cEmployeeQuadrant(); oObj.m_iID = Convert.ToInt32(dt.Rows[i]["iID"]); oObj.m_sName = dt.Rows[i]["sName"].ToString(); oObj.m_dtCreatedOn = Convert.ToDateTime(dt.Rows[i]["dtCreatedOn"]); oObj.m_dtLastUpdatedOn = Convert.ToDateTime(dt.Rows[i]["dtLastUpdatedOn"]); oObj.m_sMeasureDescription = Convert.ToString(dt.Rows[i]["sMeasureDescription"]); oObj.m_sEmployeeDescription = Convert.ToString(dt.Rows[i]["sEmployeeDescription"]); oObj.m_sManagerDescription = Convert.ToString(dt.Rows[i]["sManagerDescription"]); oObj.m_objQuadrant.iObjectID = Convert.ToInt32(dt.Rows[i]["objQuadrant"].ToString()); oObj.m_objStatus.iObjectID = Convert.ToInt32(dt.Rows[i]["objStatus"].ToString()); oObj.m_objEmpLogin.iObjectID = Convert.ToInt32(dt.Rows[i]["objEmpLogin"].ToString()); oObj.m_bEmpFlag = Convert.ToBoolean(dt.Rows[i]["bEmpFlag"]); oObj.m_bManagerFlag = Convert.ToBoolean(dt.Rows[i]["bManagerFlag"]); oObj.m_bIsActive = Convert.ToBoolean(dt.Rows[i]["bIsActive"]); oObj.m_bInvalid = false; l.Add(oObj); } return(l); }
/// <summary> /// Creates a cEmployeeQuadrant object. It will be saved in permanent storage only /// on calling Save() /// </summary> /// <returns>cEmployeeQuadrant object</returns> public static cEmployeeQuadrant Create() { cEmployeeQuadrant oObj = new cEmployeeQuadrant(); SecurityCheck((int)enEmployeeQuadrant_Action.Create); // Create an object in memory, will be saved to storage on calling Save() oObj.m_bCreating = true; oObj.m_bInvalid = false; return(oObj); }
/// <summary> /// Ensures that an object with the specified name exists, while creating other properties are set to their default values /// </summary> /// <param name="i_sName">Name</param> /// <returns>cEmployeeQuadrant object</returns> public static cEmployeeQuadrant CreateIfRequiredAndGet(string i_sName) { cEmployeeQuadrant oObj = cEmployeeQuadrant.Get_Name(i_sName); if (oObj == null) { oObj = cEmployeeQuadrant.Create(); oObj.sName = i_sName; oObj.Save(); } return(oObj); }
using System;