This commit is contained in:
@@ -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
|
||||
/// <summary>
|
||||
///Confirms the Active status of Client
|
||||
/// </summary>
|
||||
[Serializable, EditorBrowsable(EditorBrowsableState.Never)]
|
||||
internal class ClientActiveChecker : ReadOnlyBase
|
||||
{
|
||||
|
||||
#region Attributes
|
||||
private bool mActive;
|
||||
//case 1404 added for usefulness
|
||||
internal Guid mClientID;
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Private constructor to prevent direct instantiation
|
||||
/// </summary>
|
||||
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
|
||||
///
|
||||
/// <param Bool="Criteria"></param>
|
||||
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
|
||||
/// <summary>
|
||||
/// Criteria for identifying existing object
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
private class Criteria
|
||||
{
|
||||
public Guid ID;
|
||||
public Criteria(Guid _ID)
|
||||
{
|
||||
ID = _ID;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}//end class
|
||||
|
||||
}//end namespace GZTW.AyaNova.BLL
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user