//保存 protected void btnSave_Click(object sender, EventArgs e) { int tId = MyCommFun.Str2Int(txtSelectTemplateId.Text); int erjiTId = MyCommFun.Str2Int(txtSelectErJiTemplateId.Text); //二级页面模版 int liebiaoTId = MyCommFun.Str2Int(txtSelectLieBiaoTemplateId.Text); //列表页面模版 int detailTId = MyCommFun.Str2Int(txtSelectDetailTemplateId.Text); //详情页面模版 int colorId = MyCommFun.Str2Int(txtSelectColorId.Text); if (tId != 0) { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_templates_wcode tw = new Model.wx_templates_wcode(); bool isAdd = true; bool Succ = false; if (hidWTId.Value != "0") { int wtId = MyCommFun.Str2Int(hidWTId.Value); tw = twBll.GetModel(wtId); if (tw != null) { isAdd = false; } } tw.wid = weixin.id; tw.tid = tId; tw.channelTid = erjiTId; tw.listTid = liebiaoTId; tw.detailTid = detailTId; tw.createDate = DateTime.Now; //颜色 string colorContent = mBll.getValuestr(colorId); tw.topcolorTypeId = colorId; tw.topcolorHtml = colorContent; if (isAdd) { int id = twBll.Add(tw); if (id > 0) { Succ = true; } hidWTId.Value = id.ToString(); } else { Succ = twBll.Update(tw); } if (Succ) { JscriptMsg("模版设置成功!", "template_list.aspx", "Success"); } else { JscriptMsg("模版设置失败!", "", "Error"); } } }
//保存 protected void btnSave_Click(object sender, EventArgs e) { int tId = MyCommFun.Str2Int(txtSelectTemplateId.Text); int erjiTId = MyCommFun.Str2Int(txtSelectErJiTemplateId.Text);//二级页面模版 int colorId = MyCommFun.Str2Int(txtSelectColorId.Text); if (tId != 0) { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_templates_wcode tw = new Model.wx_templates_wcode(); bool isAdd = true; bool Succ = false; if (hidWTId.Value != "0") { int wtId = MyCommFun.Str2Int(hidWTId.Value); tw = twBll.GetModel(wtId); if (tw != null) { isAdd = false; } } tw.wid = weixin.id; tw.tid = tId; tw.channelTid = erjiTId; tw.createDate = DateTime.Now; //颜色 string colorContent = mBll.getValuestr(colorId); tw.topcolorTypeId = colorId; tw.topcolorHtml = colorContent; if (isAdd) { int id= twBll.Add(tw); if (id > 0) { Succ = true; } hidWTId.Value = id.ToString(); } else { Succ= twBll.Update(tw); } if (Succ) { JscriptMsg("模版设置成功!", "template_list.aspx", "Success"); } else { JscriptMsg("模版设置失败!", "", "Error"); } } }
//保存 protected void btnSave_Click(object sender, EventArgs e) { int bmenuTid = MyCommFun.Str2Int(txtSelectTemplateId.Text); if (bmenuTid != 0) { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_templates_wcode tw = new Model.wx_templates_wcode(); bool isAdd = true; bool Succ = false; if (hidWTId.Value != "0") { int wtId = MyCommFun.Str2Int(hidWTId.Value); tw = twBll.GetModel(wtId); if (tw != null) { isAdd = false; } } tw.wid = weixin.id; tw.bmenuTid = bmenuTid; if (isAdd) { tw.createDate = DateTime.Now; int id = twBll.Add(tw); if (id > 0) { Succ = true; } hidWTId.Value = id.ToString(); } else { Succ = twBll.Update(tw); } if (Succ) { JscriptMsg("底部菜单风格设置成功!", "template_bottom_list.aspx", "Success"); } else { JscriptMsg("底部菜单风格设置失败!", "", "Error"); } } }