using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;

ovenforksqueeΑσφάλεια

3 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

76 εμφανίσεις

using

System;

using

System.Data;

using

System.Configuration;

using

System.Collections;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Web.UI.HtmlControls;

using

System.Data.SqlClient;

using

DataAccess;

using

TransedManager;



public

partial

class

Steering_Committee

: System.Web.UI.
Page

{


protected

void

Page_Load(
object

sender,
EventArgs

e)


{


lblMessage.Text =
""
;



if

(Page.IsPostBack ==
false
)


{


try


{


if

(Request.QueryString.Count > 0)


{


if

(Request.QueryString[
"Mkey"
] !=
null

&&
Request.QueryString[
"Mkey"
].Trim() !=
""
)


{


hdn_MenuId.Value =
Request.QueryString[
"Mkey"
].ToString().Trim();


GetHeading();


Get_Profile_HeaderImage();


Get_Profile();




}


}


}


catch

(
Exception

ex)


{


lblMessage.Text = ex.Message.Trim();


}



hdn_URL.Value =
commonFunctions
.EncryptSHA(Request.Url.ToString());


}



Page.Title =
"Transed :: "

+ hdn_Title.Value.Trim();


}



private

void

GetHeading()


{


if

(hdn_MenuId.Value.Trim() ==
""
)


return
;



SqlConnection

Conn =
ApplicationInfo
.GetConnection();


try


{


DataSet

ds =
CMenuManager
.Menu_Select_ById(Conn,
Convert
.ToInt64(hdn_MenuId.Value.Trim()));


if

(ds !=
null
)


{


if

(ds.Tables[0].Rows.Count > 0)


{


hdn_Title.Value =
ds.Tables[0].Rows[0][
"Menu_Name"
].ToString().Trim();


// divTitle.InnerHtml =
ds.Tables[0].Rows[0]["Menu_Name"].ToString().Trim();


}


}


}


catch

(
Exception

ex
)


{


lblMessage.Text = ex.Message.Trim();


}


finally


{


Conn.Close();


Conn.Dispose();


}



}



private

void

Get_Profile_HeaderImage()


{


if

(hdn_MenuId.Value.Trim() ==
""
)


return
;



SqlConnection

Conn =
ApplicationInfo
.GetConnection();


try


{


DataSet

ds =
CMenuManager
.MenuTemplateMapping_Select_byMenuId(Conn,
Convert
.ToInt64(hdn_MenuId.Value.Trim()));



if

(ds !=
null
)


{


if

(ds.Tables[0].Rows.Count > 0)


{


HtmlMeta

metaKeywords =
new

HtmlMeta
();


metaKeywords.Name =
"keywords"
;


metaKeywords.HttpEquiv =
"Content
-
Type"
;


metaKeywords.Content =
ds.Tables[0].Rows[0][
"Meta_Keywords"
].ToString().Trim();


Page.Header.Controls.Add(metaKeywords);




HtmlMeta

me
taDescription =
new

HtmlMeta
();


metaDescription.Name =
"description"
;


metaDescription.HttpEquiv =
"Content
-
Type"
;


metaDescription.Content =
ds.Tables[0].Rows[0][
"Meta_Description"
].ToString().Trim
();


Page.Header.Controls.Add(metaDescription);




hdn_Profile_Main_Id.Value =
ds.Tables[0].Rows[0][
"Page_Id"
].ToString().Trim();


string

strHeaderImage =
ds.Tables[0].Rows[0][
"Main_Image"
].ToString(
).Trim();


string

strHeaderUrl =
""
;
//ds.Tables[0].Rows[0]["HeaderUrl"].ToString().Trim();


string

strHeaderIsNew =
""
;
//ds.Tables[0].Rows[0]["HeaderIsNew"].ToString().Trim();



string

strImageT =
""
;



divHeaderImage.InnerHtml =
""
;



string

strConcate =
""
;


if

(strHeaderImage.Trim() !=
""
)


{


string
[] str_arr = strHeaderImage.Split(
'.'
);


if

(str_arr.Length == 2)


{


if

(str_arr[1] ==
"swf"
)


{


strImageT =
"<object onclick='return false'
classid='clsid:D27CDB
6E
-
AE6D
-
11cf
-
96B8
-
444553540000'
codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=7,0,19,0' width='553' height='173' >"

+


"<param name='movie'
value='/Common/Uploads/Profile
Template/"

+ strHeaderImage +
"' />"

+


"<param name='quality'
value='high' />"

+


"<embed
src='/Common/Uploads/ProfileTemplate/"

+ strHeaderImage +
"' quality='high'
pluginspage='http://www.macromedia.com/go/getflashplayer'
type='application/x
-
shockwave
-
flash' width='553' height='173' ></embed>"

+


"</object>"
;


}


else



{


strImageT =
"<img
src='/Common/Uploads/ProfileTemplate/"

+ strHeaderImage +
"' width='553'
height='173' border='0' />"
;



}


}




if

(strHeaderIsNew ==
"Y"
)


strHeaderIsNew =
"_blank"
;


else


strHeaderIsNew =
"_parent"
;


//<div class="content_top_img" >


// <img src="images/top_image.jpg" alt="image"
width="553" height="173" /></div>


if

(strHeaderUrl ==
""

|| strHeaderUrl ==
"http://"
)


{


strConcate =
"<div class='content_top_img
' >"

+
strImageT +
"</div>"
;


}


else


{


strConcate =
"<a href='"

+ strHeaderUrl +
"'
target='"

+ strHeaderIsNew +
"' >"

+ strImageT +
"</a>"
;



}


}



divHeaderImage.InnerHtml = strConcate;


}



}



}


catch

(
Exception

ex)


{


lblMessage.Text = ex.Message.Trim();


}


finally


{


Conn.Close();


Conn.Dispose();


}



}



private

void

Get_Profile()


{


if

(hdn_Profile_Main_Id.Value.Trim() ==
""
)


return
;



System.Text.
StringBuilder

sb =
new

System.Text.
StringBuilder
();


SqlConnection

conn =
ApplicationInfo
.GetConnection();



try


{


DataSet

ds =
ProfileManager
.Bind_Profile(conn,
Convert
.ToInt64(hdn_Profile_Main_Id.Value.Trim()),
""
);



if

(ds !=
null
)


{


if

(ds.Tables[0].Rows.Count > 0)


{


// NEW CHANGE


string

strConcate =
""
;



// strConcate += "//<![CDATA[";


strConcat
e +=
"<ul id='accordion'>"
;


for

(
int

i = 0; i < ds.Tables[0].Rows.Count; i++)


{


string

strName =
ds.Tables[0].Rows[i][
"Name"
].ToString().Trim();


string

strDesignation =
ds.Tables[0].Rows[i][
"Designation"
].ToString().Trim();


string

strThImage =
ds.Tables[0].Rows[i][
"ThumbnailImage"
].ToString().Trim();


string

strDescription =
ds.Tables[0].Rows[i][
"Description"
].ToString().Trim();


if

(strDescription !=
""
)


{


strDescription = strDescription.Replace(
"<br>"
,
"<br />"
);


}


string

st
rProfileId =
ds.Tables[0].Rows[i][
"ProfileId"
].ToString();



string

strImageT =
"<img
src='/Common/Uploads/ProfileTemplate/"

+ strThImage +
"' width='105'
height='74' border='0' />"
;




strConcate +=
"<li>"
;


strConcate +=
"<h3>"
;


//strConcate += "<a name='a1' href='#a1'>";


strConcate +=
"<div class='faq_question'>"
;


strConcate +=
"<div
class='commitee'>"
;


strConcate +=
"<div class='commitee_image'>"
;


strConcate += strImageT +
"</div>"
;


strConcate +=
"<div class='commitee_text'>"

+ strName
+
"<br />"
;



strConcate +=
"<p>"

+ strDesignation +
"</p></div>"
;


strConcate +=
"<div class='commitee_btn'>"
;


strConcate +=
"<span style='width: 28px; float:
right; background: url(Images/span_bg.jpg) no
-
repeat; "

+


" text
-
align: center; color: #000;
font
-
size: 16px; font
-
weight: bold; height: 18px; "

+


" margin: 3px 0 0 0; padding: 0px 0px 0
1px; line
-
height: 1.2em;'>+</span>"
;



strConcate +=
"</div>"

;


strConcate +=
"<div class='clr'>"
;


strConcate +=
"</div></div></div>"
;


strConcate +=
"<div class='clr'></div>"
;


//strConcat
e += "</a></h3>" ;


strConcate +=
"</h3>"
;


strConcate +=
"<div class='collapse'>"
;


strConcate +=
"<div class='collapse
-
container'>"
;


strConcate +=
"<p>"

+ strDescription +
"</p>"
;


strConcate +=
"</div></div></li>"
;




}


strConcate +=
"</ul>"
;


// strConcate += "//]]>";



divProfile.In
nerHtml = strConcate;





// END OF NEW CHANGE


}


else


{


lblMessage.Text =
"No Data Available"
;


}


}


else


{


lblMessage.Text =
"No Data Available"
;


}


}


catch

(
Exception

ex)


{


lblMessage.Text = ex.Message.ToString();


}


finally


{


conn.Close();


conn.Dispose();


}


}




}