Setting Stylesheet never worked????? PLEASE GIVE FEEDBACK!

Topics: General
Jul 11, 2007 at 9:53 AM
Edited Jul 11, 2007 at 2:07 PM
Hello,
Perhaps I didn´t understand, but in my opinion
setting a stylesheet with "Admin.ascx" and "Admin.ascx.cs" never worked,
´cause the "Update"-Button had no OnClick()-Event and the contents of TextBox1 was never used.
I modified some files and added a stored procedure:

My solution is not so good yet,´cause I save the stylesheet-file.

Here is the SP:

//BEGIN of SP (assuming your DB is called JMDCMS)
USE JMDCMS
GO
/****** Objekt: StoredProcedure dbo.JMD_SITE_UPDATE_STYLESHEET Skriptdatum: 07/11/2007 10:42:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE dbo.JMD_SITE_UPDATE_STYLESHEET
@ID int,
@STYLE_SHEET nvarchar(255)

AS
BEGIN
Update JMD_SITE

Set STYLESHEET = @STYLESHEET

where
ID = @ID
END
//END of SP

Then I modified the SqlServer-Class:

//BEGIN of SqlServer-modification
Add this Member:

string SqlJMDSITEUPDATE_STYLESHEET =
"Exec JMDSITEUPDATE_STYLESHEET {0},'{1}'";

Add this Method:

public DataTable JMDSITEUPDATESTYLESHEET(string SiteID, String pathToStylesheet)
{
DataTable dt;
DbSql dbSql = new DbSql(SqlConnectionString);
dt = dbSql.OpenTable(String.Format(SqlJMDSITEUPDATE_STYLESHEET,
Site_ID, pathToStylesheet
));
dbSql = null;
return dt;
}
//END of SqlServer-modification

Then I modified the Admin.ascx-File, ´cause I wanted a FileUpload-Control for this Site:

//BEGIN of Admin.ascx-modification
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Admin.ascx.cs" Inherits="ModulesAdminAdmin" %>
<table class="TableForm">
<tr>
<th class="TableFormTdLeft" colspan="2">
<h2 class="TableFormH2">Options</h2>
</th>
</tr>

<tr>
<td class="TableFormTdLeft">
<h1 class="TableFormH1">Style Sheet</h1>

</td>
<td class="TableFormTdRight">
 
Coordinator
Jul 12, 2007 at 1:35 PM
Hello 666Rene666,

Nice work!!!

Yes, your are right, the functionality to set a new style sheet from admin interface is not implemented yet.

Could you please send me the files that you have modified, I will implement in JMDCMS and create release.

Thanks for using JMDCMS!!!!

Jan 20, 2008 at 5:02 PM
Edited Jan 20, 2008 at 5:15 PM
disregard this question as well..i found it..excellent application.

Thanks



Then I modified the SqlServer-Class:

//BEGIN of SqlServer-modification
Add this Member:

string SqlJMDSITEUPDATE_STYLESHEET =
"Exec JMDSITEUPDATE_STYLESHEET {0},'{1}'";

Add this Method:

public DataTable JMDSITEUPDATESTYLESHEET(string SiteID, String pathToStylesheet)
{
DataTable dt;
DbSql dbSql = new DbSql(SqlConnectionString);
dt = dbSql.OpenTable(String.Format(SqlJMDSITEUPDATE_STYLESHEET,
Site_ID, pathToStylesheet
));
dbSql = null;
return dt;
}
//END of SqlServer-modification

Then I modified the Admin.ascx-File, ´cause I wanted a FileUpload-Control for this Site:

//BEGIN of Admin.ascx-modification
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Admin.ascx.cs" Inherits="ModulesAdminAdmin" %>
<table class="TableForm">
<tr>
<th class="TableFormTdLeft" colspan="2">
<h2 class="TableFormH2">Options</h2>
</th>
</tr>

<tr>
<td class="TableFormTdLeft">
<h1 class="TableFormH1">Style Sheet</h1>

</td>
<td class="TableFormTdRight">
 
Jan 22, 2008 at 9:03 AM
Not disgarding:
The modified class is:
JMDCMS.Web.Lib.SqlServer




swelborn wrote:
disregard this question as well..i found it..excellent application.

Thanks



Then I modified the SqlServer-Class:

//BEGIN of SqlServer-modification
Add this Member:

string SqlJMDSITEUPDATE_STYLESHEET =
"Exec JMDSITEUPDATE_STYLESHEET {0},'{1}'";

Add this Method:

public DataTable JMDSITEUPDATESTYLESHEET(string SiteID, String pathToStylesheet)
{
DataTable dt;
DbSql dbSql = new DbSql(SqlConnectionString);
dt = dbSql.OpenTable(String.Format(SqlJMDSITEUPDATE_STYLESHEET,
Site_ID, pathToStylesheet
));
dbSql = null;
return dt;
}
//END of SqlServer-modification

Then I modified the Admin.ascx-File, ´cause I wanted a FileUpload-Control for this Site:

//BEGIN of Admin.ascx-modification
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Admin.ascx.cs" Inherits="ModulesAdminAdmin" %>
<table class="TableForm">
<tr>
<th class="TableFormTdLeft" colspan="2">
<h2 class="TableFormH2">Options</h2>
</th>
</tr>

<tr>
<td class="TableFormTdLeft">
<h1 class="TableFormH1">Style Sheet</h1>

</td>
<td class="TableFormTdRight">