public void UpdateMailSettings() { SqlHelpers.Update(SqlStatements.SQL_UPDATE_MAIL_SETTINGS.FormatWith(MailServer.FixSqlString(), ServerPort, SmtpUser.FixSqlString(75), SmtpPassword.EncryptString(), FromEmail.FixSqlString(75), FromUsername.FixSqlString(75), (RequireAuth) ? "1" : "0", (RequireSsl) ? "1" : "0", Id)); _instance = LoadSystemSettings(); }
public void SaveResourceLink() { if (Id == 0) { SqlHelpers.Insert(SqlStatements.SQL_CREATE_RESOURCE_LINK.FormatWith( Title.FixSqlString(), URL.FixSqlString(), (Active) ? "1" : "0", ThumbNail.FixSqlNull(), Description.FixSqlString())); } else { SqlHelpers.Update(SqlStatements.SQL_UPDATE_RESOURCE_LINK_BY_ID.FormatWith( Title.FixSqlString(), URL.FixSqlString(), (Active) ? "1" : "0", ThumbNail.FixSqlNull(), Description.FixSqlString(), Id)); } }