Example #1
0
        public ValueContract GetValueBandList()
        {
            ValueContract returncontract = new ValueContract();

            returncontract.ValueBandList = ValueRepo.GetValueBandList().ToList();

            return(returncontract);
        }
Example #2
0
        public ValueContract GetValueBandObject(int ValueBandID)
        {
            ValueContract returncontract = new ValueContract();

            returncontract.ValueBandObject = ValueRepo.GetValueBand(ValueBandID);

            return(returncontract);
        }
        /// <summary>
        /// Adds changes for Value contracts, ignores currency if value is not set
        /// </summary>
        /// <param name="changes"></param>
        /// <param name="originalValue"></param>
        /// <param name="newValue"></param>
        /// <param name="type"></param>
        /// <param name="propertyName"></param>
        /// <param name="lotNumber">Override for lot number</param>
        /// <param name="section">Override for section number</param>
        /// <param name="translationKey">Override for translation key</param>
        public static void Add(this List <Change> changes, ValueContract originalValue, ValueContract newValue, Type type,
                               string propertyName, string lotNumber = null, string section = null, string translationKey = null)
        {
            var originalCurrency = originalValue?.Value != null ? originalValue?.Currency : null;
            var newCurrency      = newValue?.Value != null ? newValue?.Currency : null;

            changes.Add(originalValue?.Value, newValue?.Value, type, propertyName, lotNumber, section, translationKey);
            changes.Add(originalCurrency, newCurrency, type, propertyName, lotNumber, section, translationKey);
        }
Example #4
0
 private static Value GetValue(ValueContract value)
 {
     return(new Value
     {
         Fmt = value.Fmt,
         LongFmt = value.LongFmt,
         Raw = value.Raw
     });
 }
Example #5
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Number: ");
            sb.AppendLine(Number.ToString());
            sb.Append("Date Contract: ");
            sb.AppendLine(Number.ToString("dd/MM/yyyy"));
            sb.Append("Value Contract: ");
            sb.AppendLine(ValueContract.ToString());
            sb.AppendLine();
            sb.AppendLine("Installments: ");
            foreach (Installment item in Installment)
            {
                sb.AppendLine(item.ToString());
            }
            return(sb.ToString());
        }