/// <summary> /// Load/Update the specified Disposition Plan /// </summary> internal void LoadDispositionPlan(int serviceId) { UDInfo oInfo = new UDInfo { serviceId = serviceId, listType = (int)AgentInfoType.GET_DISPOSTION_PLAN }; DispositionPlan oPlan = (DispositionPlan)mpApp.Portal.WSAgent.getInfo(mpApp.CurrentAgent.AgentArg, oInfo); CDispositionPlan pDispPlan; //Update if already in list, add it otherwise if (base.Contains(oPlan.dispplanid)) { pDispPlan = (CDispositionPlan)base.GetByKey(oPlan.dispplanid); pDispPlan.description = oPlan.desc; pDispPlan.Dispositions.Clear(); } else { pDispPlan = new CDispositionPlan(oPlan.dispplanid, oPlan.desc); base.Add(pDispPlan.Id, pDispPlan); } //Load/refresh this plan's disposition list oInfo.listType = (int)AgentInfoType.GET_DISPOSITIONS; Dispositions[] oDisps = (Dispositions[])mpApp.Portal.WSAgent.getInfo(mpApp.CurrentAgent.AgentArg, oInfo); foreach (Dispositions oDisp in oDisps) { CDisposition pDisposition; //If disp already in common list, update it if (mpDispositions.Contains(oDisp.dispid)) { pDisposition = mpDispositions.GetByKey(oDisp.dispid); pDisposition.code = oDisp.code; pDisposition.description = oDisp.description; pDisposition.isCallback = Convert.ToBoolean(oDisp.callbackf); pDisposition.isExclusion = Convert.ToBoolean(oDisp.exclusionf); pDisposition.isSale = Convert.ToBoolean(oDisp.salesf); } //Otherwise, load it and add ref to common list else { pDisposition = new CDisposition(oDisp.dispid, oDisp.description, oDisp.code, Convert.ToBoolean(oDisp.salesf), Convert.ToBoolean(oDisp.callbackf), Convert.ToBoolean(oDisp.exclusionf)); mpDispositions.Add(pDisposition.Id, pDisposition); } //Add disp to this plan's list pDispPlan.Dispositions.Add(pDisposition.Id, pDisposition); } }
/// <summary> /// Load the specified Disposition Plan /// </summary> internal void LoadDispositionPlan(EPEventsWS.UDNewService oNewService) { CDispositionPlan pDispPlan; //Update if already in list, add it otherwise if (base.Contains(oNewService.dispositionPlan.dispplanid)) { pDispPlan = (CDispositionPlan)base.GetByKey(oNewService.dispositionPlan.dispplanid); pDispPlan.description = oNewService.dispositionPlan.desc; pDispPlan.Dispositions.Clear(); } else { pDispPlan = new CDispositionPlan(oNewService.dispositionPlan.dispplanid, oNewService.dispositionPlan.desc); base.Add(pDispPlan.Id, pDispPlan); } //Load/refresh this plan's disposition list foreach (EPEventsWS.UDNotifyDispositions oDisp in oNewService.dispositions) { CDisposition pDisposition; //If disp already in common list, update it if (mpDispositions.Contains(oDisp.dispid)) { pDisposition = mpDispositions.GetByKey(oDisp.dispid); pDisposition.code = oDisp.code; pDisposition.description = oDisp.description; pDisposition.isCallback = Convert.ToBoolean(oDisp.callbackf); pDisposition.isExclusion = Convert.ToBoolean(oDisp.exclusionf); pDisposition.isSale = Convert.ToBoolean(oDisp.salesf); } //Otherwise, load it and add ref to common list else { pDisposition = new CDisposition(oDisp.dispid, oDisp.description, oDisp.code, Convert.ToBoolean(oDisp.salesf), Convert.ToBoolean(oDisp.callbackf), Convert.ToBoolean(oDisp.exclusionf)); mpDispositions.Add(pDisposition.Id, pDisposition); } //Add disp to this plan's list pDispPlan.Dispositions.Add(pDisposition.Id, pDisposition); } }
/// <summary> /// Update the specified Disposition /// </summary> internal void LoadDisposition(int dispositionId) { UDInfo oInfo = new UDInfo { listType = (int)AgentInfoType.GET_DISPOSTION, dispostionId = dispositionId }; Disposition oDisp = (Disposition)mpApp.Portal.WSAgent.getInfo(mpApp.CurrentAgent.AgentArg, oInfo); //If found in list then update it; otherwise, ignore request. if (mpDispositions.Contains(dispositionId)) { CDisposition pDisposition = mpDispositions.GetByKey(dispositionId); pDisposition.code = oDisp.code; pDisposition.description = oDisp.description; pDisposition.isCallback = Convert.ToBoolean(oDisp.callbackf); pDisposition.isExclusion = Convert.ToBoolean(oDisp.exclusionf); pDisposition.isSale = Convert.ToBoolean(oDisp.salesf); } }
internal void Add(object key, CDisposition value) { base.Add(key, value); }