/// <summary> /// Creates a cQuadrantMeasure object. It will be saved in permanent storage only /// on calling Save() /// </summary> /// <returns>cQuadrantMeasure object</returns> public static cQuadrantMeasure Create() { cQuadrantMeasure oObj = new cQuadrantMeasure(); SecurityCheck((int)enQuadrantMeasure_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>cQuadrantMeasure object</returns> public static cQuadrantMeasure CreateIfRequiredAndGet(string i_sName) { cQuadrantMeasure oObj = cQuadrantMeasure.Get_Name(i_sName); if (oObj == null) { oObj = cQuadrantMeasure.Create(); oObj.sName = i_sName; oObj.Save(); } return(oObj); }
/// <summary> /// Finds and return cQuadrantMeasure objects matching the specified criteria /// </summary> /// <param name="i_oFilter">Filter criteria (WHERE clause)</param> /// <returns>cQuadrantMeasure objects</returns> public static List <cQuadrantMeasure> Find(cFilter i_oFilter) { DataTable dt = Find_DataTable(i_oFilter, null); List <cQuadrantMeasure> l = new List <cQuadrantMeasure>(); cQuadrantMeasure oObj; for (int i = 0; i < dt.Rows.Count; i++) { oObj = new cQuadrantMeasure(); 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_sMeasures = Convert.ToString(dt.Rows[i]["sMeasures"]); oObj.m_objFunctionalGroup.iObjectID = Convert.ToInt32(dt.Rows[i]["objFunctionalGroup"].ToString()); oObj.m_objQuadrant.iObjectID = Convert.ToInt32(dt.Rows[i]["objQuadrant"].ToString()); oObj.m_bIsAllLevel = Convert.ToBoolean(dt.Rows[i]["bIsAllLevel"]); oObj.m_objQuadrantMeasureEnforce.iObjectID = Convert.ToInt32(dt.Rows[i]["objQuadrantMeasureEnforce"].ToString()); oObj.m_bInvalid = false; l.Add(oObj); } return(l); }
using System;