示例#1
0
        /// <summary>
        /// 获取客户列表
        /// </summary>
        /// <returns></returns>
        public JsonResult Customer_getList()
        {
            DaCustomerInfo       dal       = new DaCustomerInfo();
            IList <CustomerInfo> customers = dal.getList(BaseHelper.getCookie().id.ToString());

            var result = new CustomJsonResult();

            result.dateFormat = "yyyy-MM-dd";
            result.Data       = new { total = customers.Count, rows = customers };
            return(result);
        }
示例#2
0
        /// <summary>
        /// 搜索客户列表
        /// </summary>
        /// <param name="name">客户名称</param>
        /// <param name="type">客户类型</param>
        /// <param name="salesman">业务员</param>
        /// <returns></returns>
        public JsonResult Customer_search(string name, string type, string salesman)
        {
            CustomerInfo en = new CustomerInfo();

            en.name = name;

            if (type.Trim() != "")
            {
                en.channelTypeID = Convert.ToInt32(type);
            }

            if (salesman.Trim() != "")
            {
                en.salesmanID = Convert.ToInt32(salesman);
            }

            DaCustomerInfo dal    = new DaCustomerInfo();
            var            result = new CustomJsonResult();

            result.Data = dal.getList(en, BaseHelper.getCookie().id.ToString());
            return(result);
        }