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_Text_Border_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_FontFamily_Outer.DataSource = DS; ddl_FontFamily_Outer.DataTextField = "Font_Name"; ddl_FontFamily_Outer.DataValueField = "Font_ID"; ddl_FontFamily_Outer.DataBind(); } void GetData() { DataSet DS = ClSqlCmd.DataSetSel(@" SELECT [ModuleStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_BorderMode_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_TextStyle_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("'", "''") + "_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("'", "''") + "_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_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Padding_Top.Value; ddl_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Padding_Right.Value; ddl_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Padding_Bottom.Value; ddl_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Padding_Left.Value; } if (DS_Sub.Tables[0].Rows[0]["TopBorder_Color"] != Convert.DBNull) txt_TopBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Color"] != Convert.DBNull) txt_RightBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Color"] != Convert.DBNull) txt_BottomBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Color"] != Convert.DBNull) txt_LeftBorder_Color.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["TopBorder_Style"] != Convert.DBNull) ddl_TopBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Style"] != Convert.DBNull) ddl_RightBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Style"] != Convert.DBNull) ddl_BottomBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Style"] != Convert.DBNull) ddl_LeftBorder_Style.Value = DS_Sub.Tables[0].Rows[0]["LeftBorder_Style"].ToString(); if (DS_Sub.Tables[0].Rows[0]["TopBorder_Size"] != Convert.DBNull) ddl_TopBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["TopBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["RightBorder_Size"] != Convert.DBNull) ddl_RightBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["RightBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BottomBorder_Size"] != Convert.DBNull) ddl_BottomBorder_Size.Value = DS_Sub.Tables[0].Rows[0]["BottomBorder_Size"].ToString(); if (DS_Sub.Tables[0].Rows[0]["LeftBorder_Size"] != Convert.DBNull) ddl_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_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_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_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_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_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_Shadow_Hor.SelectedValue = "-"; } else { rbl_Shadow_Hor.SelectedValue = ""; } } if (DS_Sub.Tables[0].Rows[0]["Shadow_Vor"] != Convert.DBNull) { ddl_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_Shadow_Ver.SelectedValue = "-"; } else { rbl_Shadow_Ver.SelectedValue = ""; } } if (DS_Sub.Tables[0].Rows[0]["Shadow_Blur"] != Convert.DBNull) ddl_Shadow_Blur.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Blur"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Shadow_Color"] != Convert.DBNull) txt_Shadow_Color.Value = DS_Sub.Tables[0].Rows[0]["Shadow_Color"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Curve_Radius"] != Convert.DBNull) ddl_Curve_Radius.Value = DS_Sub.Tables[0].Rows[0]["Curve_Radius"].ToString(); } #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_TextStyle_ID"] != Convert.DBNull) { #region Get Data DS_Sub = ClSqlCmd.DataSetSel(@" SELECT [ForeColor] ,[BackColor] ,[FontFamily] ,[FontSize] ,[Align] ,[Bold] ,[Underline] ,[Italic] ,[Direction] ,[FontFamily_Outer] FROM [dbo].[__StandardEngine_T_TextStyle] where [TextStyle_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_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_ForeColor.Value = DS_Sub.Tables[0].Rows[0]["ForeColor"].ToString(); if (DS_Sub.Tables[0].Rows[0]["BackColor"] != Convert.DBNull) { txt_BackColor.Value = DS_Sub.Tables[0].Rows[0]["BackColor"].ToString(); cb_BackColor_Trans.Checked = false; } else { txt_BackColor.Value = ""; cb_BackColor_Trans.Checked = true; } if (DS_Sub.Tables[0].Rows[0]["FontFamily"] != Convert.DBNull) ddl_FontFamily.Value = DS_Sub.Tables[0].Rows[0]["FontFamily"].ToString(); if (DS_Sub.Tables[0].Rows[0]["FontSize"] != Convert.DBNull) ddl_FontSize.Value = DS_Sub.Tables[0].Rows[0]["FontSize"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Align"] != Convert.DBNull) ddl_Align.Value = DS_Sub.Tables[0].Rows[0]["Align"].ToString(); if (DS_Sub.Tables[0].Rows[0]["Bold"] != Convert.DBNull) cb_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_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_Italic.Checked = DS_Sub.Tables[0].Rows[0]["Italic"].ToString().ToLower() == "italic" ? true : false; if (DS_Sub.Tables[0].Rows[0]["Direction"] != Convert.DBNull) ddl_Direction.Value = DS_Sub.Tables[0].Rows[0]["Direction"].ToString(); if (DS_Sub.Tables[0].Rows[0]["FontFamily_Outer"] != Convert.DBNull) ddl_FontFamily_Outer.SelectedValue = DS_Sub.Tables[0].Rows[0]["FontFamily_Outer"].ToString(); } #endregion } } } protected void Button1_Click(object sender, EventArgs e) { DataSet DS = ClSqlCmd.DataSetSel(@" SELECT [ModuleStyle_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_BorderMode_ID] ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_TextStyle_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("'", "''") + @"_BorderMode_ID]=NULL ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_TextStyle_ID]=NULL where [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]); #endregion //////////////////////////////////////////////////////////////////// if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_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("'", "''") + "_BorderMode_ID"].ToString()); #endregion } if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_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("'", "''") + "_TextStyle_ID"].ToString()); #endregion } } #region Variables 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_Direction; string str_FontFamily_Outer; #endregion //Get template style text string str_Style_Txt = System.IO.File.ReadAllText(Request.MapPath("") + "/../Templates/TextBorderStyle.css"); str_Style_Txt = str_Style_Txt.Replace("", Request.Params["T"].Trim().Replace("'", "''")); #region Insert _BorderMode_ID str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_Padding_Top.Value + " " + ddl_Padding_Right.Value + " " + ddl_Padding_Bottom.Value + " " + ddl_Padding_Left.Value + "'"; str_BackColor = !cb_BackColor_Trans.Checked ? ("N'" + txt_BackColor.Value + "'") : "NULL"; str_TopBorder_Color = txt_TopBorder_Color.Value != "" ? ("N'" + txt_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_RightBorder_Color.Value != "" ? ("N'" + txt_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_BottomBorder_Color.Value != "" ? ("N'" + txt_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_LeftBorder_Color.Value != "" ? ("N'" + txt_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_Shadow_Hor.SelectedValue + ddl_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_Shadow_Ver.SelectedValue + ddl_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); #region Update style text str_Style_Txt = str_Style_Txt.Replace("", ddl_TopBorder_Style.Value + " " + ddl_TopBorder_Size.Value + " " + txt_TopBorder_Color.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_RightBorder_Style.Value + " " + ddl_RightBorder_Size.Value + " " + txt_RightBorder_Color.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_BottomBorder_Style.Value + " " + ddl_BottomBorder_Size.Value + " " + txt_BottomBorder_Color.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_LeftBorder_Style.Value + " " + ddl_LeftBorder_Size.Value + " " + txt_LeftBorder_Color.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_Padding_Top.Value + " " + ddl_Padding_Right.Value + " " + ddl_Padding_Bottom.Value + " " + ddl_Padding_Left.Value); str_Style_Txt = str_Style_Txt.Replace("", rbl_Shadow_Hor.SelectedValue + ddl_Shadow_Hor.Value); str_Style_Txt = str_Style_Txt.Replace("", rbl_Shadow_Ver.SelectedValue + ddl_Shadow_Ver.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_Shadow_Blur.Value); str_Style_Txt = str_Style_Txt.Replace("", txt_Shadow_Color.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_Curve_Radius.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_Shadow_Padding_Top.Value + " " + ddl_Shadow_Padding_Right.Value + " " + ddl_Shadow_Padding_Bottom.Value + " " + ddl_Shadow_Padding_Left.Value); #endregion #endregion #region Insert _TextStyle_ID str_TextStyle_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_TextStyle()+1").Tables[0].Rows[0][0].ToString(); str_ForeColor = "N'" + txt_ForeColor.Value + "'"; str_BackColor = !cb_BackColor_Trans.Checked ? ("N'" + txt_BackColor.Value + "'") : "NULL"; str_FontFamily = "N'" + ddl_FontFamily.Value + "'"; str_FontSize = "N'" + ddl_FontSize.Value + "'"; str_Align = "N'" + ddl_Align.Value + "'"; str_Bold = cb_Bold.Checked ? "N'bold'" : "N'normal'"; str_Underline = cb_Underline.Checked ? "N'underline'" : "N'none'"; str_Italic = cb_Italic.Checked ? "N'italic'" : "N'normal'"; str_Direction = "N'" + ddl_Direction.Value + "'"; str_FontFamily_Outer = ddl_FontFamily_Outer.SelectedValue != "" ? ddl_FontFamily_Outer.SelectedValue : "NULL"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_TextStyle] ([TextStyle_ID] ,[ForeColor] ,[BackColor] ,[FontFamily] ,[FontSize] ,[Align] ,[Bold] ,[Underline] ,[Italic] ,[Direction] ,[FontFamily_Outer]) VALUES ( " + str_TextStyle_ID + @", " + str_ForeColor + @", " + str_BackColor + @", " + str_FontFamily + @", " + str_FontSize + @", " + str_Align + @", " + str_Bold + @", " + str_Underline + @", " + str_Italic + @", " + str_Direction + @", " + str_FontFamily_Outer + @" )"); #region Update style text str_Style_Txt = str_Style_Txt.Replace("", txt_ForeColor.Value); str_Style_Txt = str_Style_Txt.Replace("", (!cb_BackColor_Trans.Checked ? txt_BackColor.Value : "transparent")); str_Style_Txt = str_Style_Txt.Replace("", (ddl_FontFamily_Outer.SelectedValue != "" ? ("'" + ddl_FontFamily_Outer.SelectedItem.Text + "',") : "") + ddl_FontFamily.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_FontSize.Value); str_Style_Txt = str_Style_Txt.Replace("", cb_Bold.Checked ? "bold" : "normal"); str_Style_Txt = str_Style_Txt.Replace("", cb_Underline.Checked ? "underline" : "none"); str_Style_Txt = str_Style_Txt.Replace("", cb_Italic.Checked ? "italic" : "normal"); str_Style_Txt = str_Style_Txt.Replace("", ddl_Align.Value); str_Style_Txt = str_Style_Txt.Replace("", ddl_Direction.Value); #endregion #endregion #region update current ModuleStyles ClSqlCmd.CommandExc(@" update [dbo].[__StandardEngine_T_ModuleStyles] set [" + Request.Params["T"].Trim().Replace("'", "''") + @"_BorderMode_ID]=" + str_BorderMode_ID + @" ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_TextStyle_ID]=" + str_TextStyle_ID + @" where [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]); #endregion #region write css files System.IO.File.WriteAllText(Request.MapPath("") + "/../CSS/" + Request.Params["T"].Trim().Replace("'", "") + ".css", str_Style_Txt); #endregion /////////////////////////////////////////////////////////////////////// if (Request.Params["retP"] != null && Request.Params["retP"] != "") { Response.Redirect(Server.UrlDecode(Request.Params["retP"])); } } }