Пример #1
0
 /// <summary>
 /// Updates the status indicator.
 /// </summary>
 public void UpdateStatus()
 {
     using (ToolDialog td = new ToolDialog(Tool, ModelElements))
     {
         ToolStatus = td.ToolStatus;
     }
 }
Пример #2
0
        protected string GetNextReturnMoneyDay(Guid userId)
        {
            string sql  = @"SELECT TOP 1  Convert (VARCHAR(10),CycDate,120) AS CycDate,
                        SUM(ISNULL(Amount,0)+ISNULL(InterestAmout,0)+ISNULL(TuandaiRedPacket,0) +ISNULL(PublisherRedPacket,0) ) AS TotalAmount FROM (
                        SELECT  sd.CycDate,
                        CASE WHEN sd.InvestType IN(3,2) THEN 0 ELSE  sd.Amount END AS Amount,
                        CASE WHEN   sd.InvestType = 3 THEN 0 ELSE sd.InterestAmout END AS InterestAmout, 
                        CASE WHEN   sd.InvestType = 3 THEN 0 ELSE ISNULL(sd.TuandaiRedPacket,0) END AS TuandaiRedPacket, 
                        CASE WHEN   sd.InvestType = 3 THEN 0 ELSE ISNULL(sd.PublisherRedPacket,0) END AS PublisherRedPacket  
                        FROM dbo.SubscribeDetail sd with(nolock) 
                        WHERE isnull(sd.InvestType,0)!=1 and sd.SubscribeUserId=@UserId  and sd.CycDate>getdate()
                         union all
                         select we.CycDate, we.Amount, we.InterestAmount,we.TuanDaiRedPacket, we.PublisherRedPacket  from dbo.We_OrderDetail we
                         where  we.IsHandle=0 and we.UserId=@UserId and we.CycDate>getdate() )a 
                        GROUP BY Convert (VARCHAR(10),CycDate,120) 
                           having sum(isnull(Amount, 0) + isnull(InterestAmout, 0)+ isnull(TuandaiRedPacket, 0) + isnull(PublisherRedPacket, 0))>0  
                        ORDER BY CycDate ASC";
            var    para = new Dapper.DynamicParameters();

            para.Add("@UserId", userId);

            var item = PublicConn.QuerySingle <NextReturnMoneyDay>(sql, ref para);

            if (item != null)
            {
                return("<span>" + item.CycDate.ToString("yyyy-MM-dd") + "<b>" + ToolStatus.ConvertLowerMoney(item.TotalAmount) + "</b>元</span>");
            }
            else
            {
                return("<span>无回款日</span>");
            }
        }
Пример #3
0
        /// <summary>
        /// 获取利率范围
        /// </summary>
        /// <param name="beginRate"></param>
        /// <param name="endRate"></param>
        /// <returns></returns>
        public string getRateRank(object beginRate, object endRate)
        {
            string strBegin = "";
            string strEnd   = "";

            if (beginRate == null || string.IsNullOrWhiteSpace(beginRate.ToString()))
            {
                strBegin = "";
            }
            else
            {
                strBegin = ToolStatus.DeleteZero(beginRate);
            }
            if (endRate == null || string.IsNullOrWhiteSpace(endRate.ToString()))
            {
                strEnd = "";
            }
            else
            {
                strEnd = ToolStatus.DeleteZero(endRate);
            }
            if (strEnd == "" && strBegin == "")
            {
                return("不限");
            }
            else if (strBegin == "" || strEnd == "")
            {
                return(strBegin == "" ? strEnd + "%" : strBegin + "%");
            }
            else
            {
                return(strBegin + "% - " + strEnd + "%");
            }
        }
