示例#1
0
        /// <summary>
        /// 优惠政策
        ///author: desgin by longbin
        ///createdate: 2011-05-09
        ///description: 根据用户名获取优惠政策(index)
        /// </summary>
        /// <param name="loginName"></param>
        /// <returns></returns>
        public string GetPolicyListUIByLoginName(string loginName)
        {
            PolicyDAL     dal   = new PolicyDAL();
            PolicyModel   model = new PolicyModel();
            StringBuilder str   = new StringBuilder();

            model = dal.GetPolicyByName(loginName);
            if (model != null)
            {
                //str.Append("<ul>");
                string str1 = "";
                if (NoHTML(model.Chineseintroduced).Length > 82)
                {
                    str1 = NoHTML(model.Chineseintroduced).Substring(0, 82) + "...";
                }
                else
                {
                    str1 = NoHTML(model.Chineseintroduced);
                }
                str.Append("<p>" + str1);
                str.Append("<a target='_blank' href='http://" + loginName + ".topfo.com/Preferentialpolicies.htm'>[详细]</a></p>");

                //str.Append("</ul>");
            }
            return(str.ToString());
        }
示例#2
0
        public static bool AddPolicyBL(Policy policy)
        {
            bool policyAdded = false;

            try
            {
                PolicyDAL policyDAL = new PolicyDAL();
                if (ValidatePolicy(policy))
                {
                    policyAdded = policyDAL.AddPolicyDAL(policy);
                }
                else
                {
                    throw new PolicyException("Validation failed!! Policy record not added");
                }
            }
            catch (PolicyException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(policyAdded);
        }
        public int LoginCheckBL(string username, string password)
        {
            PolicyDAL logincheck = new PolicyDAL();
            int       res        = logincheck.LoginCheckDAL(username, password);

            return(res);
        }
        public static string CustIDGenBL(string policyId)
        {
            PolicyDAL customernumber = new PolicyDAL();
            string    result         = customernumber.CustIDGenDAL(policyId);

            return(result);
        }
        public static DataTable SearchPolicyIDBL(string policyID)
        {
            PolicyDAL searchpolicy = new PolicyDAL();
            DataTable policy       = searchpolicy.SearchPolicyIDDAL(policyID);

            return(policy);
        }
示例#6
0
        public static bool AddCustomerBL(Customer customer)
        {
            bool customerAdded = false;

            try
            {
                PolicyDAL customerDAL = new PolicyDAL();
                if (Validatecustomer(customer))
                {
                    customerAdded = customerDAL.AddCustomerDAL(customer);
                }
                else
                {
                    throw new PolicyException("ValidationFailed!! Customer record not added");
                }
            }
            catch (PolicyException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(customerAdded);
        }
        public static DataTable GetAllTransactionIDBL(string custnum)
        {
            DataTable dataTable;
            PolicyDAL endorsementDAL = new PolicyDAL();

            dataTable = endorsementDAL.GetAllTransactionIDDAL(custnum);
            return(dataTable);
        }
        public DataTable GetAllEndorsementPolicyIDBL(string policyID)
        {
            DataTable dataTable;
            PolicyDAL endorsementDAL = new PolicyDAL();

            dataTable = endorsementDAL.GetAllEndorsementPolicyIDDAL(policyID);
            return(dataTable);
        }
        public static DataTable GetAllEndorsementCustBL(string custnum)
        {
            DataTable dataTable;
            PolicyDAL endorsement = new PolicyDAL();

            dataTable = endorsement.GetAllEndorsementCustDAL(custnum);
            return(dataTable);
        }
        public static DataTable SearchPolicyNameBL(string custName, DateTime dob)
        {
            PolicyDAL searchpolicy = new PolicyDAL();
            DataTable dt           = new DataTable();

            dt = searchpolicy.SearchPolicyNameDAL(custName, dob);
            return(dt);
        }
        public static DataTable SearchPolicyCustBL(string custID)
        {
            PolicyDAL searchpolicy = new PolicyDAL();
            DataTable dt           = new DataTable();

            dt = searchpolicy.SearchPolicyCustDAL(custID);
            return(dt);
        }
        public static DataTable LoginDeatilsBL(string username, string password)
        {
            DataTable dataTable;
            PolicyDAL endorsementDAL = new PolicyDAL();

            dataTable = endorsementDAL.LoginDetailsDAL(username, password);
            return(dataTable);
        }
        public static DataTable GetAllTransactionBL()
        {
            DataTable dataTable;
            PolicyDAL endorsementDAL = new PolicyDAL();

            dataTable = endorsementDAL.GetAllTransactionDAL();
            return(dataTable);
        }
        public static DataTable GetAllCustomerBL()
        {
            DataTable dataTable;
            PolicyDAL customerDAL = new PolicyDAL();

            dataTable = customerDAL.GetAllCustomerDAL();
            return(dataTable);
        }
示例#15
0
        public string GetCustomerClass(string line_of_business, string policy_type,
                                       string vehicle_type, string zone,
                                       string country, string channel,
                                       string supervisor, string GPProductID)
        {
            var policydal = new PolicyDAL();

            return(policydal.GetCustomerClass(line_of_business, policy_type, vehicle_type, zone, country, channel, supervisor, GPProductID));
        }
示例#16
0
 public static void SaveChangesBL()
 {
     try
     {
         PolicyDAL obj = new PolicyDAL();
         obj.SaveChangesDAL();
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#17
0
 public static void AddEndorsementStatusRejDAL(string policynum)
 {
     try
     {
         PolicyDAL obj = new PolicyDAL();
         obj.AddEndorsementStatusRejDAL(policynum);
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#18
0
        public static List <Policy> SearchByUsingDobAndNameBL(string id, DateTime dt, string nam)
        {
            List <Policy> lst = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                lst = obj.SearchByUsingDobAndNameDAL(id, dt, nam);
            }
            catch (Exception)
            {
                throw;
            }
            return(lst);
        }
示例#19
0
        public static List <Policy> SearchByUsingPolicyNoBL(string policyNum, string id)
        {
            List <Policy> lst = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                lst = obj.SearchByUsingPolicyNoDAL(policyNum, id);
            }
            catch (Exception)
            {
                throw;
            }
            return(lst);
        }
示例#20
0
        //View Endorsement Changes
        public static Policy GetPolicyonPolicyNoBL(string policynum)
        {
            Policy policy = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                policy = obj.GetPolicyonPolicyNoDAL(policynum);
            }
            catch (Exception)
            {
                throw;
            }
            return(policy);
        }
示例#21
0
        public static List <Customer> GetAllCustomerBL()
        {
            List <Customer> lst = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                lst = obj.GetAllCustomerDAL();
            }
            catch (Exception)
            {
                throw;
            }
            return(lst);
        }
示例#22
0
        public static Customer GetCustomerOnPolicyNoBL(Policy p1)
        {
            Customer cus = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                cus = obj.GetCustomerOnPolicyNoDAL(p1);
            }
            catch (Exception)
            {
                throw;
            }
            return(cus);
        }
示例#23
0
        public static bool CustomerLoginBL(string user, string pass)
        {
            bool valid = false;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                valid = obj.CustomerLoginDAL(user, pass);
            }
            catch (Exception)
            {
                throw;
            }
            return(valid);
        }
