Beispiel #1
0
        public void AdaptTermDetailConfig(TermDetail fromValue, DueDetail toValue)
        {
            Guard.Against.Null(fromValue, nameof(toValue));
            Guard.Against.Null(fromValue, nameof(toValue));

            toValue.Id      = fromValue.Id;
            toValue.OrgCode = fromValue.OrgCode;
            foreach (var item in fromValue.TermDetailConfigs)
            {
                DueDetailToTermDetail(toValue, (TermDetailConfig)item);
            }
        }
Beispiel #2
0
        /// <summary>
        ///     Adapt detail from entity to model
        /// </summary>
        /// <param name="item"></param>
        /// <param name="toValue"></param>
        public static void AdaptTermsDetail(TermDetail item, ContractOrganization toValue)
        {
            Guard.Against.Null(toValue, nameof(ContractOrganization));
            Guard.Against.Null(item, nameof(TermDetail));
            toValue.DueId = item.TermId;

            var tempDt = new DueDetail
            {
                Id        = item.Id,
                DebtCode  = item.DebtCode,
                TermsType = item.TermsType.ToString(),
                OrgCode   = item.OrgCode
            };

            var configTemp = item.TermDetailConfigs.GetTermDetailConfiguration(item.Id, item.OrgCode);

            var config = AdptToDueDetailConfiguration((TermDetailConfig)configTemp);

            config.CodOrg = item.OrgCode;
            toValue.DueDetails.Add(tempDt);
            tempDt.DueDetailConfigs.Add(config);
            //toValue.DueDetails.Select(x => x.DueDetailConfigs.Select(s => config));
        }
Beispiel #3
0
 public static void Insert(TermDetail _obj)
 {
     BNBDataContext.Instance.TermDetails.InsertOnSubmit(_obj);
     Update();
 }
Beispiel #4
0
        public async Task SelectTerm()
        {
            var termDetailPage = new TermDetail(this.SelectedTerm);

            await this.GoToPage(termDetailPage);
        }