Пример #4
0
        private void GetContractInfo(string key)
        {
            string contactno = this.key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }
            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //基本信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);         //标信息
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);

            var Params = new Dapper.DynamicParameters();

            Params.Add("@ProjectId", proModel.Id);
            string selSQL = @"select * from fq_ItemSetsProject with(nolock) where ProjectId=@ProjectId";

            itemProjectInfo = PublicConn.QuerySingle <Fq_ItemSetsProjectInfo>(selSQL, ref Params);

            RepaymentTypeDesc = ToolStatus.ConvertRepaymentType(proModel.RepaymentType.Value);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.itemProjectInfo.RealName     = StringHandler.MaskStartPre(itemProjectInfo.RealName, 1); //借款人
                this.itemProjectInfo.IdentityCard = StringHandler.MaskCardNo(itemProjectInfo.IdentityCard);  //出借人身份证号
            }

            UserEnterpriseInfo userEnterprise = new Common.Contract().GetBorrowerGuaranteeEnterprise(proModel.UserId.Value, proModel.AddDate.Value, proModel.Type.Value);

            if (userEnterprise != null)
            {
                assureModel = new Common.Contract().GetAssureOrganizationByUserId(userEnterprise.UserId);
            }
            else
            {
                int gid = 0;
                int.TryParse(proModel.Guarantors, out gid);
                assureModel = new Common.Contract().GetAssureOrganizationById(gid);
                if (gid == 1 && DateTime.Now < DateTime.Parse("2013-11-27"))
                {
                    assureModel.FullName = "东莞市俊特团贷网络信息服务有限公司";
                }
            }

            //印章小图片
            if (assureModel != null)
            {
                this.assureModel.image = this.GetSmallImage(this.assureModel.image);
            }
        }
Пример #5
0
        protected string GetWePlanYearRate(WeProductDetailInfo item)
        {
            string formatStr = "<p class=\"c-ff881f {1}\">{0}<span class='c-ff881f f18px'>%</span></p>";
            string fontSize  = "f60px";

            if (item.ProductName.ToUpper().Contains("计划D") || item.ProductName.ToUpper().Contains("计划E") || item.ProductName.ToUpper().Contains("计划F"))
            {
                fontSize = "f30px";
            }

            string yearRate = "";

            if (item.MinYearRate > 0 && !item.IsWeFQB)
            {
                yearRate = ToolStatus.DeleteZero(item.MinYearRate) + "-";
            }
            yearRate += ToolStatus.DeleteZero(item.YearRate);
            if (item.ProductName.ToUpper().IndexOf("计划D") > -1 || item.ProductName.ToUpper().IndexOf("计划E") > -1)
            {
                yearRate += "+X";
            }
            if (yearRate.IndexOf("+") != -1 || yearRate.IndexOf("-") != -1)
            {
                return(string.Format(formatStr, yearRate, fontSize));
            }
            else
            {
                return(string.Format(formatStr, ToolStatus.DeleteZero(decimal.Parse(yearRate.Trim())), HasFloatDigt(decimal.Parse(yearRate)) ? "f50px" : "f60px"));
            }
        }
Пример #6
0
        /// <summary>
        /// We返现标签
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        protected string ShowWePubCach(WeProductDetailInfo model)
        {
            string pic = "";

            //发标时就设置返现
            if ((model.TuandaiCashRate ?? 0) > 0)
            {
                WebSettingBLL  webSettingBll = new WebSettingBLL();
                WebSettingInfo AllWeCachSet  = webSettingBll.GetWebSettingInfo("421DBE8C-6435-4A9A-852A-EC51F0B0DDA8");

                string cashFormat = AllWeCachSet.Param2Value;
                if ((model.CashLimitAmount ?? 0) > 0)
                {
                    cashFormat = AllWeCachSet.Param1Value;
                }
                if (cashFormat.ToText() == "")
                {
                    cashFormat = ((model.CashLimitAmount ?? 0) > 0 ? "起投{Amount}元," : "") + "返现{Rate}%";
                }
                decimal limitAmount    = model.CashLimitAmount ?? 0;
                string  strLimitAmount = limitAmount >= 10000 ? ToolStatus.DeleteZero(limitAmount / 10000) + "万" : ToolStatus.DeleteZero(limitAmount / 1000) + "千";
                pic += "<div class=\"rect_r f11px c-ffffff text-center\" style=\"width: auto;padding: 0px 10px;\">" + cashFormat.Replace("{Rate}", ToolStatus.DeleteZero(model.TuandaiCashRate)).Replace("{Amount}", strLimitAmount) + "</div>";
            }
            return(pic);
        }