示例#24
0
        //View Policy
        public static Customer GetCustomerOnDobBL(DateTime dt)
        {
            Customer cus = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                cus = obj.GetCustomerOnDobDAL(dt);
            }
            catch (Exception)
            {
                throw;
            }
            return(cus);
        }
示例#25
0
        public static bool AddEndorsementBL(Endorsement end)
        {
            bool valid = false;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                valid = obj.AddEndorsementDAL(end);
            }
            catch (Exception)
            {
                throw;
            }
            return(valid);
        }
示例#26
0
        public static List <InsuranceProduct> GetAllProductsBL()
        {
            List <InsuranceProduct> lst = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                lst = obj.GetAllProductsDAL();
            }
            catch (Exception)
            {
                throw;
            }
            return(lst);
        }
示例#27
0
        //Name
        public static string GetNameCustomerBL(string id)
        {
            string name = string.Empty;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                name = obj.GetNameCustomerDAL(id);
            }
            catch (Exception)
            {
                throw;
            }
            return(name);
        }
示例#28
0
        public static InsuranceProduct GetProductOnProductNameBL(string name)
        {
            InsuranceProduct prod = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                prod = obj.GetProductOnProductNameDAL(name);
            }
            catch (Exception)
            {
                throw;
            }
            return(prod);
        }
示例#29
0
        public static List <Endorsement> GetAllEndorsementBL()
        {
            List <Endorsement> lst = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                lst = obj.GetAllEndorsementDAL();
            }
            catch (Exception)
            {
                throw;
            }
            return(lst);
        }
示例#30
0
        //customer access grid
        public static List <Policy> GetPolicyCustomerAccessBL(string id)
        {
            List <Policy> lst = null;

            try
            {
                PolicyDAL obj = new PolicyDAL();
                lst = obj.GetPolicyCustomerAccessDAL(id);
            }
            catch (Exception)
            {
                throw;
            }
            return(lst);
        }