public static async Task <Dictionary <int, DateTime> > GetTerminationDates(this IConverterRow conv)
        {
            var dynamics = await conv.GetViewsList(ViewsDisplayID);

            var dict = new Dictionary <int, DateTime>();

            foreach (var byf in dynamics)
            {
                var modTyp = As.ID(byf.modtype);
                if (modTyp != 90)
                {
                    continue;
                }

                var lseNid   = As.ID(byf.leasenid);
                var termDate = As.Date(byf.date);

                //if (dict.ContainsKey(lseNid))
                //    throw Bad.Data($"Duplicate lease nid: {lseNid}");
                //
                //dict.Add(lseNid, termDate);
                dict[lseNid] = termDate;
            }
            return(dict);
        }
        public static async Task <DateTime> GetLastPostedDate(this IConverterRow conv)
        {
            var dynamics = await conv.GetViewsList(ViewsDisplayID);

            var item1 = dynamics.First();

            return(As.Date(item1.max));
        }
Example #3
0
        public static async Task <Dictionary <int, TenantModel> > GetTenantsDictionary(this IConverterRow conv)
        {
            var dynamics = await conv.GetViewsList(ViewsDisplayID);

            var dict = new Dictionary <int, TenantModel>();

            foreach (var byf in dynamics)
            {
                var nid = As.ID(byf.nid);
                var rnt = CastToRNT(byf);
                dict.Add(nid, rnt);
            }
            return(dict);
        }