diff --git a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientActiveChecker.cs b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientActiveChecker.cs new file mode 100644 index 0000000..908922a --- /dev/null +++ b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientActiveChecker.cs @@ -0,0 +1,89 @@ +/////////////////////////////////////////////////////////// +// Bool.cs +// Implementation of Class ClientActiveChecker +// CSLA type: Read-only object +// Created on: 24-Sept-2007 +// Object design: John +// Coded: 24-Sept-2007 +/////////////////////////////////////////////////////////// + +using System; +using System.Data; +using CSLA.Data; +using GZTW.Data; +using CSLA; +using System.Threading; +using CSLA.Security; +using System.ComponentModel; + + + +namespace GZTW.AyaNova.BLL +{ + //case 3701 + /// + ///Confirms the Active status of Client + /// + [Serializable, EditorBrowsable(EditorBrowsableState.Never)] + internal class ClientActiveChecker : ReadOnlyBase + { + + #region Attributes + private bool mActive; + //case 1404 added for usefulness + internal Guid mClientID; + #endregion + + #region Constructor + + /// + /// Private constructor to prevent direct instantiation + /// + private ClientActiveChecker() + { + + } + #endregion + + + #region Static methods + + internal static bool ClientActive(Guid ID) + { + return ((ClientActiveChecker)DataPortal.Fetch(new Criteria(ID))).mActive; + } + + + #endregion + + #region DAL DATA ACCESS + /// + /// + protected override void DataPortal_Fetch(object Criteria) + { + Criteria crit = (Criteria)Criteria; + this.mActive=DBUtil.ScalarToBool(DBUtil.GetScalarFromSQLString("SELECT aactive FROM aClient WHERE (aID = @ID)", crit.ID); + } + + + + #endregion + + #region criteria + /// + /// Criteria for identifying existing object + /// + [Serializable] + private class Criteria + { + public Guid ID; + public Criteria(Guid _ID) + { + ID = _ID; + } + } + #endregion + + }//end class + +}//end namespace GZTW.AyaNova.BLL \ No newline at end of file diff --git a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/WorkorderPMReadyForServiceList.cs b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/WorkorderPMReadyForServiceList.cs index 5b8c63c..1a22ee8 100644 --- a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/WorkorderPMReadyForServiceList.cs +++ b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/WorkorderPMReadyForServiceList.cs @@ -137,7 +137,11 @@ namespace GZTW.AyaNova.BLL dr=new SafeDataReader(DBUtil.DB.ExecuteReader(cm)); while(dr.Read()) - {//******************************************* + { + + //******************************************* + //case 3701 - check if client for this pm is active or not and only process for an active client + WorkorderPMReadyForServiceListInfo info=new WorkorderPMReadyForServiceListInfo(); info._PMWorkorderID=dr.GetGuid("aWorkorderID");