Beispiel #1
0
        protected void LoadData()
        {
            Guid userid = WebUserAuth.UserId.Value;

            if (userid != Guid.Empty && TransterId != Guid.Empty)
            {
                int          count = 0;
                SubscribeBLL bll   = new SubscribeBLL();
                mTransferRecord = bll.GetTransferRecord(TransterId, 1, 8, out count);

                double divide = count / 8;
                double floor  = System.Math.Floor(divide);
                if (count % GlobalUtils.PageSize != 0)
                {
                    floor++;
                }
                pageCount = Convert.ToInt32(floor);//总页数
                DateTime EndTransferDate = DateTime.Parse(mTransferRecord.AddDate.ToString("yyyy-MM-dd") + " 23:59:59");
                if (DateTime.Now > EndTransferDate)
                {
                    this.LastSecond = 0;
                }
                else
                {
                    this.LastSecond = Convert.ToInt32((EndTransferDate - DateTime.Now).TotalSeconds);
                }
            }
        }
Beispiel #2
0
        //获取转让详情数据
        public void GetZQZRTransferRecord()
        {
            int  pageSize   = 8;
            int  pageIndex  = Tool.SafeConvert.ToInt32(Context.Request.Form["pageIndex"], 1);
            Guid transferId = WEBRequest.GetFormGuid("transferId");
            Guid userid     = WebUserAuth.UserId.HasValue ? WebUserAuth.UserId.Value : Guid.Empty;

            if (userid == Guid.Empty)
            {
                PrintJson("0", "您还未登录!");
                return;
            }
            SubscribeBLL   bll             = new SubscribeBLL();
            int            recordCount     = 0;
            int            index           = 1;
            TransferRecord mTransferRecord = bll.GetTransferRecord(transferId, pageIndex, pageSize, out recordCount);
            StringBuilder  sb = new StringBuilder();

            sb.Append("{\"result\":\"1\",\"list\":[");
            foreach (var temp in mTransferRecord.listTranster)
            {
                sb.Append("{\"NickName\":\"" + BusinessDll.StringHandler.MaskStartPre(temp.UserName, 1) + "\",\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount) +
                          "\",\"TotalShares\":\"" + temp.TotalShares +
                          "\",\"ContractNo\":\"" + temp.ContractNo
                          );
                if (index == mTransferRecord.listTranster.Count())
                {
                    sb.Append("\"}]}");
                }
                else
                {
                    sb.Append("\"},");
                }
                index++;
            }
            this.Context.Response.Write(sb.ToString());
            this.Context.Response.End();
        }