Example #1
0
 private void GetData()
 {
     decimal allMoney = new UserDataManager().GetAllMoney();
     List<DetailedAward> model = new DetailedAwardManager().GetModel();
     this.allMoneyLb.InnerHtml = allMoney.ToString("F2");
     if ((model.Count == 0) || (allMoney == 0M))
     {
         this.refAwardLb.InnerText = "0";
         this.pengAwardLb.InnerText = "0";
         this.refPengAwardLb.InnerText = "0";
         this.fenHongAwardLb.InnerText = "0";
         this.allAwardLb.InnerText = "0";
         this.kouOneLb.InnerText = "0";
         this.realAwardLb.InnerText = "0";
         this.refAwardPicLb.InnerText = "0";
         this.pengAwardPicLb.InnerText = "0";
         this.refPengAwardPicLb.InnerText = "0";
         this.fenHongAwardPicLb.InnerText = "0";
         this.allAwardPicLb.InnerText = "0";
         this.kouOnePicLb.InnerText = "0";
         this.realAwardPicLb.InnerText = "0";
     }
     else
     {
         this.refAwardLb.InnerText = model[0].refAward.ToString("F2");
         this.pengAwardLb.InnerText = model[0].pengAward.ToString("F2");
         this.refPengAwardLb.InnerText = model[0].refPengAward.ToString("F2");
         this.fenHongAwardLb.InnerText = model[0].fenHongAward.ToString("F2");
         this.allAwardLb.InnerText = model[0].allAward.ToString("F2");
         this.kouOneLb.InnerText = model[0].kouOne.ToString("F2");
         this.realAwardLb.InnerText = model[0].realAward.ToString("F2");
         this.refAwardPicLb.InnerText = ((model[0].refAward / allMoney) * 100M).ToString("F2");
         this.pengAwardPicLb.InnerText = ((model[0].pengAward / allMoney) * 100M).ToString("F2");
         this.refPengAwardPicLb.InnerText = ((model[0].refPengAward / allMoney) * 100M).ToString("F2");
         this.fenHongAwardPicLb.InnerText = ((model[0].fenHongAward / allMoney) * 100M).ToString("F2");
         this.allAwardPicLb.InnerText = ((model[0].allAward / allMoney) * 100M).ToString("F2");
         this.kouOnePicLb.InnerText = ((model[0].kouOne / allMoney) * 100M).ToString("F2");
         this.realAwardPicLb.InnerText = ((model[0].realAward / allMoney) * 100M).ToString("F2");
     }
 }