Exemplo n.º 1
0
 private void DataShow()
 {
     SysSet model = new SysSetManager().GetModel();
     this.StateList.SelectedValue = model.state ? "1" : "0";
     this.tiXianTx.Text = model.tiXian.ToString("F2");
     this.kouPicTx.Text = model.kouPic.ToString("G");
     this.onePicTx.Text = model.onePic.ToString("G");
     this.guPiaoTx.Text = model.guPiao.ToString("F2");
     this.kouGpPicTx.Text = model.kouGpPic.ToString("G");
     this.inFicitPicTx.Text = model.inFicitPic.ToString("G");
 }
Exemplo n.º 2
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();
     }
 }
Exemplo n.º 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();
     }
 }