Пример #7
0
        //获取充值记录分页数据
        public void GetRechageShowList()
        {
            int pagesize  = 15;
            int pageindex = Tool.SafeConvert.ToInt32(HttpContext.Current.Request.Form["pageIndex"], 1);

            if (pageindex < 1)
            {
                pageindex = 1;
            }
            Guid userId = WebUserAuth.UserId.Value;

            if (userId == null || userId == Guid.Empty)
            {
                PrintJson("0", "还未登录");
                return;
            }

            int                      status     = Tool.WEBRequest.GetFormInt("status", 0);
            StringBuilder            sb         = new StringBuilder();
            int                      totalcount = 0;
            ProjectBLL               bll        = new ProjectBLL();
            IList <WXAccountRechare> list       = bll.WXGetUserAccountRechare(status, userId, pagesize, pageindex, out totalcount);
            double                   divide     = totalcount / pagesize;
            double                   floor      = System.Math.Floor(divide);

            if (totalcount % pagesize != 0)
            {
                floor++;
            }
            int pageCount = Convert.ToInt32(floor);//总页数

            if (list != null && list.Count() > 0)
            {
                int index = 1;
                sb.Append("{\"result\":\"1\",\"pagecount\":\"" + pageCount + "\",\"list\":[");
                foreach (WXAccountRechare temp in list)
                {
                    sb.Append("{\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount) + "\",\"AddDate\":\"" + (temp.AddDate.ToString("yyyy-MM-dd HH:mm")) +
                              "\",\"StatusStr\":\"" + GetStatusIcon(temp.Status) +
                              "\",\"DeviceType\":\"" + GetDeviceType(temp.From ?? 1));

                    if (index == list.Count())
                    {
                        sb.Append("\"}]}");
                    }
                    else
                    {
                        sb.Append("\"},");
                    }
                    index++;
                }
            }
            else
            {
                sb.Append("{\"result\":\"0\",\"pagecount\":\"0\"}");
            }
            this.Context.Response.Write(sb.ToString());
            this.Context.Response.End();
        }
Пример #8
0
        protected string GetMonthExitRate(int month)
        {
            WeProductFTBRateInfo rateInfo = FTBRateList.Where(p => p.MonthType == month).FirstOrDefault();

            if (rateInfo != null)
            {
                return(ToolStatus.DeleteZero(rateInfo.YearRate) + "%");
            }
            return("0%");
        }
Пример #9
0
        //加息金额
        protected string GetPlusRateMoney()
        {
            decimal plusAmount = (subscribeInfo.TuandaiRedPacket ?? 0) + (subscribeInfo.PublisherRedPacket ?? 0);

            if (plusAmount > 0)
            {
                return(string.Format("<span class=\"f23px c-fd6040\">+ {0}</span>", ToolStatus.ConvertLowerMoney(plusAmount)));
            }
            return("");
        }
Пример #10
0
        //加息利率显示
        protected string GetProjectPlusRate()
        {
            decimal plusRate = subscribeInfo.AddInterestRate ?? 0;   //(projectInfo.TuandaiRate ?? 0) + (projectInfo.PublisherRate ?? 0);

            if (plusRate > 0)
            {
                return(string.Format("<span class=\"rect_o pos-a\">加息{0}%</span>", ToolStatus.DeleteZero(plusRate)));
            }
            return("");
        }
 private static void redrawMap(ToolStatus __state)
 {
     if (__state.m_lineCurrent > 0 || (Singleton <TransportManager> .instance.m_lines.m_buffer[TLMController.instance.CurrentSelectedId].m_flags & TransportLine.Flags.Complete) == TransportLine.Flags.None)
     {
         TLMController.instance.setCurrentSelectedId(__state.m_lineCurrent);
         if (__state.m_lineCurrent > 0 && TLMConfigWarehouse.getCurrentConfigBool(TLMConfigWarehouse.ConfigIndex.AUTO_COLOR_ENABLED))
         {
             TLMController.instance.AutoColor(__state.m_lineCurrent, true, true);
         }
     }
 }
