/// <summary> /// Select Property Default Models method /// </summary> /// <param name="workingObjects"></param> /// <param name="bot"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <param name="parameters"></param> /// <param name="db"></param> private void Selectsearchs ( IDictionary <object, object> workingObjects , RPComponents.IBusinessObjectTransaction bot , SqlConnection connection , SqlTransaction transaction , Hashtable parameters , IundefinedDB db ) { db.SetNullParameters(); db.SetParameters(db.Getsearch); using ( SqlDataReader reader = ExecuteSqlDataReader ( db.Getsearch , parameters , connection , transaction ) ) { IList <Isearch> search = new List <Isearch>(); while (reader.Read()) { Isearch bob = (Isearch)db.BuildObject(reader); search.Add(bob); bot.Status = new TransactionStatus(TransactionStatus.Succeeded); } workingObjects.Add(WorkingTypes.search, search); if (bot.Status.IsInitial) { bot.Status = new TransactionStatus(TransactionStatus.Succeeded); } } }
/// <summary> /// Get search list /// </summary> /// <param name="inputObjects">This is the dictionary of arraylists of /// business object transactions specified by the caller. This typically hails /// from the web service or page class and simply passed from one object in the /// chain to another until it is referenced here.</param> /// <param name="globals">This is a dictionary where the keys are intended to hold globally /// unique values used to establish relationships between collections of business object /// transactions in the inputObjects dictionary. The objects corresponding to each key /// are intended to be a instance of the KeyResolver class.</param> /// <param name="prototype">search object</param> /// <returns>List of search</returns> public List <Isearch> Getsearch(IDictionary <object, object> inputObjects, IDictionary <object, object> globals, Isearch prototype) { IDictionary <object, object> workingObjects = new Dictionary <object, object>(); try { _cm.Init(base.Env, base.Server); _cm.Connect(DBEntity.PMC, base.PmcID, base.SiteID, base.UserID); _dao.CM = _cm; RPComponents.IBusinessObjectTransaction bot = new RPComponents.BusinessObjectTransaction(); IList <RPComponents.IBusinessObjectTransaction> bots = new List <RPComponents.IBusinessObjectTransaction>(); bot.BusinessObject = prototype; bot.RequestType = undefinedDAO.RequestTypes.search; bot.Action = new RPComponents.Action(RPComponents.Action.Select); bots.Add(bot); _dao.ProcessTransactions(inputObjects, workingObjects, globals, bots); } finally { _cm.Disconnect(); } List <Isearch> list = (List <Isearch>)workingObjects[undefinedDAO.WorkingTypes.search]; return(list); }