Example #1
0
 public int Insert(ContentInfo Content)
 {
     try
     {
         return SqliteHelper.ExecuteNoQuery(System.Data.CommandType.Text, "insert into hm_mailinfo_Content (MailId,ContentType,Charset,Encoding,Content)values(@MailId,@ContentType,@Charset,@Encoding,@Content)", Parameter(Content));
     }
     catch
     {
         return -1;
     }
 }
Example #2
0
 public int UpDate(ContentInfo Content)
 {
     try
     {
         return SqliteHelper.ExecuteNoQuery(System.Data.CommandType.Text, "update hm_mailinfo_Content set MailId = @MailId,ContentType = @ContentType,Charset = @Charset, = @Encoding, = @Content where Id = @Id", Parameter(Content));
     }
     catch
     {
         return -1;
     }
 }
Example #3
0
 public int UpDateDraftContent(ContentInfo Content)
 {
     return contentService.UpDate(Content);
 }
Example #4
0
 private SQLiteParameter[] Parameter(ContentInfo Content)
 {
     return new SQLiteParameter[] {
        new SQLiteParameter("@Id",Content.Id),
        new SQLiteParameter("@MailId",Content.MailId),
        new SQLiteParameter("@ContentType",Content.ContentType),
        new SQLiteParameter("@Charset",Content.Charset),
        new SQLiteParameter("@Encoding",Content.Encoding),
        new SQLiteParameter("@Content",Content.Content)
        };
 }
Example #5
0
 public int CreateContent(ContentInfo Content)
 {
     return contentService.Insert(Content);
 }