Пример #12
0
 protected string GetYearRate(WXProjectListInfo temp)
 {
     if (temp.TypeId == 18 || temp.TypeId == 23)
     {
         return(string.Format("{0}", temp.ProfitTypeId == 1 ? ToolStatus.DeleteZero(temp.PreProfitRate_S) + "~" + ToolStatus.DeleteZero(temp.PreProfitRate_E) : ToolStatus.DeleteZero(temp.PreProfitRate_S)));
     }
     else
     {
         return(ToolStatus.DeleteZero(temp.YearRate ?? 0));
     }
 }
Пример #13
0
        /// <summary>
        /// 剩余金额
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public string GetLostMoneyString(WeProductDetailInfo model)
        {
            decimal amount = ((model.TotalQty ?? 0) - (model.OrderQty ?? 0)) * (model.UnitAmount ?? 0);

            if (amount > 10000)
            {
                return(ToolStatus.ConvertLowerMoney(amount / 10000) + "万");
            }
            else
            {
                return(ToolStatus.ConvertLowerMoney(amount) + "元");
            }
        }
Пример #14
0
        public string GetWePlanYearRate(WeProductDetailInfo item)
        {
            string formatStr  = "{0}<span style='font-size:14px;'>{1}%</span>";
            string yearRate   = ToolStatus.DeleteZero(item.YearRate);
            string addRateStr = "";

            //1218当天标识
            if (DateTime.Parse(preSellSet.Param1Value) <= item.StartDate && item.StartDate < DateTime.Parse(curSellSet.Param2Value) && item.IsPreSell)
            {
                addRateStr = "+至少1.5";
            }
            return(string.Format(formatStr, CommUtils.GetFloatDivideStr(decimal.Parse(yearRate), 1), CommUtils.GetFloatDivideStr(decimal.Parse(yearRate), 2) + addRateStr));
        }
Пример #15
0
        protected int IsRegHasOneMonth = 1;                    //注册是否满一个月

        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("/pages/downloadGuide.aspx", true);
            if (!this.IsPostBack)
            {
                var userId = WebUserAuth.UserId.Value;
                if (userId != null && userId != Guid.Empty)
                {
                    GetIsProjectFreePaidUser(userId);
                    GetUserVipMsg(userId);

                    var userBll = new UserBLL();
                    var user    = userBll.GetUserBasicInfoModelById(userId);
                    //2016.5.4号注册的加条件: 注册满1个月才能发资产标,即1个月零1天才能发资产标,一个月以内进入发标页面后弹框提示“您好,注册满一个月后才能发布资产标”
                    if (user.AddDate >= DateTime.Parse("2016-05-04 12:00"))
                    {
                        IsRegHasOneMonth = user.AddDate.Value.AddMonths(1) < DateTime.Now ? 1 : 0;
                    }
                    this.options = new List <Tuple <int, decimal, decimal, int, string> >();
                    var result1 = WXInvest.CheckNetIssueConditions(userId);
                    if (result1.Success)
                    {
                        var fund    = userBll.GetUserFundAccountInfo(userId);
                        var setting = WXInvest.GetJingSetting();
                        tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0);
                        creditAmount   = WXInvest.GetUserJingAvailableAmount(user, fund, setting, out maxDeadline);

                        string text = string.Format("资产标(借款额度{0}元)", ToolStatus.ConvertLowerMoney(creditAmount));
                        this.options.Add(new Tuple <int, decimal, decimal, int, string>(6, creditAmount, tuandaiFeeRate, maxDeadline, text));
                        this.deadLineDesc = string.Format("还款期限最高{0}个月", maxDeadline);
                    }

                    //资产标短期标配置
                    WebSettingBLL  setbll      = new WebSettingBLL();
                    WebSettingInfo deadlineDay = setbll.GetWebSettingInfo("78A758ED-6D5C-4991-A804-6601E50960AD");
                    minDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param1Value, 15);
                    maxDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param2Value, 29);
                    endDeadlineDay = deadlineDay.Param3Value.ToDateTime(DateTime.MaxValue);
                    //var result2 = WXInvest.CheckStockIssueConditions(userId);
                    //if (result2.Success)
                    //{
                    //    var setting = WXInvest.GetStockSetting();
                    //    var tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0);
                    //    var amount = user.aviCreditGrantingAmount ?? 0;
                    //    var text = string.Format("资产标-综合授信(授信额度{0}元)", ToolStatus.ConvertLowerMoney(amount));
                    //    this.options.Add(new Tuple<int, decimal, decimal, int, string>(7, amount, tuandaiFeeRate, 24, text));
                    //    if (!result1.Success) this.deadLineDesc = string.Format("还款期限最高{0}个月", 24);
                    //}
                }
            }
        }
