Пример #1
0
 private void FormSpecialCaseLoanView_Load(object sender, EventArgs e)
 {
     if (dataSource == null)
     {
         DateTime dt = DateTime.Now;
         DataSource = SpecialCaseLoanVwServices.List(new Db(DbServices.ConnectionString));
         slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString();
     }
 }
Пример #2
0
        /// <summary>
        /// Returns a list of SpecialCaseLoanVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(SpecialCaseLoanVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            ViewBag.LoanTypeProductTypeList = new SelectList(ProductTypeServices.List(db), "Id", "Name");
            if (Model.Filter.HasCriteria)
            {
                Model.List = SpecialCaseLoanVwServices.Get(Model.Filter, db);
            }
            else
            {
                Model.List = new List <SpecialCaseLoanVw>();
            }
            return(View(Model));
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpecialCaseLoanVwViewModel specialCaseLoanVwViewModel = new SpecialCaseLoanVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

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


            return(View(specialCaseLoanVwViewModel));
        }