Beispiel #1
0
 private void FormIncomingLoanView_Load(object sender, EventArgs e)
 {
     if (dataSource == null)
     {
         DateTime dt = DateTime.Now;
         DataSource = IncomingLoanVwServices.List(new Db(DbServices.ConnectionString));
         slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString();
     }
 }
Beispiel #2
0
        /// <summary>
        /// Returns a list of IncomingLoanVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(IncomingLoanVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            ViewBag.LoanProductProductTypeList = new SelectList(ProductTypeServices.List(db), "Id", "Name");
            if (Model.Filter.HasCriteria)
            {
                Model.List = IncomingLoanVwServices.Get(Model.Filter, db);
            }
            else
            {
                Model.List = new List <IncomingLoanVw>();
            }
            return(View(Model));
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <int> loan)
        {
            if (loan == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IncomingLoanVwViewModel incomingLoanVwViewModel = new IncomingLoanVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // incomingLoanVwViewModel.Instance = IncomingLoanVwServices.Get(loan.Value, db);
            incomingLoanVwViewModel.Instance = IncomingLoanVwServices.GetChildren(loan.Value, db);
            if (incomingLoanVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            return(View(incomingLoanVwViewModel));
        }