Exemple #1
0
        public static string fuwuPageList(string comid, int pageindex, int pagesize, int user)
        {
            var totalcount = 0;

            try
            {
                var         prodata    = new B2bCrmData();
                var         list       = prodata.fuwuPageList(comid, pageindex, pagesize, user, out totalcount);
                IEnumerable result     = "";
                var         memcompany = new MemberChannelcompanyData();
                if (list != null)
                {
                    result = from pro in list
                             select new
                    {
                        id           = pro.Id,
                        comid        = pro.Com_id,
                        phone        = pro.Phone,
                        registerdate = pro.Regidate,
                        customername = pro.Name,
                        imprest      = pro.Imprest,
                        integral     = pro.Integral,
                        idcard       = pro.Idcard,
                        email        = pro.Email,
                        serverid     = pro.Servercard,
                        winxin       = pro.Weixin == null || pro.Weixin == "" ? "" : "yes",
                        channel      = memcompany.UpCompanyById(pro.Idcard.ToString()),
                        referrer     = MemberChannelData.Upstring(pro.Idcard.ToString()).Name.ToString()
                    }
                }
                ;

                return(JsonConvert.SerializeObject(new { type = 100, totalCount = totalcount, msg = result }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));

                throw;
            }
        }