public bool DeleteCustomerFamily(int CustomerAssociationID)
        {
            bool bResult = false;
            CustomerFamilyDao customerFamilyDao = new CustomerFamilyDao();

            try
            {
                bResult = customerFamilyDao.DeleteCustomerFamily(CustomerAssociationID);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerFamilyBo.cs:DeleteCustomerFamily()");

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

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

            return(bResult);
        }
        /// <summary>
        /// Modified by Vinayak Patil.. Customer Association functionality for adviser..
        /// </summary>
        /// <param name="adviserId"></param>
        /// <param name="rmId"></param>
        /// <param name="nameSrchValue"></param>
        /// <returns></returns>
        public DataTable GetCustomerAssociations(int adviserId, int rmId, string nameSrchValue)
        {
            DataTable         dt = new DataTable();
            CustomerFamilyDao customerFamilyDao = new CustomerFamilyDao();

            try
            {
                dt = customerFamilyDao.GetCustomerAssociations(adviserId, rmId, nameSrchValue);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerFamilyBo.cs:GetCustomerFamily()");


                object[] objects = new object[2];
                objects[0] = rmId;
                objects[0] = adviserId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(dt);
        }
        public bool CreateCustomerFamily(CustomerFamilyVo customerFamilyVo, int customerId, int userId)
        {
            bool bResult = false;
            CustomerFamilyDao customerFamilyDao = new CustomerFamilyDao();

            try
            {
                bResult = customerFamilyDao.CreateCustomerFamily(customerFamilyVo, customerId, userId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerFamilyBo.cs:CreateCustomerFamily()");


                object[] objects = new object[3];
                objects[0] = customerFamilyVo;
                objects[1] = customerId;
                objects[2] = userId;

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

            return(bResult);
        }
        public DataSet GetCustomerDematDetails(int customerId)
        {
            DataSet           dsDematDetails    = null;
            CustomerFamilyDao customerFamilyDao = new CustomerFamilyDao();

            try
            {
                dsDematDetails = customerFamilyDao.GetCustomerDematDetails(customerId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerFamilyBo.cs:GetCustomerDematDetails()");


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

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(dsDematDetails);
        }
        public List <CustomerFamilyVo> GetCustomerFamily(int customerId)
        {
            List <CustomerFamilyVo> familyList        = null;
            CustomerFamilyDao       customerFamilyDao = new CustomerFamilyDao();

            try
            {
                familyList = customerFamilyDao.GetCustomerFamily(customerId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerFamilyBo.cs:GetCustomerFamily()");


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

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(familyList);
        }
        public int CustomerDissociate(string association, int UserID)
        {
            CustomerFamilyDao customerFamilyDao = new CustomerFamilyDao();

            return(customerFamilyDao.CustomerDissociate(association, UserID));
        }
        public int CustomerFamilyDissociation(string association)
        {
            CustomerFamilyDao customerFamilyDao = new CustomerFamilyDao();

            return(customerFamilyDao.CustomerFamilyDissociation(association));
        }