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; public partial class Admin_Link_Style : System.Web.UI.Page { DBAccess.DBAccess ClSqlCmd; public void Page_Load(object sender, EventArgs e) { ClSqlCmd = new DBAccess.DBAccess(System.Configuration.ConfigurationSettings.AppSettings["SE_ConnectionString"]); /////////////////////////////////////////////////////////////////////////// if (!Page.IsPostBack) { Load_Fonts(); GetData(); } } void Load_Fonts() { DataSet DS = ClSqlCmd.DataSetSel(@"SELECT [Font_ID] ,[Font_Name] ,[Module_ID] FROM [dbo].[__StandardEngine_T_Fonts] where [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"] + @" Order by [Font_Name] asc" ); ///////////////////////////////// DS.Tables[0].Rows.InsertAt(DS.Tables[0].NewRow(), 0); DS.Tables[0].Rows[0]["Font_Name"] = "غير محدد"; ///////////////////////////////// ddl_Def_FontFamily_Outer.DataSource = DS; ddl_Def_FontFamily_Outer.DataTextField = "Font_Name"; ddl_Def_FontFamily_Outer.DataValueField = "Font_ID"; ddl_Def_FontFamily_Outer.DataBind(); ///////////////////////////////// ddl_Hover_FontFamily_Outer.DataSource = DS; ddl_Hover_FontFamily_Outer.DataTextField = "Font_Name"; ddl_Hover_FontFamily_Outer.DataValueField = "Font_ID"; ddl_Hover_FontFamily_Outer.DataBind(); } void GetData() { DataSet DS=ClSqlCmd.DataSetSel(@" SELECT [ModuleStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_BorderMode_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_TextStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_BackGround_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_BorderMode_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_TextStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_BackGround_ID] FROM [dbo].[__StandardEngine_T_ModuleStyles] where [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { DataSet DS_Sub = new DataSet(); if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BorderMode_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [BorderMode_ID] ,[Padding] ,[BackColor] ,[Stroke_Size] ,[Stroke_Color] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BorderMode_ID"].ToString()); #endregion #region Set Data if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0) { if (DS_Sub.Tables[0].Rows[0]["Padding"] != Convert.DBNull) { string[] Padding = DS_Sub.Tables[0].Rows[0]["Padding"].ToString().Split(null); ddl_Def_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Def_Padding_Top.Value; ddl_Def_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Def_Padding_Right.Value; ddl_Def_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Def_Padding_Bottom.Value; ddl_Def_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Def_Padding_Left.Value; } if (DS_Sub.Tables[0].Rows[0]["TopBorder_Color"] != Convert.DBNull) txt_Def_TopBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Color"] != Convert.DBNull) txt_Def_RightBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Color"] != Convert.DBNull) txt_Def_BottomBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Color"] != Convert.DBNull) txt_Def_LeftBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["TopBorder_Style"] != Convert.DBNull) ddl_Def_TopBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Style"] != Convert.DBNull) ddl_Def_RightBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Style"] != Convert.DBNull) ddl_Def_BottomBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Style"] != Convert.DBNull) ddl_Def_LeftBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["TopBorder_Size"] != Convert.DBNull) ddl_Def_TopBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Size"] != Convert.DBNull) ddl_Def_RightBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Size"] != Convert.DBNull) ddl_Def_BottomBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Size"] != Convert.DBNull) ddl_Def_LeftBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Def_Shadow_Padding_Top.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Top"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Def_Shadow_Padding_Right.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Right"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Def_Shadow_Padding_Bottom.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Bottom"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Def_Shadow_Padding_Left.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Left"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Hor"] != Convert.DBNull) { ddl_Def_Shadow_Hor.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Hor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS_Sub.Tables[0].Rows[0]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Def_Shadow_Hor.SelectedValue = "-"; } else { rbl_Def_Shadow_Hor.SelectedValue = ""; } } if (DS_Sub.Tables[0].Rows[0]["Shadow_Vor"] != Convert.DBNull) { ddl_Def_Shadow_Ver.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Vor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS_Sub.Tables[0].Rows[0]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Def_Shadow_Ver.SelectedValue = "-"; } else { rbl_Def_Shadow_Ver.SelectedValue = ""; } } if (DS_Sub.Tables[0].Rows[0]["Shadow_Blur"] != Convert.DBNull) ddl_Def_Shadow_Blur.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Blur"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Color"] != Convert.DBNull) txt_Def_Shadow_Color.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Curve_Radius"] != Convert.DBNull) ddl_Def_Curve_Radius.Value = DS_Sub.Tables[0].Rows[0]["Curve_Radius"].ToString(); } #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BorderMode_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [BorderMode_ID] ,[Padding] ,[BackColor] ,[Stroke_Size] ,[Stroke_Color] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BorderMode_ID"].ToString()); #endregion #region Set Data if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0) { if (DS_Sub.Tables[0].Rows[0]["Padding"] != Convert.DBNull) { string[] Padding = DS_Sub.Tables[0].Rows[0]["Padding"].ToString().Split(null); ddl_Hover_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Hover_Padding_Top.Value; ddl_Hover_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Hover_Padding_Right.Value; ddl_Hover_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Hover_Padding_Bottom.Value; ddl_Hover_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Hover_Padding_Left.Value; } if (DS_Sub.Tables[0].Rows[0]["TopBorder_Color"] != Convert.DBNull) txt_Hover_TopBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Color"] != Convert.DBNull) txt_Hover_RightBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Color"] != Convert.DBNull) txt_Hover_BottomBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Color"] != Convert.DBNull) txt_Hover_LeftBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["TopBorder_Style"] != Convert.DBNull) ddl_Hover_TopBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Style"] != Convert.DBNull) ddl_Hover_RightBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Style"] != Convert.DBNull) ddl_Hover_BottomBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Style"] != Convert.DBNull) ddl_Hover_LeftBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["TopBorder_Size"] != Convert.DBNull) ddl_Hover_TopBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Size"] != Convert.DBNull) ddl_Hover_RightBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Size"] != Convert.DBNull) ddl_Hover_BottomBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Size"] != Convert.DBNull) ddl_Hover_LeftBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Hover_Shadow_Padding_Top.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Top"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Hover_Shadow_Padding_Right.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Right"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Hover_Shadow_Padding_Bottom.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Bottom"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Hover_Shadow_Padding_Left.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Padding_Left"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Hor"] != Convert.DBNull) { ddl_Hover_Shadow_Hor.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Hor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS_Sub.Tables[0].Rows[0]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Hover_Shadow_Hor.SelectedValue = "-"; } else { rbl_Hover_Shadow_Hor.SelectedValue = ""; } } if (DS_Sub.Tables[0].Rows[0]["Shadow_Vor"] != Convert.DBNull) { ddl_Hover_Shadow_Ver.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Vor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS_Sub.Tables[0].Rows[0]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Hover_Shadow_Ver.SelectedValue = "-"; } else { rbl_Hover_Shadow_Ver.SelectedValue = ""; } } if (DS_Sub.Tables[0].Rows[0]["Shadow_Blur"] != Convert.DBNull) ddl_Hover_Shadow_Blur.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Blur"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Color"] != Convert.DBNull) txt_Hover_Shadow_Color.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Curve_Radius"] != Convert.DBNull) ddl_Hover_Curve_Radius.Value = DS_Sub.Tables[0].Rows[0]["Curve_Radius"].ToString(); } #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_TextStyle_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [ForeColor] ,[BackColor] ,[FontFamily] ,[FontSize] ,[Align] ,[Bold] ,[Underline] ,[Italic] ,[FontFamily_Outer] FROM [dbo].[__StandardEngine_T_TextStyle] where [TextStyle_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_TextStyle_ID"].ToString()); #endregion #region Set Data if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0) { if (DS_Sub.Tables[0].Rows[0]["ForeColor"] != Convert.DBNull) txt_Def_ForeColor.Value = DS_Sub.Tables[0].Rows[0]["ForeColor"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BackColor"] != Convert.DBNull) { txt_Def_BackColor.Value = DS_Sub.Tables[0].Rows[0]["BackColor"].ToString(); cb_Def_BackColor_Trans.Checked = false; } else { txt_Def_BackColor.Value = ""; cb_Def_BackColor_Trans.Checked = true; } if (DS_Sub.Tables[0].Rows[0]["FontFamily"] != Convert.DBNull) ddl_Def_FontFamily.Value = DS_Sub.Tables[0].Rows[0]["FontFamily"].ToString(); if (DS_Sub.Tables[0].Rows[0]["FontSize"] != Convert.DBNull) ddl_Def_FontSize.Value = DS_Sub.Tables[0].Rows[0]["FontSize"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Align"] != Convert.DBNull) ddl_Def_Align.Value = DS_Sub.Tables[0].Rows[0]["Align"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Bold"] != Convert.DBNull) cb_Def_Bold.Checked = DS_Sub.Tables[0].Rows[0]["Bold"].ToString().ToLower() == "bold" ? true : false; if (DS_Sub.Tables[0].Rows[0]["Underline"] != Convert.DBNull) cb_Def_Underline.Checked = DS_Sub.Tables[0].Rows[0]["Underline"].ToString().ToLower() == "underline" ? true : false; if (DS_Sub.Tables[0].Rows[0]["Italic"] != Convert.DBNull) cb_Def_Italic.Checked = DS_Sub.Tables[0].Rows[0]["Italic"].ToString().ToLower() == "italic" ? true : false; if (DS_Sub.Tables[0].Rows[0]["FontFamily_Outer"] != Convert.DBNull) ddl_Def_FontFamily_Outer.SelectedValue = DS_Sub.Tables[0].Rows[0]["FontFamily_Outer"].ToString(); } #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_TextStyle_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [ForeColor] ,[BackColor] ,[FontFamily] ,[FontSize] ,[Align] ,[Bold] ,[Underline] ,[Italic] ,[FontFamily_Outer] FROM [dbo].[__StandardEngine_T_TextStyle] where [TextStyle_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_TextStyle_ID"].ToString()); #endregion #region Set Data if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0) { if (DS_Sub.Tables[0].Rows[0]["ForeColor"] != Convert.DBNull) txt_Hover_ForeColor.Value = DS_Sub.Tables[0].Rows[0]["ForeColor"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BackColor"] != Convert.DBNull) { txt_Hover_BackColor.Value = DS_Sub.Tables[0].Rows[0]["BackColor"].ToString(); cb_Hover_BackColor_Trans.Checked = false; } else { txt_Hover_BackColor.Value = ""; cb_Hover_BackColor_Trans.Checked = true; } if (DS_Sub.Tables[0].Rows[0]["FontFamily"] != Convert.DBNull) ddl_Hover_FontFamily.Value = DS_Sub.Tables[0].Rows[0]["FontFamily"].ToString(); if (DS_Sub.Tables[0].Rows[0]["FontSize"] != Convert.DBNull) ddl_Hover_FontSize.Value = DS_Sub.Tables[0].Rows[0]["FontSize"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Align"] != Convert.DBNull) ddl_Hover_Align.Value = DS_Sub.Tables[0].Rows[0]["Align"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Bold"] != Convert.DBNull) cb_Hover_Bold.Checked = DS_Sub.Tables[0].Rows[0]["Bold"].ToString().ToLower() == "bold" ? true : false; if (DS_Sub.Tables[0].Rows[0]["Underline"] != Convert.DBNull) cb_Hover_Underline.Checked = DS_Sub.Tables[0].Rows[0]["Underline"].ToString().ToLower() == "underline" ? true : false; if (DS_Sub.Tables[0].Rows[0]["Italic"] != Convert.DBNull) cb_Hover_Italic.Checked = DS_Sub.Tables[0].Rows[0]["Italic"].ToString().ToLower() == "italic" ? true : false; if (DS_Sub.Tables[0].Rows[0]["FontFamily_Outer"] != Convert.DBNull) ddl_Hover_FontFamily_Outer.SelectedValue = DS_Sub.Tables[0].Rows[0]["FontFamily_Outer"].ToString(); } #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BackGround_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [BackGround_ID] ,[background_color] ,[background_image] ,[background_repeat] ,[background_position_Hor] ,[background_position_Ver] FROM [dbo].[__StandardEngine_T_BackGround] where [BackGround_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BackGround_ID"].ToString()); #endregion #region Set Data if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0) { if (DS_Sub.Tables[0].Rows[0]["background_image"] != Convert.DBNull && DS_Sub.Tables[0].Rows[0]["background_image"].ToString() != "") { hdn_Def_background_image.Value = DS_Sub.Tables[0].Rows[0]["background_image"].ToString(); img_Def_background_image.ImageUrl = "../Photos_Swfs/" + DS_Sub.Tables[0].Rows[0]["background_image"].ToString(); tr_Def_background_image.Visible = true; } else { hdn_Def_background_image.Value = ""; img_Def_background_image.ImageUrl = ""; tr_Def_background_image.Visible = false; } if (DS_Sub.Tables[0].Rows[0]["background_repeat"] != Convert.DBNull) ddl_Def_background_repeat.Value = DS_Sub.Tables[0].Rows[0]["background_repeat"].ToString(); if (DS_Sub.Tables[0].Rows[0]["background_position_Hor"] != Convert.DBNull) ddl_Def_background_position_Hor.Value = DS_Sub.Tables[0].Rows[0]["background_position_Hor"].ToString(); if (DS_Sub.Tables[0].Rows[0]["background_position_Ver"] != Convert.DBNull) ddl_Def_background_position_Ver.Value = DS_Sub.Tables[0].Rows[0]["background_position_Ver"].ToString(); } #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BackGround_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [BackGround_ID] ,[background_color] ,[background_image] ,[background_repeat] ,[background_position_Hor] ,[background_position_Ver] FROM [dbo].[__StandardEngine_T_BackGround] where [BackGround_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BackGround_ID"].ToString()); #endregion #region Set Data if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0) { if (DS_Sub.Tables[0].Rows[0]["background_image"] != Convert.DBNull && DS_Sub.Tables[0].Rows[0]["background_image"].ToString() != "") { hdn_Hover_background_image.Value = DS_Sub.Tables[0].Rows[0]["background_image"].ToString(); img_Hover_background_image.ImageUrl = "../Photos_Swfs/" + DS_Sub.Tables[0].Rows[0]["background_image"].ToString(); tr_Hover_background_image.Visible = true; } else { hdn_Hover_background_image.Value = ""; img_Hover_background_image.ImageUrl = ""; tr_Hover_background_image.Visible = false; } if (DS_Sub.Tables[0].Rows[0]["background_repeat"] != Convert.DBNull) ddl_Hover_background_repeat.Value = DS_Sub.Tables[0].Rows[0]["background_repeat"].ToString(); if (DS_Sub.Tables[0].Rows[0]["background_position_Hor"] != Convert.DBNull) ddl_Hover_background_position_Hor.Value = DS_Sub.Tables[0].Rows[0]["background_position_Hor"].ToString(); if (DS_Sub.Tables[0].Rows[0]["background_position_Ver"] != Convert.DBNull) ddl_Hover_background_position_Ver.Value = DS_Sub.Tables[0].Rows[0]["background_position_Ver"].ToString(); } #endregion } } } protected void Button1_Click(object sender, EventArgs e) { DataSet DS = ClSqlCmd.DataSetSel(@" SELECT [ModuleStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_BorderMode_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_TextStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_BackGround_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_BorderMode_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_TextStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_BackGround_ID] FROM [dbo].[__StandardEngine_T_ModuleStyles] where [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]); if (DS.Tables.Count < 0 || DS.Tables[0].Rows.Count <= 0) { #region Insert New ModuleStyles ClSqlCmd.CommandExc(@" Insert into [dbo].[__StandardEngine_T_ModuleStyles] ( [ModuleStyle_ID] ,[Module_ID] ) values ( dbo.__StandardEngine_F_MaxID_ModuleStyles()+1 ,"+System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]+@" )"); #endregion } else { #region Update in current ModuleStyles to NULL ClSqlCmd.CommandExc(@" update [dbo].[__StandardEngine_T_ModuleStyles] set [" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_BorderMode_ID]=NULL ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_TextStyle_ID]=NULL ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Def_BackGround_ID]=NULL ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_BorderMode_ID]=NULL ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_TextStyle_ID]=NULL ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_Hover_BackGround_ID]=NULL where [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]); #endregion //////////////////////////////////////////////////////////////////// if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BorderMode_ID"] != Convert.DBNull) { #region Delete Current ClSqlCmd.CommandExc(@" Delete FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BorderMode_ID"].ToString()); #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BorderMode_ID"] != Convert.DBNull) { #region Delete Current ClSqlCmd.CommandExc(@" Delete FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BorderMode_ID"].ToString()); #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_TextStyle_ID"] != Convert.DBNull) { #region Delete Current ClSqlCmd.CommandExc(@" Delete FROM [dbo].[__StandardEngine_T_TextStyle] where [TextStyle_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_TextStyle_ID"].ToString()); #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_TextStyle_ID"] != Convert.DBNull) { #region Delete Current ClSqlCmd.CommandExc(@" Delete FROM [dbo].[__StandardEngine_T_TextStyle] where [TextStyle_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_TextStyle_ID"].ToString()); #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BackGround_ID"] != Convert.DBNull) { #region Delete Current ClSqlCmd.CommandExc(@" Delete FROM [dbo].[__StandardEngine_T_BackGround] where [BackGround_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Def_BackGround_ID"].ToString()); #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BackGround_ID"] != Convert.DBNull) { #region Delete Current ClSqlCmd.CommandExc(@" Delete FROM [dbo].[__StandardEngine_T_BackGround] where [BackGround_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_Hover_BackGround_ID"].ToString()); #endregion } } #region Variables string str_Def_BorderMode_ID = ""; string str_Def_TextStyle_ID = ""; string str_Def_BackGround_ID = ""; string str_Hover_BorderMode_ID = ""; string str_Hover_TextStyle_ID = ""; string str_Hover_BackGround_ID = ""; string str_BorderMode_ID; string str_TopBorder_Size; string str_RightBorder_Size; string str_BottomBorder_Size; string str_LeftBorder_Size; string str_Padding; string str_BackColor; string str_TopBorder_Color; string str_RightBorder_Color; string str_BottomBorder_Color; string str_LeftBorder_Color; string str_TopBorder_Style; string str_RightBorder_Style; string str_BottomBorder_Style; string str_LeftBorder_Style; string str_Stroke_Style; string str_Stroke_Color; string str_Stroke_Size; string str_Shadow_Padding_Top; string str_Shadow_Padding_Right; string str_Shadow_Padding_Bottom; string str_Shadow_Padding_Left; string str_Shadow_Hor; string str_Shadow_Vor; string str_Shadow_Blur; string str_Shadow_Color; string str_Curve_Radius; string str_TextStyle_ID; string str_ForeColor; //string str_BackColor; string str_FontFamily; string str_FontSize; string str_Align; string str_Bold; string str_Underline; string str_Italic; string str_FontFamily_Outer; string str_BackGround_ID; string str_background_color; string str_background_image; string str_background_repeat; string str_background_position_Hor; string str_background_position_Ver; #endregion //Get template style text string str_Style_Txt = System.IO.File.ReadAllText(Request.MapPath("") + "/../Templates/Menu.css"); str_Style_Txt = str_Style_Txt.Replace("