Ejemplo n.º 1
0
        public static string UpMember(int id, int comid, string Name, string Phone, string Sex, string Email, int Age)
        {
            try
            {
                //根据手机得到公司会员信息
                B2b_crm crm = new B2bCrmData().GetB2bCrmByPhone(comid, Phone);
                if (crm != null)
                {
                    if (crm.Id != id)
                    {
                        return(JsonConvert.SerializeObject(new { type = 1, msg = "当前手机已经绑定,请更换手机" }));
                    }
                }


                var prodata = new B2bCrmData();

                //把返佣日志录入渠道返佣日志表
                B2b_crm b2bcrm = new B2b_crm()
                {
                    Id     = id,
                    Name   = Name,
                    Phone  = Phone,
                    Sex    = Sex,
                    Email  = Email,
                    Age    = Age,
                    Com_id = comid
                };
                var pro = prodata.UpMember(b2bcrm);

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

                throw;
            }
        }