Ejemplo n.º 1
0
        void GenerateDetailsDictionary()
        {
            int formatIndex = Format == null ? -1 : CountInfo.FormatIndex(Format.Value);

            FormatDetailsDictionary = new Dictionary <string, int>();
            FormatDetailsDictionary.Add(MovieItemStatus.Rented.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Rented)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Rented)]);
            FormatDetailsDictionary.Add(MovieItemStatus.Active.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Active)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Active)]);
            FormatDetailsDictionary.Add("For Sell", Format == null ? CountInfo.ForSell : CountInfo.WithFormatForSell[formatIndex]);
            FormatDetailsDictionary.Add(MovieItemStatus.Lost.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Lost)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Lost)]);
            FormatDetailsDictionary.Add(MovieItemStatus.Damaged.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Damaged)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Damaged)]);
            FormatDetailsDictionary.Add(MovieItemStatus.Sold.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Sold)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Sold)]);
        }
Ejemplo n.º 2
0
 void UpdateFields()
 {
     if (CategoryPrice == null)
     {
         DetailControlsVisible = false;
     }
     else
     {
         DetailControlsVisible = true;;
         DefaultRentalDays     = CategoryPrice.DefaultRentDays.ToString();
         DefaultLateFee        = CategoryPrice.DefaultPrice.ToString();
     }
     if (Format == null)
     {
         TotalCount = string.Format(ConstStrings.Get("ItemsCountCaptionFlowDocument"), CountInfo.Total);
     }
     else
     {
         int formatIndex = CountInfo.FormatIndex(Format.Value);
         TotalCount = string.Format(ConstStrings.Get("ItemsCountCaptionFlowDocument"), CountInfo.WithFormat[formatIndex]);
     }
     DetailCounts = GetTextDetailsForFormat();
 }