Esempio n. 1
0
        public CustodianAccountDataModel GetById(string value)
        {
            var dataQuery = new CustodianAccountDataModel();

            dataQuery.CustodianAccountId = int.Parse(value);

            var result = CustodianAccountDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile, 1);

            return(result[0]);
        }
Esempio n. 2
0
        // GET api/summary/GetList
        public IEnumerable <CustodianAccountDataModel> GetList(string value, string value1)
        {
            var settingCategory = value1;
            var searchString    = value;

            var dictionaryObject = JsonConvert.DeserializeObject <Dictionary <string, string> >(searchString);

            // save search filter parameters in user preference
            if (dictionaryObject != null)
            {
                foreach (var searchFilterColumnName in dictionaryObject.Keys)
                {
                    var searchFilterValue = dictionaryObject[searchFilterColumnName];
                    PerferenceUtility.UpdateUserPreference(settingCategory, searchFilterColumnName, dictionaryObject[searchFilterColumnName]);
                }
            }

            var dataQuery = JsonConvert.DeserializeObject <CustodianAccountDataModel>(searchString);

            return(CustodianAccountDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile));
        }
Esempio n. 3
0
        public IEnumerable <JObject> GetSourceEntityList(string value)
        {
            var sourceEntity = new JavaScriptSerializer().Deserialize <string>(value);
            var listResult   = new List <JObject>();

            if (sourceEntity == "Portfolio")
            {
                var dataQuery   = new PortfolioDataModel();
                var entityItems = PortfolioDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile);

                foreach (var obj in entityItems)
                {
                    var jObject = new JObject();

                    jObject["Text"]      = obj.Name;
                    jObject["EntityKey"] = obj.PortfolioId;

                    listResult.Add(jObject);
                }
            }
            else if (sourceEntity == "CustodianAccount")
            {
                var dataQuery   = new CustodianAccountDataModel();
                var entityItems = CustodianAccountDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile);

                foreach (var obj in entityItems)
                {
                    var jObject = new JObject();

                    jObject["Text"]      = obj.Name;
                    jObject["EntityKey"] = obj.CustodianAccountId;

                    listResult.Add(jObject);
                }
            }

            return(listResult);
        }