Пример #16
0
        public string GetYearRate(decimal rate)
        {
            string formatStr = "<span class='f22px c-f77b00'>{0}</span>{1}%";
            string yearRate  = "";

            yearRate += ToolStatus.DeleteZero(rate);
            if (yearRate.IndexOf(".") > -1)
            {
                return(string.Format(formatStr, CommUtils.GetFloatDivideStr(decimal.Parse(yearRate), 1), CommUtils.GetFloatDivideStr(decimal.Parse(yearRate), 2)));
            }
            else
            {
                return(string.Format(formatStr, yearRate, ""));
            }
        }
Пример #17
0
        /// <summary>
        /// 加息标签
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        protected string ShowWeRank(WeProductDetailInfo model)
        {
            string pic = "";

            if ((model.TuandaiRedRate ?? 0) > 0)
            {
                if (string.IsNullOrEmpty(model.TuanDaiRedTitle))
                {
                    model.TuanDaiRedTitle = "加息";
                }
                pic = "<div class=\"item_r1\">" + model.TuanDaiRedTitle + ToolStatus.DeleteZero(model.TuandaiRedRate) + "%</div>";
            }

            return(pic);
        }
 private static void OnToolGUIPos(ref TransportTool __instance, ref Event e)
 {
     if (e.type == EventType.MouseUp && !isInsideUI)
     {
         TLMUtils.doLog("OnToolGUIPostTransportTool");
         ToolStatus currentState = new ToolStatus();
         TLMUtils.doLog("__state => {0} | tt_mode=> {1} | tt_lineCurrent => {2}", currentState, tt_mode, tt_lineCurrent);
         currentState.m_mode        = (Mode)tt_mode.GetValue(__instance);
         currentState.m_lineCurrent = (ushort)tt_lineCurrent.GetValue(__instance);
         currentState.m_lineTemp    = (ushort)tt_lineTemp.GetValue(__instance);
         TLMUtils.doLog("__state = {0} => {1}, newMode = {2}", lastState, currentState, currentState.m_mode);
         lastState = currentState;
         redrawMap(currentState);
         frameCountRedraw = 99;
         resetLength();
     }
 }
Пример #19
0
        /// <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();
        }
Пример #20
0
        /// <summary>
        /// 获取新手标限制金额
        /// </summary>
        private void GetLimitInvestMoney()
        {
            string sql  = "SELECT Param1Value FROM WebSetting with(nolock) where id='FC5BAE60-716E-4344-9C10-F1E808064FC7'";
            var    para = new Dapper.DynamicParameters();

            limitInvest = PublicConn.QuerySingle <decimal>(sql, ref para);
            if (limitInvest >= 10000)
            {
                limitInvestStr = ToolStatus.DeleteZero(Math.Floor(limitInvest / 10000)) + "万";
            }
            else if (limitInvest >= 1000 && limitInvest < 10000)
            {
                limitInvestStr = ToolStatus.DeleteZero(Math.Floor(limitInvest / 1000)) + "千";
            }
            else
            {
                limitInvestStr = Math.Floor(limitInvest).ToString();
            }
        }
