Exemple #1
0
 private void loadLabel()
 {
     lblTotal.Text     = Revenue.GetTotalPrice() + " VND";
     lblNextMonth.Text = Revenue.GetTotalPriceMonth() + " VND";
     if (!Revenue.GetTotalPricePrevMonth().Equals(""))
     {
         lblPrevMonth.Text = Revenue.GetTotalPricePrevMonth() + " VND";
         double prevMonth = Convert.ToDouble(Revenue.GetTotalPricePrevMonth());
         double nowMonth  = Convert.ToDouble(Revenue.GetTotalPriceMonth());
         double percent   = Math.Round((nowMonth * 100) / prevMonth - 100);
         if (percent < 0)
         {
             lblUp.Text = "Giảm";
             percent   *= -1;
         }
         lblPercent.Text = percent.ToString() + " %";
     }
     else
     {
         lblPrevMonth.Text = "Chưa có";
     }
 }