public ActionResult Index() { int orgID = int.Parse(DESEncrypt.Decrypt(ViewBag.EnOrgID)); var member = MemberData.GetMember(); if (member != null) { ViewBag.NickName = member.NickName; ViewBag.HeaderImage = member.HeaderImage; } IDictionary <string, object> dict = new Dictionary <string, object>(); dict.Add("OrgID", orgID); dict.Add("DonationID", Constants.DonationID.GDX1); StringBuilder where = new StringBuilder(); where.AppendFormat("OrgID=@OrgID and DonationID=@DonationID and IsPay='1'", orgID, (int)Constants.DonationType.Shop1); IList <decimal> counts = orderBLL.GetCount(where.ToString(), dict); ViewBag.RecordCount = counts[0]; ViewBag.TotalMoney = counts[1]; string url = Request.Url.AbsoluteUri; WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); share.Title = string.Format("{0}在线功德箱", "净名寺"); share.Link = url; share.Image = Request.Url.Scheme + "://" + Request.Url.Authority + "/Content/Org/JMS/logo.jpg"; share.Content = "欢迎转发分享,功德无量"; ViewBag.ShareInfo = share; return(View()); }
public ActionResult Index() { int orgID = int.Parse(DESEncrypt.Decrypt(ViewBag.EnOrgID)); StringBuilder where = new StringBuilder(); where.AppendFormat("orders.OrgID={0} and orders.OrderType={1} and orders.IsPay='1'", orgID, (int)Constants.DonationType.Shop1); IList <decimal> counts = orderBLL.GetCount(where.ToString()); ViewBag.RecordCount = counts[0]; ViewBag.TotalMoney = counts[1]; string url = Request.Url.AbsoluteUri; WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); share.Title = string.Format("{0}广种福田", "净名寺"); share.Link = url; share.Image = Request.Url.Scheme + "://" + Request.Url.Authority + "/Content/Org/JMS/logo.jpg"; share.Content = "欢迎转发分享,功德无量"; ViewBag.ShareInfo = share; var member = MemberData.GetMember(); if (member != null) { ViewBag.NickName = member.NickName; ViewBag.HeaderImage = member.HeaderImage; } //大梁A 9918ac35 - a983 - 40c8 - 822a - 2a71d4866c0f var dla = goodsBLL.GetModel("9918ac35-a983-40c8-822a-2a71d4866c0f"); ViewBag.dla = dla.Balance + dla.Frozen; ViewBag.dlaCount = dla.Amount - dla.Balance - dla.Frozen; //大梁B 3a2a9ebe-9900-4ede-966f-23e343c09445 var dlb = goodsBLL.GetModel("3a2a9ebe-9900-4ede-966f-23e343c09445"); ViewBag.dlb = dlb.Balance + dlb.Frozen; ViewBag.dlbCount = dlb.Amount - dlb.Balance - dlb.Frozen; //副梁A fbc6178f-ba45-4376-b0e1-fe22c36d564b var fla = goodsBLL.GetModel("fbc6178f-ba45-4376-b0e1-fe22c36d564b"); ViewBag.fla = fla.Balance + fla.Frozen; ViewBag.flaCount = fla.Amount - fla.Balance - fla.Frozen; //副梁B e49e5b82-83ce-417d-8591-aa216e195099 var flb = goodsBLL.GetModel("e49e5b82-83ce-417d-8591-aa216e195099"); ViewBag.flb = flb.Balance + flb.Frozen; ViewBag.flbCount = flb.Amount - flb.Balance - flb.Frozen; //佛像 e540dac1-171f-4b75-a852-612de07a9550 var fx = goodsBLL.GetModel("e540dac1-171f-4b75-a852-612de07a9550"); ViewBag.fx = fx.Balance + fx.Frozen; ViewBag.fxCount = fx.Amount - fx.Balance - fx.Frozen; return(View()); }
public JsonResult SignShared(string url) { WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); JavaScriptSerializer a = new JavaScriptSerializer(); return(GetSucceedResult(new { ShareInfo = share }, null)); }
public ActionResult List() { string url = Request.Url.AbsoluteUri; WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); share.Title = string.Format("{0}日行一善", "净名寺"); share.Link = url; share.Image = Request.Url.Scheme + "://" + Request.Url.Authority + "/Content/Org/JMS/logo.jpg"; share.Content = "欢迎转发分享,功德无量"; ViewBag.ShareInfo = share; return(View()); }
public ActionResult Order(string id) { Model.TD_Donation_Info model = donationBLL.GetModel(id); string url = Request.Url.AbsoluteUri; WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); share.Title = string.Format("{0}项目捐款", "净名寺"); share.Link = url; share.Image = Request.Url.Scheme + "://" + Request.Url.Authority + "/Content/Org/JMS/logo.jpg"; share.Content = "欢迎转发分享,功德无量"; ViewBag.ShareInfo = share; return(View(model)); }
public ActionResult Detail(string m) { decimal money = 0; if (m == "r") { Random random = new Random(); int r1 = random.Next(1, 100); if (r1 % 10 == 7 || r1 % 10 == 8 || r1 % 10 == 9) { money = r1 + (decimal)0.88; } else { int r2 = random.Next(1, 100); if (r2 > 50) { money = r1 + (decimal)0.68; } else { money = r1 + (decimal)0.66; } } } else { money = decimal.Parse(m); } ViewBag.Money = money; string url = Request.Url.AbsoluteUri; WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); share.Title = string.Format("{0}日行一善", "净名寺"); share.Link = url; share.Image = Request.Url.Scheme + "://" + Request.Url.Authority + "/Content/Org/JMS/logo.jpg"; share.Content = "欢迎转发分享,功德无量"; ViewBag.ShareInfo = share; return(View()); }
public ActionResult Index() { int orgID = int.Parse(DESEncrypt.Decrypt(ViewBag.EnOrgID)); StringBuilder where = new StringBuilder(); where.AppendFormat("orders.OrgID={0} and orders.OrderType={1} and orders.IsPay='1'", orgID, (int)Constants.DonationType.Shop1); IList <decimal> counts = orderBLL.GetCount(where.ToString()); ViewBag.RecordCount = counts[0]; ViewBag.TotalMoney = counts[1]; string url = Request.Url.AbsoluteUri; WeiXinPort port = new WeiXinPort(); port.InitSignature(url); ThirdSharedInfo share = port.GetShareInfo(url); share.Title = string.Format("{0}广种福田", "净名寺"); share.Link = url; share.Image = Request.Url.Scheme + "://" + Request.Url.Authority + "/Content/Org/JMS/logo.jpg"; share.Content = "欢迎转发分享,功德无量"; ViewBag.ShareInfo = share; return(View()); }