Example #1
0
 /// <summary>
 /// 修改邮件发送
 /// </summary>
 /// <param name="emailSendInfo">邮件发送实体</param>
 public int UpdateEmailSend(EmailSendInfo emailSendInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<EmailSendInfo>().Attach(emailSendInfo, true);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #2
0
 /// <summary>
 /// 修改手机联系人
 /// </summary>
 /// <param name="phoneAddressInfo">手机联系人实体</param>
 public int UpdatePhoneAddress(PhoneAddressInfo phoneAddressInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<PhoneAddressInfo>().Attach(phoneAddressInfo, true);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #3
0
 /// <summary>
 /// 添加邮件发送
 /// </summary>
 /// <param name="emailSendInfo">邮件发送实体</param>
 public int InsertEmailSend(EmailSendInfo emailSendInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<EmailSendInfo>().InsertOnSubmit(emailSendInfo);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #4
0
 /// <summary>
 /// 添加帮助
 /// </summary>
 /// <param name="helpInfo">帮助实体</param>
 public int InsertHelp(HelpInfo helpInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<HelpInfo>().InsertOnSubmit(helpInfo);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #5
0
 /// <summary>
 /// 添加手机联系人
 /// </summary>
 /// <param name="phoneAddressInfo">手机联系人实体</param>
 public int InsertPhoneAddress(PhoneAddressInfo phoneAddressInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<PhoneAddressInfo>().InsertOnSubmit(phoneAddressInfo);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #6
0
 /// <summary>
 /// 添加短信配置
 /// </summary>
 /// <param name="messageProfileInfo">短信配置实体</param>
 public int InsertMessageProfile(MessageProfileInfo messageProfileInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable <MessageProfileInfo>().InsertOnSubmit(messageProfileInfo);
             DB.SubmitChanges();
             return(1);
         }
         catch (Exception e)
         {
             string error = e.Message;
             return(-1);
         }
     }
 }
Example #7
0
 /// <summary>
 /// 修改短信配置
 /// </summary>
 /// <param name="messageProfileInfo">短信配置实体</param>
 public int UpdateMessageProfile(MessageProfileInfo messageProfileInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable <MessageProfileInfo>().Attach(messageProfileInfo, true);
             DB.SubmitChanges();
             return(1);
         }
         catch (Exception e)
         {
             string error = e.Message;
             return(-1);
         }
     }
 }
Example #8
0
 /// <summary>
 /// 添加邮箱地址
 /// </summary>
 /// <param name="emailAddressInfo">邮箱地址实体</param>
 public int InsertEmailAddress(EmailAddressInfo emailAddressInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable <EmailAddressInfo>().InsertOnSubmit(emailAddressInfo);
             DB.SubmitChanges();
             return(1);
         }
         catch (Exception e)
         {
             string error = e.Message;
             return(-1);
         }
     }
 }
Example #9
0
 /// <summary>
 /// 修改邮箱地址
 /// </summary>
 /// <param name="emailAddressInfo">邮箱地址实体</param>
 public int UpdateEmailAddress(EmailAddressInfo emailAddressInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable <EmailAddressInfo>().Attach(emailAddressInfo, true);
             DB.SubmitChanges();
             return(1);
         }
         catch (Exception e)
         {
             string error = e.Message;
             return(-1);
         }
     }
 }
Example #10
0
 /// <summary>
 /// 修改短信配置
 /// </summary>
 /// <param name="messageProfileInfo">短信配置实体</param>
 public int UpdateMessageProfile(MessageProfileInfo messageProfileInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<MessageProfileInfo>().Attach(messageProfileInfo, true);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #11
0
 /// <summary>
 /// 添加短信配置
 /// </summary>
 /// <param name="messageProfileInfo">短信配置实体</param>
 public int InsertMessageProfile(MessageProfileInfo messageProfileInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<MessageProfileInfo>().InsertOnSubmit(messageProfileInfo);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }
Example #12
0
 /// <summary>
 /// 添加用户
 /// </summary>
 /// <param name="userInfo">用户实体</param>
 public int InsertUser(UsersInfo userInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable <UsersInfo>().InsertOnSubmit(userInfo);
             DB.SubmitChanges();
             return(1);
         }
         catch (Exception e)
         {
             string error = e.Message;
             return(-1);
         }
     }
 }
Example #13
0
 /// <summary>
 /// 修改用户
 /// </summary>
 /// <param name="userInfo">用户实体</param>
 public int UpdateUser(UsersInfo userInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable <UsersInfo>().Attach(userInfo, true);
             DB.SubmitChanges();
             return(1);
         }
         catch (Exception e)
         {
             string error = e.Message;
             return(-1);
         }
     }
 }
Example #14
0
 /// <summary>
 /// 修改用户
 /// </summary>
 /// <param name="userInfo">用户实体</param>
 public int UpdateUser(UsersInfo userInfo)
 {
     using (DataContextDB DB = new DataContextDB())
     {
         try
         {
             DB.GetTable<UsersInfo>().Attach(userInfo, true);
             DB.SubmitChanges();
             return 1;
         }
         catch (Exception e)
         {
             string error = e.Message;
             return -1;
         }
     }
 }