Example #1
0
 public int Insert(AttachmentInfo Attachment)
 {
     try
     {
         return SqliteHelper.ExecuteNoQuery(System.Data.CommandType.Text, "insert into hm_mailinfo_Attachment (MailId,FileName,ContentType,Encoding,FileBuufer)values(@MailId,@FileName,@ContentType,@Encoding,@FileBuufer)", Parameter(Attachment));
     }
     catch
     {
         return -1;
     }
 }
Example #2
0
 public int UpDate(AttachmentInfo Attachment)
 {
     try
     {
         return SqliteHelper.ExecuteNoQuery(System.Data.CommandType.Text, "update hm_mailinfo_Attachment set MailId = @MailId,FileName = @FileName, = @ContentType,Encoding = @Encoding,FileBuufer = @FileBuufer where Id = @Id", Parameter(Attachment));
     }
     catch
     {
         return -1;
     }
 }
Example #3
0
 private SQLiteParameter[] Parameter(AttachmentInfo Attachment)
 {
     return new SQLiteParameter[] {
        new SQLiteParameter("@Id",Attachment.Id),
        new SQLiteParameter("@MailId",Attachment.MailId),
        new SQLiteParameter("@FileName",Attachment.FileName),
        new SQLiteParameter("@ContentType",Attachment.ContentType),
        new SQLiteParameter("@Encoding",Attachment.Encoding),
        new SQLiteParameter("@FileBuufer",Attachment.FileBuffer)
        };
 }
Example #4
0
 public int CreateAttactment(AttachmentInfo attachment)
 {
     return attachmentService.Insert(attachment);
 }