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; } }
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; } }
public int UpDateDraftContent(ContentInfo Content) { return contentService.UpDate(Content); }
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) }; }
public int CreateContent(ContentInfo Content) { return contentService.Insert(Content); }