//初始会员密码 public static string initialuser(int id, int comid) { var b2b = new B2bCrmData(); var phone = b2b.Readuser(id, comid).Phone.ToString(); var pass = phone.Substring(5, 6).ToString(); var name = b2b.Readuser(id, comid).Name.ToString(); var cardcode = b2b.Readuser(id, comid).Idcard.ToString(); try { var prodata = new B2bCrmData(); B2b_crm b2bcrm = new B2b_crm() { Id = id, Com_id = comid, Password1 = pass }; var pro = prodata.initialuser(b2bcrm); if (int.Parse(pro) == id) { SendSmsHelper.GetMember_sms(phone, name, cardcode, pass, 0, "初始化密码", comid); } return(JsonConvert.SerializeObject(new { type = 100, msg = pro })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }