/// <summary> /// 保存设置 /// </summary> void BaoCun() { var info = new Eyousoft_yhq.Model.MYouJi(); string youjiid = Utils.GetFormValue("yid"); string link = Utils.GetFormValue(txtlink.ClientID); info.YouJiTitle = Utils.GetFormValue(txttitle.ClientID); info.ShiPinLink = Utils.GetFormValue(txtlink.ClientID); info.HuiYuanId = HuiYuanInfo.UserID; info.IssueTime = DateTime.Now; info.YouJiType = Eyousoft_yhq.Model.YouJiLeiXing.视频游记; bool bllRetCode = false; if (string.IsNullOrEmpty(youjiid)) { bllRetCode = new Eyousoft_yhq.BLL.BYouJi().Add(info); } else { info.YouJiId = youjiid; bllRetCode = new Eyousoft_yhq.BLL.BYouJi().UpdateModel(info); } if (bllRetCode == true) { Utils.RCWE_AJAX("1", "操作成功"); } else { Utils.RCWE_AJAX("1", "操作失败,请重试"); } }
/// <summary> /// 保存设置 /// </summary> void BaoCun() { var info = new Eyousoft_yhq.Model.MYouJi(); if (info == null) { Utils.RCWE("异常请求"); } info.YouJiId = Utils.GetFormValue("hidyid"); info.YouJiTitle = Utils.GetFormValue("txtTitle"); info.WeiXinMa = Utils.GetFormValue("txtHma"); info.HuiYuanId = HuiYuanInfo.UserID; info.IssueTime = DateTime.Now; //从微信服务器下载图像 string[] txtTuXiangMediaId = Utils.GetFormValues("txtTuXiangMediaId"); string[] txtTuXiangContent = Utils.GetFormValues("MiaoShu"); IList <Eyousoft_yhq.Model.XingCheng> items = new List <Eyousoft_yhq.Model.XingCheng>(); if (txtTuXiangMediaId.Length > 0) { for (int i = 0; i < txtTuXiangMediaId.Length; i++) { var XCModel = new Eyousoft_yhq.Model.XingCheng(); if (txtTuXiangMediaId[i].StartsWith("/ufiles/")) { XCModel.ImgFile = txtTuXiangMediaId[i]; } else { string url = string.Format("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token={0}&media_id={1}", Utils.get_weixin_access_token(), txtTuXiangMediaId[i]); string tuxiang_filename = string.Empty; bool xiaZaiRetCode = EyouSoft.Toolkit.request.weixin_media_xiazai(url, "/ufiles/weixin/", out tuxiang_filename); if (xiaZaiRetCode) { XCModel.ImgFile = tuxiang_filename; } } XCModel.XingChengContent = txtTuXiangContent[i]; items.Add(XCModel); } } info.YouJiContent = items; bool bllRetCode = new Eyousoft_yhq.BLL.BYouJi().UpdateModel(info); if (bllRetCode == true) { Utils.RCWE_AJAX("1", "操作成功"); } else { Utils.RCWE_AJAX("1", "操作失败,请重试"); } }
/// <summary> /// 初始化页面 /// </summary> void init() { string youjiid = Utils.GetQueryStringValue("yid"); var list = new Eyousoft_yhq.BLL.BYouJi().GetModel(youjiid); if (list != null && list.YouJiType == Eyousoft_yhq.Model.YouJiLeiXing.图文游记) { yjTitle = list.YouJiTitle; wxma = list.WeiXinMa; rptYouJis.DataSource = list.YouJiContent; rptYouJis.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { string youjiid = Utils.GetQueryStringValue("YouJiId"); var list = new Eyousoft_yhq.BLL.BYouJi().GetModel(youjiid); if (list != null) { #region 获取会员头像和名称 var info = new Eyousoft_yhq.BLL.Member().GetModel(list.HuiYuanId); if (info != null) { string TuXiangFilepath = info.TuXiangFilepath; if (string.IsNullOrEmpty(TuXiangFilepath)) { TuXiangFilepath = "/images/weixin/head_no.png"; } string FenXiangLianJie = string.Format("<a href=\"http://{0}/huiyuanweixin/mingpian.aspx?mingpianid={1}&eventkey=qrscene_01\"><img src=\"{2}\"></a>", HOST, info.MingPianId, TuXiangFilepath); ltrTouXiang.Text = FenXiangLianJie; ltrMingCheng.Text = info.ContactName; } #endregion LtrTitle.Text = yjtitle = list.YouJiTitle; int rowsCount = 0; var item = new Eyousoft_yhq.BLL.Product().GetList(1, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct() { FavourCode = string.IsNullOrEmpty(list.WeiXinMa) ? "-999" : list.WeiXinMa }); if (item != null && item.Count > 0) { ChanPinLink.Text = "<div style=\"text-align:center; font-size:14px;\"><a href=\"/AppPage/weixin/ProductInfo.aspx?id=" + item[0].ProductID + "&weidianid=" + new Eyousoft_yhq.BLL.BWeiDian().GetWeiDianId(list.HuiYuanId) + "\">[查看相关产品及预定]</a></div>"; } if (list.YouJiContent[0].XingChengContent.Length > 30) { yjdesc = list.YouJiContent[0].XingChengContent.Substring(0, 30); } else { yjdesc = list.YouJiContent[0].XingChengContent; } if (!string.IsNullOrEmpty(list.YouJiContent[0].ImgFile)) { yjimg = list.YouJiContent[0].ImgFile; } rptList.DataSource = list.YouJiContent; rptList.DataBind(); } }
/// <summary> /// 初始化页面 /// </summary> void init() { if (HuiYuanInfo == null || string.IsNullOrEmpty(HuiYuanInfo.UserID)) Response.Redirect("Login.aspx"); var model = new Eyousoft_yhq.BLL.Member().GetModel(HuiYuanInfo.UserID); if (model != null && model.IsLvYouGuWen) { PlaceHolder1.Visible = true; } string yid = Utils.GetQueryStringValue("yid"); var info = new Eyousoft_yhq.BLL.BYouJi().GetModel(yid); if (info == null) return; txttitle.Text = info.YouJiTitle; txtlink.Text = info.ShiPinLink; }
/// <summary> /// 删除游记 /// </summary> void DelYouJi() { string YouJiId = Utils.GetFormValue("youjid"); if (string.IsNullOrEmpty(YouJiId)) Utils.RCWE_AJAX("0", "请选择需要删除的游记"); bool bllRetCode = new Eyousoft_yhq.BLL.BYouJi().Delete(YouJiId); if (bllRetCode) { Utils.RCWE_AJAX("1", "操作成功"); } else { Utils.RCWE_AJAX("0", "操作失败"); } }
/// <summary> /// 保存设置 /// </summary> void BaoCun() { var info = new Eyousoft_yhq.Model.MYouJi(); if (info == null) Utils.RCWE("异常请求"); info.YouJiId = Utils.GetFormValue("hidyid"); info.YouJiTitle = Utils.GetFormValue("txtTitle"); info.WeiXinMa = Utils.GetFormValue("txtHma"); info.HuiYuanId = HuiYuanInfo.UserID; info.IssueTime = DateTime.Now; //从微信服务器下载图像 string[] txtTuXiangMediaId = Utils.GetFormValues("txtTuXiangMediaId"); string[] txtTuXiangContent = Utils.GetFormValues("MiaoShu"); IList<Eyousoft_yhq.Model.XingCheng> items = new List<Eyousoft_yhq.Model.XingCheng>(); if (txtTuXiangMediaId.Length > 0) { for (int i = 0; i < txtTuXiangMediaId.Length; i++) { var XCModel = new Eyousoft_yhq.Model.XingCheng(); if (txtTuXiangMediaId[i].StartsWith("/ufiles/")) { XCModel.ImgFile = txtTuXiangMediaId[i]; } else { string url = string.Format("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token={0}&media_id={1}", Utils.get_weixin_access_token(), txtTuXiangMediaId[i]); string tuxiang_filename = string.Empty; bool xiaZaiRetCode = EyouSoft.Toolkit.request.weixin_media_xiazai(url, "/ufiles/weixin/", out tuxiang_filename); if (xiaZaiRetCode) XCModel.ImgFile = tuxiang_filename; } XCModel.XingChengContent = txtTuXiangContent[i]; items.Add(XCModel); } } info.YouJiContent = items; bool bllRetCode = new Eyousoft_yhq.BLL.BYouJi().UpdateModel(info); if (bllRetCode == true) { Utils.RCWE_AJAX("1", "操作成功"); } else { Utils.RCWE_AJAX("1", "操作失败,请重试"); } }
void BindInte() { Eyousoft_yhq.Model.MYouJiSer YouJiS = new Eyousoft_yhq.Model.MYouJiSer(); YouJiS.YouJiType = Eyousoft_yhq.Model.YouJiLeiXing.图文游记; int count = 0; var list = new Eyousoft_yhq.BLL.BYouJi().GetList(10, 1, ref count, YouJiS); if (list != null && list.Count > 0) { RepList.DataSource = list; RepList.DataBind(); } else { phEmpty.Visible = true; PlaceHolder1.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { string youjiid = Utils.GetQueryStringValue("YouJiId"); var list = new Eyousoft_yhq.BLL.BYouJi().GetModel(youjiid); if (list != null) { #region 获取会员头像和名称 var info = new Eyousoft_yhq.BLL.Member().GetModel(list.HuiYuanId); if (info != null) { string TuXiangFilepath = info.TuXiangFilepath; if (string.IsNullOrEmpty(TuXiangFilepath)) TuXiangFilepath = "/images/weixin/head_no.png"; string FenXiangLianJie = string.Format("<a href=\"http://{0}/huiyuanweixin/mingpian.aspx?mingpianid={1}&eventkey=qrscene_01\"><img src=\"{2}\"></a>", HOST, info.MingPianId, TuXiangFilepath); ltrTouXiang.Text = FenXiangLianJie; ltrMingCheng.Text = info.ContactName; } #endregion LtrTitle.Text = yjtitle = list.YouJiTitle; int rowsCount=0; var item = new Eyousoft_yhq.BLL.Product().GetList(1, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct() { FavourCode = string.IsNullOrEmpty(list.WeiXinMa) ? "-999" : list.WeiXinMa }); if(item!=null && item.Count>0) { ChanPinLink.Text = "<div style=\"text-align:center; font-size:14px;\"><a href=\"/AppPage/weixin/ProductInfo.aspx?id=" + item[0].ProductID + "&weidianid=" + new Eyousoft_yhq.BLL.BWeiDian().GetWeiDianId(list.HuiYuanId) + "\">[查看相关产品及预定]</a></div>"; } if (list.YouJiContent[0].XingChengContent.Length > 30) { yjdesc = list.YouJiContent[0].XingChengContent.Substring(0, 30); } else { yjdesc = list.YouJiContent[0].XingChengContent; } if (!string.IsNullOrEmpty(list.YouJiContent[0].ImgFile)) { yjimg = list.YouJiContent[0].ImgFile; } rptList.DataSource = list.YouJiContent; rptList.DataBind(); } }
/// <summary> /// 删除游记 /// </summary> void DelYouJi() { string YouJiId = Utils.GetFormValue("youjid"); if (string.IsNullOrEmpty(YouJiId)) { Utils.RCWE_AJAX("0", "请选择需要删除的游记"); } bool bllRetCode = new Eyousoft_yhq.BLL.BYouJi().Delete(YouJiId); if (bllRetCode) { Utils.RCWE_AJAX("1", "操作成功"); } else { Utils.RCWE_AJAX("0", "操作失败"); } }
void BindInte() { int PageIndex = Utils.GetInt(Utils.GetQueryStringValue("pageindex")); Eyousoft_yhq.Model.MYouJiSer YouJiS = new Eyousoft_yhq.Model.MYouJiSer(); YouJiS.YouJiType = Eyousoft_yhq.Model.YouJiLeiXing.图文游记; int count = 0; var list = new Eyousoft_yhq.BLL.BYouJi().GetList(10, PageIndex, ref count, YouJiS); if (list != null && list.Count > 0) { if (count > (PageIndex - 1) * 10) { RepList.DataSource = list; } else { RepList.DataSource = null; } RepList.DataBind(); } }
/// <summary> /// 初始化页面 /// </summary> void init() { if (HuiYuanInfo == null || string.IsNullOrEmpty(HuiYuanInfo.UserID)) { Response.Redirect("Login.aspx"); } var model = new Eyousoft_yhq.BLL.Member().GetModel(HuiYuanInfo.UserID); if (model != null && model.IsLvYouGuWen) { PlaceHolder1.Visible = true; } string yid = Utils.GetQueryStringValue("yid"); var info = new Eyousoft_yhq.BLL.BYouJi().GetModel(yid); if (info == null) { return; } txttitle.Text = info.YouJiTitle; txtlink.Text = info.ShiPinLink; }