private static SmsObj getsms() { SmsObj sms = new SmsObj(); sms.phoneNumbers.Add("13650367330"); sms.smsContent = "zhong国24"; return(sms); }
private void detach_SmsObjs(SmsObj entity) { this.SendPropertyChanging(); entity.SmsType = null; }
private void attach_SmsObjs(SmsObj entity) { this.SendPropertyChanging(); entity.SmsType = this; }
partial void DeleteSmsObj(SmsObj instance);
partial void UpdateSmsObj(SmsObj instance);
partial void InsertSmsObj(SmsObj instance);
public bool InsertSMS(string SMSCode, int SmsParentId, string senderNumber, int SenderType, string ReceiverPhone, int ReceiverType, DateTime Date, string Subject, string Content, bool IsSendSuccess, bool IsDelete, bool IsRead, int SmsTypeId, int PromotionId) { try { SmsObj sms = new SmsObj(); sms.SMSCode = SMSCode; sms.SenderNumber = senderNumber; sms.ParentSmsId = SmsParentId; sms.SenderType = SenderType; sms.ReceiverNumber = ReceiverPhone; sms.ReceiverType = ReceiverType; sms.Date = Date; sms.Subject = Subject; sms.Content = Content; sms.IsSendSuccess = IsSendSuccess; sms.IsDeleted = IsDelete; sms.IsRead = IsRead; sms.SmsTypeId = SmsTypeId; sms.PromotionId = PromotionId; db.SmsObjs.InsertOnSubmit(sms); db.SubmitChanges(); return true; } catch (Exception) { return false; } }