60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
///////////////////////////////////////////////////////////
|
|
// CustomerDashboardInfoRI.cs
|
|
// Implementation of Class CustomerDashboardInfoRI
|
|
// CSLA type: Read-only object
|
|
// Created on: 10-Feb-2016
|
|
// Object design: John
|
|
// Coded: John 10-Feb-2016
|
|
///////////////////////////////////////////////////////////
|
|
|
|
using System;
|
|
using System.Data;
|
|
using CSLA.Data;
|
|
using GZTW.Data;
|
|
using CSLA;
|
|
using System.Threading;
|
|
using CSLA.Security;
|
|
using System.Collections.Generic;
|
|
|
|
namespace GZTW.AyaNova.BLL
|
|
{
|
|
#pragma warning disable 1591
|
|
/// <summary>
|
|
/// Fetches header and user information for RI Customer portal dashboard form / page
|
|
/// </summary>
|
|
[Serializable]
|
|
public class CustomerDashboardInfoRI : ReadOnlyBase
|
|
{
|
|
|
|
/// <summary>
|
|
/// Private constructor to prevent direct instantiation
|
|
/// </summary>
|
|
private CustomerDashboardInfoRI()
|
|
{
|
|
}
|
|
|
|
public long OpenServiceWOCount { get; private set; }
|
|
public long OpenCSRCount { get; private set; }
|
|
|
|
public static CustomerDashboardInfoRI Get()
|
|
{
|
|
CustomerDashboardInfoRI di = new CustomerDashboardInfoRI();
|
|
UserTypes currentUserType=User.CurrentUserType;
|
|
|
|
if (currentUserType != UserTypes.HeadOffice && currentUserType != UserTypes.Client)
|
|
throw new System.NotSupportedException("CustomerDashBoardList::Get-> Can only be called by a head office or client user type");
|
|
|
|
bool isHeadOffice = User.CurrentUserType == UserTypes.HeadOffice;
|
|
|
|
di.OpenCSRCount = CustomerDashBoardClientServiceRequestCountRI.Get();
|
|
di.OpenServiceWOCount = CustomerDashBoardOpenServiceWOCountRI.Get();
|
|
|
|
return di;
|
|
}
|
|
|
|
|
|
}//eoc
|
|
#pragma warning restore 1591
|
|
}//ens
|
|
|