/////////////////////////////////////////////////////////// // VendorsWithReceivablePONVList.cs // Implementation of Class VendorsWithReceivablePONVList // CSLA type: Name-Value Lists // Created on: 08 August 2005 // Object design: John // Coded: John 08 August 2005 /////////////////////////////////////////////////////////// using System; using CSLA.Data; using System.Runtime.Serialization; using CSLA; using System.Threading; using CSLA.Security; //VendorsWithReceivablePONVList namespace GZTW.AyaNova.BLL { /// /// Client name / value list /// [Serializable] public class VendorsWithReceivablePONVList : NameValueList { //NVCHANGED #region Constructors //Prevent direct creation private VendorsWithReceivablePONVList() {} //Required because the base class (NameObjectCollectionBase) implements ISerializable private VendorsWithReceivablePONVList(SerializationInfo info, StreamingContext context) : base(info, context) {} #endregion #region Static methods /// /// Get VendorsWithReceivablePONVList object /// public static VendorsWithReceivablePONVList GetList() { if(AyaBizUtils.Right("Object.Vendor")>(int)SecurityLevelTypes.NoAccess) return (VendorsWithReceivablePONVList) DataPortal.Fetch(new Criteria()); else throw new System.Security.SecurityException( string.Format( LocalizedTextTable.GetLocalizedTextDirect("Error.Security.NotAuthorizedToRetrieve"), LocalizedTextTable.GetLocalizedTextDirect("O.Vendor"))); } #endregion #region DAL DATA ACCESS /// /// Fetch name value list /// /// protected override void DataPortal_Fetch(object Criteria) { this.SQLFetchG(DBUtil.DB, "SELECT DISTINCT aPurchaseOrder.aVendorID AS aID, aVendor.aName " + " FROM aPurchaseOrder " + "INNER JOIN aVendor ON aPurchaseOrder.aVendorID " + "= aVendor.aID WHERE (aPurchaseOrder.aStatus " + "= 2) OR (aPurchaseOrder.aStatus = 3) ORDER BY " + "aVendor.aName" ); } #endregion #region Criteria [Serializable] private class Criteria {} #endregion }//end VendorsWithReceivablePONVList }//end namespace GZTW.AyaNova.BLL