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

            Model.List = GuarantorStatementVwServices.List(db);
            return(View(Model));
        }
Ejemplo n.º 2
0
 private void FormGuarantorStatementView_Load(object sender, EventArgs e)
 {
     if (dataSource == null)
     {
         DateTime dt = DateTime.Now;
         DataSource = GuarantorStatementVwServices.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 <int> guarantor)
        {
            if (guarantor == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GuarantorStatementVwViewModel guarantorStatementVwViewModel = new GuarantorStatementVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // guarantorStatementVwViewModel.Instance = GuarantorStatementVwServices.Get(guarantor.Value, db);
            guarantorStatementVwViewModel.Instance = GuarantorStatementVwServices.GetChildren(guarantor.Value, db);
            if (guarantorStatementVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            return(View(guarantorStatementVwViewModel));
        }