Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DateTime time = Helper.NowDay();
     DateTime lastTime = new SysSetManager().GetModel().lastTime;
     if (time >= lastTime)
     {
         new SysSetManager().UpdateTime(lastTime.AddDays(1.0));
         new StockPayLogManager().SetAllOk();
         decimal countByTime = new StockPayLogManager().GetCountByTime(lastTime.AddDays(-1.0), lastTime);
         decimal singMoney = new StockPayLogManager().GetSingMoney(lastTime.AddDays(-1.0), lastTime);
         FileStream stream = new FileStream(base.Server.MapPath("~/payStock/data.txt"), FileMode.Append, FileAccess.Write, FileShare.None, 0x1000, true);
         string s = string.Concat(new object[] { "\r\n\r\n", lastTime.Year, "-", lastTime.Month.ToString("D2"), "-", lastTime.Day.ToString("D2"), ";", countByTime.ToString("F0"), ";", singMoney.ToString("F2"), ";" });
         byte[] bytes = Encoding.ASCII.GetBytes(s);
         stream.Write(bytes, 0, bytes.Length);
         stream.Flush();
         stream.Close();
         stream.Dispose();
     }
 }
Example #2
0
 private void GetAllMoneyToShow()
 {
     decimal num = new StockPayLogManager().GetCountBack(this.userName, this.Flat, this.State);
     StringBuilder builder = new StringBuilder();
     builder.Append("<table style='width:65%' ><tr><td>价值总计");
     builder.Append("</td><td>");
     builder.Append(num.ToString("F2"));
     builder.Append("</td><td></table>");
     this.zongJiLb.InnerHtml = builder.ToString();
 }
Example #3
0
 private void GetData()
 {
     UserData model = new UserDataManager().GetModel(this.userName);
     if ((model == null) || !model.isSenhe)
     {
         this.Session["userName"] = null;
         base.Response.Write("<script type='text/javascript'>window.location.href='index.aspx';</script>");
     }
     else
     {
         decimal guPiao = new SysSetManager().GetModel().guPiao;
         int noCountByName = new StockPayLogManager().GetNoCountByName(this.userName);
         this.noPayNumLb.Text = noCountByName.ToString();
         this.payNumLb.Text = model.guPiao.ToString();
         int num3 = model.guPiao + noCountByName;
         this.allNumLb.Text = num3.ToString();
         this.allStockMoneyLb.Text = (num3 * guPiao).ToString("F2");
         this.ficitLb.Text = model.cfMoney.ToString("F2");
         this.overGpLb.Text = model.noMoney.ToString();
         this.OutMoneyList.Items.Clear();
         this.InMoneyList.Items.Clear();
         this.OutMoneyList.Items.Add(new ListItem("最佳现货价格", guPiao.ToString("F2")));
         this.InMoneyList.Items.Add(new ListItem("最佳现货价格", guPiao.ToString("F2")));
         for (int i = 0; i < 40; i++)
         {
             string text = (guPiao + (i * 0.005M)).ToString("F2");
             this.OutMoneyList.Items.Add(new ListItem(text, text));
             this.InMoneyList.Items.Add(new ListItem(text, text));
         }
         this.GetOutList();
         this.GetInList();
     }
 }