public void save(string newCode)
 {
     try
     {
         SMSDataClassesDataContext db = new SMSDataClassesDataContext();
         SMS_ActivationCode sm;
         var chk = (from c in db.SMS_ActivationCodes.Where(c => c.PINCode == newCode) select c.PINCode).FirstOrDefault();
         if (chk == null)
         {
             sm = new SMS_ActivationCode();
             sm.PINCode = newCode;
             sm.Status = true;
             db.SMS_ActivationCodes.InsertOnSubmit(sm);
             db.SubmitChanges();
             Console.Write("<br />" + newCode);
         }
     }
     catch (Exception ex)
     {
     }
 }
 partial void UpdateSMS_ActivationCode(SMS_ActivationCode instance);
 partial void DeleteSMS_ActivationCode(SMS_ActivationCode instance);
 partial void InsertSMS_ActivationCode(SMS_ActivationCode instance);