public EditBillViewModel(int id)
        {
            this.CustomBills = new List <CustomBillViewModel>();
            this.DOTM        = new List <BootstrapLI>();

            PBProxy p = new PBProxy();
            Bill    b = p.GetBill(id);

            this.Bill = Mapper.Map <Bill, BillViewModel>(b);
            this.Bill.DueDaySuffix = Utility.IntSuffix(this.Bill.DueDay);
            for (int i = 1; i < 32; i++)
            {
                this.DOTM.Add(new BootstrapLI()
                {
                    Text = i.ToString() + Utility.IntSuffix(i), Value = i.ToString(), Selected = (i == b.DueDay)
                });
            }

            IEnumerable <CustomBill> cbills = p.GetCustomBills(b.Id);

            if (cbills != null)
            {
                this.Bill.CustomBillCount = cbills.Count();
                //this.CustomBills = Mapper.Map<List<CustomBillViewModel>>(cbills);
            }

            p = null;
        }
        public CustomBillsViewModel(int id)
        {
            this.CustomBills = new List <CustomBillViewModel>();

            PBProxy p = new PBProxy();
            Bill    b = p.GetBill(id);

            this.Bill = Mapper.Map <Bill, BillViewModel>(b);
            this.Bill.DueDaySuffix = Utility.IntSuffix(this.Bill.DueDay);

            IEnumerable <CustomBill> cbills = p.GetCustomBills(b.Id);

            if (cbills != null)
            {
                this.CustomBills = Mapper.Map <List <CustomBillViewModel> >(cbills);
            }

            p = null;
        }