Пример #21
0
        public void GetWithDrawalShowList()
        {
            int pagesize  = 15;
            int pageindex = Tool.SafeConvert.ToInt32(HttpContext.Current.Request.Form["pageIndex"], 1);
            int status    = Tool.SafeConvert.ToInt32(HttpContext.Current.Request.Form["status"], -1);

            if (pageindex < 1)
            {
                pageindex = 1;
            }

            StringBuilder             sb         = new StringBuilder();
            int                       totalcount = 0;
            ProjectBLL                bll        = new ProjectBLL();
            IList <WXAppWithdrewFund> list       = bll.WXGetUserWithdrewFund(WebUserAuth.UserId.Value, pagesize, pageindex, status, out totalcount);

            if (list != null && list.Count() > 0)
            {
                int index = 1;
                sb.Append("{\"result\":\"1\",\"totalcount\":\"" + totalcount + "\",\"list\":[");
                foreach (WXAppWithdrewFund temp in list)
                {
                    sb.Append("{\"Amount\":\"" + ToolStatus.ConvertLowerMoney(temp.Amount ?? 0) + "\",\"AppDate\":\"" + (temp.AppDate.Value.ToString("yyyy-MM-dd HH:mm")) +
                              "\",\"StatusStr\":\"" + this.GetWithdrawStatusIcon(temp.Status ?? 0));
                    if (index == list.Count())
                    {
                        sb.Append("\"}]}");
                    }
                    else
                    {
                        sb.Append("\"},");
                    }
                    index++;
                }
            }
            else
            {
                sb.Append("{\"result\":\"0\",\"totalcount\":\"" + totalcount + "\"}");
            }
            this.Context.Response.Write(sb.ToString());
            this.Context.Response.End();
        }
Пример #22
0
        /// <summary>
        /// 获取新手标限制金额
        /// </summary>
        private void GetLimitInvestMoney()
        {
            WebSettingInfo setInfo = new WebSettingBLL().GetWebSettingInfo("28ED2C47-C151-47AA-9D58-63277C0483C1");

            limitInvest      = decimal.Parse(setInfo.Param1Value);
            limitInvestNum   = setInfo.Param4Value.ToInt(3);
            IsNewHandNewRule = setInfo.Param5Value == "1";
            if (limitInvest >= 10000)
            {
                limitInvestStr = ToolStatus.DeleteZero(Math.Floor(limitInvest / 10000)) + "万";
            }
            else if (limitInvest >= 1000 && limitInvest < 10000)
            {
                limitInvestStr = ToolStatus.DeleteZero(Math.Floor(limitInvest / 1000)) + "千";
            }
            else
            {
                limitInvestStr = Math.Floor(limitInvest).ToString();
            }
        }
Пример #23
0
        //获取利率
        public static string GetProjectYearRate(WXProjectListInfo temp)
        {
            string strFormat = "{0}<span>{1}%</span>";

            if (temp.TypeId == 18 || temp.TypeId == 23)
            {
                if (temp.ProfitTypeId == 1)
                {
                    return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S) + "~" + ToolStatus.DeleteZero(temp.PreProfitRate_E), "", "f21px"));
                }
                else
                {
                    return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S), "", "f27px"));
                }
            }
            else
            {
                return(string.Format(strFormat, CommUtils.GetFloatDivideStr(temp.YearRate ?? 0, 1), CommUtils.GetFloatDivideStr(temp.YearRate ?? 0, 2), "f27px"));
            }
        }
Пример #24
0
 private static void OnToolGUIPos(ref TransportTool __instance, ref Event e)
 {
     if (e.type == EventType.MouseUp && !isInsideUI)
     {
         TLMUtils.doLog("OnToolGUIPostTransportTool");
         ToolStatus currentState = new ToolStatus();
         TLMUtils.doLog("__state => {0} | tt_mode=> {1} | tt_lineCurrent => {2}", currentState, tt_mode, tt_lineCurrent);
         currentState.m_mode        = (Mode)tt_mode.GetValue(__instance);
         currentState.m_lineCurrent = (ushort)tt_lineCurrent.GetValue(__instance);
         currentState.m_lineTemp    = (ushort)tt_lineTemp.GetValue(__instance);
         TLMUtils.doLog("__state = {0} | {1}, newMode = {2}", lastState.m_mode, lastState.m_lineCurrent, currentState.m_mode);
         redrawMap(currentState);
         lastState = currentState;
         resetLength();
     }
     if (TLMController.instance.LineCreationToolbox.isVisible())
     {
         TLMController.instance.LineCreationToolbox.eachFrame();
     }
 }
