//获取We计划加入人员 protected void GetWeSubscribelist(Guid projectId) { WeOrderBLL webll = new WeOrderBLL(); int totalcount = GetOrderCount(projectId); List <WeOrderInfo> welist = GetOrderList(projectId, 1, 15); dataList = new List <SubscribeUserInfo>(); if (welist != null && welist.Count > 0) { foreach (WeOrderInfo weInfo in welist) { SubscribeUserInfo subInfo = new SubscribeUserInfo() { UserName = weInfo.UserName, NickName = weInfo.TelNo, OrderDate = weInfo.OrderDate, OrderType = GetWeTenderName(weInfo.DeviceType), Amount = weInfo.Amount ?? 0, IsAuto = false }; dataList.Add(subInfo); } } pageCount = GetPageCount(totalcount); }
private void GetData() { Guid? userId = WebUserAuth.UserId; WeOrderBLL webll = new WeOrderBLL(); model = webll.GetMyInvestWeFQBBaseDetail(userId.Value, weOrderId.Value); feeInfo = webll.GetWeFqbRansomManageFee(weOrderId.Value); if (feeInfo == null) { feeInfo = new WeRansomFeeInfo(); } HoldDayStr = feeInfo.HoldDayStr; }
protected void Page_Load(object sender, EventArgs e) { weOrderId = SafeConvert.ToGuid(WEBRequest.GetQueryString("OrderId")); Guid userid = WebUserAuth.UserId.Value; if (userid == null || userid == Guid.Empty) { Response.Redirect("/user/login.aspx?ReturnUrl=" + Request.Url.AbsolutePath); return; } WeOrderBLL webll = new WeOrderBLL(); model = webll.GetWeOrderInfoById(weOrderId.Value); }
protected void Page_Load(object sender, EventArgs e) { weOrderId = WEBRequest.GetGuid("weorderid"); tab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); if (weOrderId == null || weOrderId == Guid.Empty) { Response.Redirect("/Member/my_account.aspx"); return; } Guid? userId = WebUserAuth.UserId; WeOrderBLL webll = new WeOrderBLL(); model = webll.GetMyInvestWeFQBBaseDetail(userId.Value, weOrderId.Value); GetIsWeZnq(); } }
/// <summary> /// 获取We计划分期宝的投资列表 /// </summary> public void GetWeFQBProjectList() { int pageindex = Tool.SafeConvert.ToInt32(Context.Request.Form["pageIndex"], 1); if (pageindex < 1) { pageindex = 1; } Guid userid = WebUserAuth.UserId.Value; Guid weOrderId = WEBRequest.GetFormGuid("WeOrderId"); StringBuilder sb = new StringBuilder(); WeOrderBLL webll = new WeOrderBLL(); int totalCount = 0; int pagesize = 10; List <SubMyInvestWeDetail_Info> dataList = webll.GetMyInvestWeFQBList(userid, weOrderId, pageindex, pagesize, out totalCount); int pageCount = GetPageCount(totalCount, pagesize); if (dataList.Count() > 0) { int index = 1; sb.Append("{\"result\":\"1\",\"pageCount\":\"" + pageCount + "\",\"list\":["); foreach (SubMyInvestWeDetail_Info model in dataList) { string Title = model.Title.Length > 20 ? model.Title.Substring(0, 20) + "..." : model.Title; sb.Append("{\"Title\":\"" + Title + "\",\"Amount\":\"" + ToolStatus.ConvertLowerMoney(model.Amount) + "\",\"SubscribeId\":\"" + model.InvestId + "\",\"Type\":\"" + model.Type + "\",\"ProjectId\":\"" + model.ProjectId + "\",\"StatusDesc\":\"" + GetWeProjectStatusDesc(model) + "\",\"TotalRecord\":\"" + model.TotalRecord + "\",\"AddDate\":\"" + model.AddDate.ToString("yyyy-MM-dd HH:mm") + "\",\"RemarkMode\":\"" + GetRemarkMode(model.TenderMode, model.IsFromTran ? 1 : 0) + (index == dataList.Count() ? "\"}]}" : "\"},")); index++; } } else { sb.Append("{\"result\":\"0\",\"pageCount\":\"" + pageCount + "\"}"); } this.Context.Response.Write(sb.ToString()); this.Context.Response.End(); }
private void GetData() { Guid? userId = WebUserAuth.UserId; WeOrderBLL webll = new WeOrderBLL(); model = webll.GetMyInvestWeFQBBaseDetail(userId.Value, weOrderId.Value); feeInfo = new WeFTBRansomInfo(); feeInfo.result = 0; var param = new Dapper.DynamicParameters(); param.Add("@OrderId", weOrderId); param.Add("@ApplyAmount", model.AmountInvestment); param.Add("@ExitRate", 0, System.Data.DbType.Decimal, System.Data.ParameterDirection.Output, 18, null, 2); param.Add("@RewardRate", 0, System.Data.DbType.Decimal, System.Data.ParameterDirection.Output, 18, null, 2); param.Add("@HoldMonth", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output); param.Add("@HoldDay", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output); param.Add("@DueInAmount", 0, System.Data.DbType.Decimal, System.Data.ParameterDirection.Output, 18, null, 2); param.Add("@OutStatus", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output); param.Add("@ErrorMsg", 0, System.Data.DbType.String, System.Data.ParameterDirection.Output, 100); int outStatus = 0; TuanDai.DB.TuanDaiDB.Execute(TdConfig.ApplicationName, TdConfig.DBSubscribeWrite, "P_WeFTBAdvanceManageFee", ref param, CommandType.StoredProcedure); outStatus = param.Get <int>("@OutStatus"); if (outStatus == 1) { feeInfo.result = 1; feeInfo.ExitRate = param.Get <decimal?>("@ExitRate") ?? 0; feeInfo.RewardRate = param.Get <decimal?>("@RewardRate") ?? 0; feeInfo.HoldMonth = param.Get <int?>("@HoldMonth") ?? 0; feeInfo.HoldDay = param.Get <int?>("@HoldDay") ?? 0; feeInfo.HoldDayStr = string.Format("{0}月{1}天", feeInfo.HoldMonth, feeInfo.HoldDay); feeInfo.DueInAmount = param.Get <decimal?>("@DueInAmount") ?? 0; feeInfo.msg = param.Get <string>("@ErrorMsg").ToText(); feeInfo.ApplyAmount = model.AmountInvestment; } else { feeInfo.result = outStatus; feeInfo.msg = param.Get <string>("@ErrorMsg").ToText(); } }
protected void Page_Load(object sender, EventArgs e) { weOrderId = WEBRequest.GetGuid("weorderid"); tab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { if (weOrderId == null || weOrderId == Guid.Empty) { Response.Redirect("/Member/my_account.aspx"); return; } Guid? userId = WebUserAuth.UserId; WeOrderBLL webll = new WeOrderBLL(); model = webll.GetMyInvestWeFQBBaseDetail(userId.Value, weOrderId.Value); RewardRate = model.TuandaiRedRate; RewardInterest = GetInterest(model.AmountInvestment, model.Deadline, model.DeadType, RewardRate); DueInterestAmount = model.DueInterestAmount + RewardInterest; } }
//获取提现记录分页数据 public void GetSubscribeUserList() { int pagesize = 15; int pageindex = Tool.SafeConvert.ToInt32(HttpContext.Current.Request.Form["pageIndex"], 1); if (pageindex < 1) { pageindex = 1; } Guid projectId = Tool.SafeHttpWebRequest.GetFormGuid("projectid", Guid.Empty); string projecttype = Tool.WEBRequest.GetString("projecttype"); StringBuilder sb = new StringBuilder(); int totalcount = 0; WeOrderBLL webll = new WeOrderBLL(); List <TuanDai.WXApiWeb.Common.WXSubscribeRecord_Bak> subList = null; //当为We计划时 if (projecttype.ToLower() == "weplan") { totalcount = GetOrderCount(projectId); } else if (projecttype.ToLower() == "zqzr") { //债权转让 totalcount = GetZQZRSubscribeListCount(projectId); } else { subList = TuanDai.WXApiWeb.Common.WXInvest.WXGetSubscribeList(projectId, pagesize, pageindex, out totalcount); } if (totalcount > 0) { int index = 1; sb.Append("{\"result\":\"1\",\"totalcount\":\"" + totalcount + "\",\"list\":["); if (projecttype.ToLower() == "weplan") { #region We计划处理 List <WeOrderInfo> welist = GetOrderList(projectId, pageindex, pagesize); foreach (WeOrderInfo temp in welist) { string tenderMode = TuanDai.WXApiWeb.pages.invest.SubscribeUser.GetWeTenderName(temp.DeviceType); if (index == welist.Count()) { sb.Append("{\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount ?? 0) + "\",\"AddDate\":\"" + (temp.OrderDate.Value.ToString("yyyy-MM-dd HH:mm:ss")) + "\",\"NickName\":\"" + (temp.TelNo == null ? TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringName(temp.UserName) : TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringTelNo(temp.TelNo)) + "\",\"OrderType\":\"" + tenderMode + "\",\"IsAuto\":\"False\"}]}"); } else { sb.Append("{\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount ?? 0) + "\",\"AddDate\":\"" + (temp.OrderDate.Value.ToString("yyyy-MM-dd HH:mm:ss")) + "\",\"NickName\":\"" + (temp.TelNo == null ? TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringName(temp.UserName) : TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringTelNo(temp.TelNo)) + "\",\"OrderType\":\"" + tenderMode + "\",\"IsAuto\":\"False\"},"); } index++; } #endregion } else if (projecttype.ToLower() == "zqzr") { #region List <SubscribeUserInfo> zqSubList = GetZQZRSubscribelist(projectId, pagesize, pageindex); foreach (SubscribeUserInfo temp in zqSubList) { sb.Append("{\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount) + "\",\"AddDate\":\"" + (temp.OrderDate.Value.ToString("yyyy-MM-dd HH:mm:ss")) + "\",\"NickName\":\"" + (temp.NickName == null ? TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringName(temp.UserName) : TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringTelNo(temp.NickName)) + "\",\"OrderType\":\"" + temp.OrderType + "\",\"IsAuto\":\"" + temp.IsAuto); if (index == zqSubList.Count()) { sb.Append("\"}]}"); } else { sb.Append("\"},"); } index++; } #endregion } else { #region //一般的标 foreach (TuanDai.WXApiWeb.Common.WXSubscribeRecord_Bak temp in subList) { string orderType = TuanDai.WXApiWeb.pages.invest.SubscribeUser.GetProjectTenderName(temp.TenderMode); sb.Append("{\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount ?? 0) + "\",\"AddDate\":\"" + (temp.AddDate.Value.ToString("yyyy-MM-dd HH:mm:ss")) + "\",\"NickName\":\"" + (temp.NickName == null ? TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringName(temp.UserName) : TuanDai.WXApiWeb.pages.invest.SubscribeUser.SubStringTelNo(temp.NickName)) + "\",\"OrderType\":\"" + orderType + "\",\"IsAuto\":\"" + temp.IsAuto); if (index == subList.Count()) { sb.Append("\"}]}"); } else { sb.Append("\"},"); } index++; } #endregion } } else { sb.Append("{\"result\":\"0\",\"totalcount\":\"" + totalcount + "\"}"); } this.Context.Response.Write(sb.ToString()); this.Context.Response.End(); }