public void AddMagForAPPSMS(string tel, string token, string phoneType)
 {
     using (var ctx = new MetalSmsSendEntities())
     {
         var sms = new app_sms();
         sms.mobile    = tel;
         sms.SMSTitle  = "退出";
         sms.content   = token;
         sms.Mid       = "admin";
         sms.st        = false;
         sms.timestamp = DateTime.Now;
         sms.Url       = phoneType;
         ctx.app_sms.Add(sms);
         ctx.SaveChanges();
         //Log.WriteLog("Login,count>0", "tel=" + tel + ",token=" + token);
     }
 }
 private void sendSms(string mobile, string msg)
 {
     using (var ctx = new MetalSmsSendEntities())
     {
         ProvideSm sms = new ProvideSm();
         sms.Tel       = mobile;
         sms.Message   = msg;
         sms.AddDate   = DateTime.Now;
         sms.SendInt   = 0;
         sms.Mid       = "admin";
         sms.SMSTitle  = "上海同鑫";
         sms.st        = false;
         sms.Stop_Flag = false;
         ctx.ProvideSms.Add(sms);
         ctx.SaveChanges();
     }
 }