Пример #25
0
        protected string GetProjectYearRate(WXProjectListInfo temp)
        {
            string strFormat = "<p class=\"c-ff881f {1}\">{0}<span class=\"c-ff881f f18px\">%</span></p>";

            if (temp.TypeId == 18 || temp.TypeId == 23)
            {
                if (temp.ProfitTypeId == 1)
                {
                    return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S) + "~" + ToolStatus.DeleteZero(temp.PreProfitRate_E), "f30px"));
                }
                else
                {
                    return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S), HasFloatDigt(temp.PreProfitRate_S) ? "f50px" : "f60px"));
                }
            }
            else
            {
                return(string.Format(strFormat, ToolStatus.DeleteZero(temp.YearRate), HasFloatDigt(temp.YearRate ?? 0) ? "f50px" : "f60px"));
            }
        }
Пример #26
0
        /// <summary>
        /// 投资,收益
        /// </summary>
        /// <param name="value"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public string GetValue(int value, string type = "0")
        {
            BillInfo Info;

            if (type == "1")
            {
                Info = ReturnList.FirstOrDefault(p => p.ParaValue1 == value);
            }
            else
            {
                Info = InvestList.FirstOrDefault(p => p.ParaValue1 == value);
            }

            if (Info != null)
            {
                return(ToolStatus.ConvertLowerMoney(Info.ParaValue3));
            }
            else
            {
                return("0.00");
            }
        }
Пример #27
0
        protected string GetRepaymentTypeDesc(int repaymentType)
        {
            string repaymentTypeDesc = string.Empty;

            if (repaymentType == 1)
            {
                repaymentTypeDesc = "乙方须借款到期一次性归还全部借款本金及利息";
            }
            else if (repaymentType == 2)
            {
                repaymentTypeDesc = "乙方须每月付息一次,借款到期一次性归还全部借款本金及剩余部分利息";
            }
            else if (repaymentType == 4)
            {
                repaymentTypeDesc = "乙方须出借时支付利息,借款到期一次性归还全部借款本金";
            }
            else
            {
                repaymentTypeDesc = ToolStatus.ConvertRepaymentType(repaymentType);
            }
            return(repaymentTypeDesc);
        }
Пример #28
0
        protected string GetShowAmount(SubscribeInfo item)
        {
            string strResult = "";

            if (item.Amount > 0)
            {
                strResult += "+ ¥" + ToolStatus.ConvertLowerMoney(item.Amount);
            }
            if (item.InterestAmout > 0)
            {
                strResult += "+ ¥" + ToolStatus.ConvertLowerMoney(item.InterestAmout);
            }
            if (item.TuandaiRedPacket > 0 || item.PublisherRedPacket > 0)
            {
                strResult += "+ ¥" + ToolStatus.ConvertLowerMoney(item.TuandaiRedPacket + item.PublisherRedPacket);
            }
            if (strResult.Length > 0)
            {
                strResult = strResult.Substring(2);
            }
            return(strResult);
        }
Пример #29
0
        protected void GetWeAutoString(string projectTypes)
        {
            WeDeadlines = string.Empty;
            string sql = @"SELECT YearRate,Deadline FROM dbo.We_ProductType with(nolock) WHERE Id IN(" + projectTypes + ") order by YearRate";

            var para   = new Dapper.DynamicParameters();
            var weAuto = PublicConn.QueryBySql <SimpleWeAuto>(sql, ref para);

            if (weAuto != null)
            {
                WeMinRate = ToolStatus.DeleteZero(weAuto[0].YearRate);
                foreach (var item in weAuto)
                {
                    if (string.IsNullOrEmpty(WeDeadlines))
                    {
                        WeDeadlines = item.Deadline.ToString();
                    }
                    else
                    {
                        WeDeadlines += "," + item.Deadline.ToString();
                    }
                }
            }
        }
Пример #30
0
 public void finish()
 {
     toolStat = ToolStatus.FINISHED;
     shapeCreator.setToolDisplayStatus(ShapeCreator.ToolDisplayStatus.NORMAL);
 }
Пример #31
0
 /// <summary>
 /// Updates the status indicator
 /// </summary>
 public void updateStatus()
 {
     ToolDialog td = new ToolDialog(_tool, base.ModelElements);
     _toolStatus = td.ToolStatus;
 }