protected void save_ok(object sender, EventArgs e) { if (id == "0") { JumboECMS.DBUtility.DbOperEventArgs de = (JumboECMS.DBUtility.DbOperEventArgs)e; id = de.id.ToString(); } doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", id); if (txtImg.Text != "") { doh.AddFieldItem("IsImg", "1"); } else { doh.AddFieldItem("IsImg", "0"); } //初始化第一页 if (this.txtAliasPage.Text.Length == 0) { doh.AddFieldItem("FirstPage", Go2View(this.MainModule.Type, id, 1)); } else { doh.AddFieldItem("FirstPage", this.txtAliasPage.Text); } doh.Update("jcms_module_" + this.MainModule.Type); CreateContentFile(this.MainModule, id, -1); CreateCategoryFile(CategoryId, true); FinalMessage("成功保存", "close.htm", 0); }
protected void save_ok(object sender, EventArgs e) { string setting = this.GroupSet0.SelectedValue + "," + this.GroupSet1.SelectedValue + "," + this.GroupSet2.SelectedValue + "," + this.GroupSet3.Text + "," + this.GroupSet4.SelectedValue + "," + this.GroupSet5.Text + "," + this.GroupSet6.Text + "," + this.GroupSet7.SelectedValue + "," + this.GroupSet8.SelectedValue + "," + this.GroupSet9.SelectedValue + "," + this.GroupSet10.SelectedValue + "," + this.GroupSet11.Text + "," + this.GroupSet12.SelectedValue + "," + this.GroupSet13.SelectedValue + "," + this.GroupSet14.Text + "," + this.GroupSet15.SelectedValue + "," + this.GroupSet16.SelectedValue + "," + this.GroupSet17.Text + ","; if (id == "0") { JumboECMS.DBUtility.DbOperEventArgs de = (JumboECMS.DBUtility.DbOperEventArgs)e; id = de.id.ToString(); } doh.Reset(); doh.ConditionExpress = "id=" + id; doh.AddFieldItem("Setting", setting); doh.Update("jcms_normal_usergroup"); FinalMessage("成功保存", "close.htm", 0); }
protected void add_ok(object sender, EventArgs e) { JumboECMS.DBUtility.DbOperEventArgs de = (JumboECMS.DBUtility.DbOperEventArgs)e; id = de.id.ToString(); string parentCode = string.Empty; string parentTopId = string.Empty; if (this.ddlParentId.SelectedValue != "0") { doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", this.ddlParentId.SelectedValue); object[] value = doh.GetFields(base.CategoryTable, "Code,TopId"); parentCode = value[0].ToString(); parentTopId = value[1].ToString(); } string leftCode = string.Empty; string selfCode = string.Empty; string selfFilePath = string.Empty; doh.Reset(); doh.SqlCmd = "SELECT [code],FilePath FROM [" + base.CategoryTable + "] WHERE left(code," + parentCode.Length + ")='" + parentCode + "' and len(code)=" + Convert.ToString(parentCode.Length + 4) + " ORDER BY code desc"; DataTable dtCategory = doh.GetDataTable(); if (dtCategory.Rows.Count > 0) { leftCode = dtCategory.Rows[0]["code"].ToString(); } if (leftCode.Length > 0) { selfCode = Convert.ToString(Convert.ToInt32(leftCode.Substring(leftCode.Length - 4, 4)) + 1).PadLeft(4, '0'); } else { selfCode = "0001"; } selfCode = parentCode + selfCode; doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", id); doh.AddFieldItem("Code", selfCode); doh.AddFieldItem("TopId", ((selfCode.Length == 8) ? id : parentTopId)); doh.AddFieldItem("LanguageCode", q("lan")); doh.AddFieldItem("TypeId", 3); doh.AddFieldItem("FirstPage", this.txtAliasPage.Text); doh.Update(base.CategoryTable); dtCategory.Clear(); dtCategory.Dispose(); FinalMessage("成功保存", "close.htm", 0); }
protected void save_ok(object sender, EventArgs e) { if (id == "0") { JumboECMS.DBUtility.DbOperEventArgs de = (JumboECMS.DBUtility.DbOperEventArgs)e; id = de.id.ToString(); doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", id); doh.AddFieldItem("GroupId", 1); doh.Update("jcms_normal_email"); } FinalMessage("成功保存", "close.htm", 0); }
protected void save_ok(object sender, EventArgs e) { if (id == "0") { JumboECMS.DBUtility.DbOperEventArgs de = (JumboECMS.DBUtility.DbOperEventArgs)e; id = de.id.ToString(); } doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", id); if (txtImg.Text != "") { doh.AddFieldItem("Style", "1"); } else { doh.AddFieldItem("Style", "0"); } doh.Update("jcms_normal_link"); FinalMessage("链接成功保存", site.Dir + "admin/close.htm", 0); }
protected void save_ok(object sender, EventArgs e) { if (id == "0") { JumboECMS.DBUtility.DbOperEventArgs de = (JumboECMS.DBUtility.DbOperEventArgs)e; id = de.id.ToString(); } string _To = this.txtToAddress.Text; string _Title = "邮箱配置测试邮件(请删)"; string _Body = "邮件测试!<br>" + site.Name1 + "成功配置了系统邮箱!!!<br>" + "<a href=\"" + site.Url + site.Dir + "\" target=\"_blank\">" + site.Name1 + "</a>"; string _MailFromAddress = this.txtFromAddress.Text; string _MailFromName = this.txtFromName.Text; string _MailFromPwd = this.txtFromPwd.Text; string _MailSmtpHost = this.txtSmtpHost.Text; if (JumboECMS.Common.MailHelp.SendOK(_To, _Title, _Body, true, _MailFromAddress, _MailFromName, _MailFromPwd, _MailSmtpHost)) { doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", id); doh.AddFieldItem("Enabled", 1); doh.Update("jcms_normal_emailserver"); new JumboECMS.DAL.Normal_UserMailDAL().ExportEmailServer(); FinalMessage("成功保存", "close.htm", 0); } else { doh.Reset(); doh.ConditionExpress = "id=@id"; doh.AddConditionParameter("@id", id); doh.AddFieldItem("Enabled", 0); doh.Update("jcms_normal_emailserver"); FinalMessage("配置有误:具体请查看<a href='" + site.Dir + "_data/log/mailerror_" + DateTime.Now.ToString("yyyyMMdd") + ".txt' target='_blank'>日志文件</a>。", "close.htm", 0, 30); } }