예제 #1
0
        public PersonalVo GetPersonalAsset(int personalPortfolioId)
        {
            PersonalDao personalDao = new PersonalDao();

            PersonalVo personalVo = new PersonalVo();

            try
            {
                personalVo = personalDao.GetPersonalAsset(personalPortfolioId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "PersonalBo.cs:GetPersonalAsset()");


                object[] objects = new object[1];
                objects[0] = personalPortfolioId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(personalVo);
        }
예제 #2
0
        public List <PersonalVo> GetPersonalPortfolio(int portfolioId, int CurrentPage, string sortOrder, out int count)
        {
            PersonalDao personalDao = new PersonalDao();

            List <PersonalVo> personalList = new List <PersonalVo>();

            try
            {
                personalList = personalDao.GetPersonalNetPosition(portfolioId, CurrentPage, sortOrder, out count);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "PersonalBo.cs:GetPersonalPortfolio()");


                object[] objects = new object[1];
                objects[0] = portfolioId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(personalList);
        }
예제 #3
0
        public int CreatePersonalPortfolio(PersonalVo personalVo, int userId)
        {
            PersonalDao personalDao = new PersonalDao();
            int         personalId  = 0;

            try
            {
                personalId = personalDao.CreatePersonalNetPosition(personalVo, userId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "PersonalBo.cs:CreatePersonalPortfolio()");


                object[] objects = new object[2];
                objects[0] = personalVo;
                objects[1] = userId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(personalId);
        }
예제 #4
0
        public DataSet GetPersonalDropDown(string customerId)
        {
            DataSet     ds          = null;
            PersonalDao personalDao = new PersonalDao();

            try
            {
                ds = personalDao.GetPersonalDropDown(customerId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PersonalBo.cs:GetPersonalDropDown()");
                object[] objects = new object[1];
                objects[0]   = customerId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(ds);
        }
예제 #5
0
        public bool DeletePersonalPortfolio(int personalId)
        {
            bool        bResult     = false;
            PersonalDao personalDao = new PersonalDao();

            try
            {
                bResult = personalDao.DeletePersonalPortfolio(personalId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PersonalBo.cs:DeletePersonalPortfolio()");
                object[] objects = new object[1];
                objects[0] = personalId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(bResult);
        }