/// <summary>
        /// Returns a list of LoanStatusVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(LoanStatusVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            Model.List = LoanStatusVwServices.List(db);
            return(View(Model));
        }
 private void FormLoanStatusView_Load(object sender, EventArgs e)
 {
     if (dataSource == null)
     {
         DateTime dt = DateTime.Now;
         DataSource = LoanStatusVwServices.List(new Db(DbServices.ConnectionString));
         slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString();
     }
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <byte> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LoanStatusVwViewModel loanStatusVwViewModel = new LoanStatusVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // loanStatusVwViewModel.Instance = LoanStatusVwServices.Get(id.Value, db);
            loanStatusVwViewModel.Instance = LoanStatusVwServices.GetChildren(id.Value, db);
            if (loanStatusVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            return(View(loanStatusVwViewModel));
        }