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

            Model.List = InsuranceTypeVwServices.List(db);
            return(View(Model));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <byte> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InsuranceTypeVwViewModel insuranceTypeVwViewModel = new InsuranceTypeVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

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


            @ViewBag.HealthLoanDecisionFirstPaymentVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "HealthLoanDecisionFirstPayment", "ModuleNamePlural");
            // insuranceTypeVwViewModel.HealthLoanDecisionFirstPaymentVwViewModel.List = HealthLoanDecisionFirstPaymentVwServices.GetByInsuranceTypeId(id.Value, db);
            insuranceTypeVwViewModel.HealthLoanDecisionFirstPaymentVwViewModel.List = insuranceTypeVwViewModel.Instance.HealthLoanDecisionFirstPaymentVwList;


            return(View(insuranceTypeVwViewModel));
        }
Example #3
0
 private void FormInsuranceTypeView_Load(object sender, EventArgs e)
 {
     if (dataSource == null)
     {
         DateTime dt = DateTime.Now;
         DataSource = InsuranceTypeVwServices.List(new Db(DbServices.ConnectionString));
         slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString();
     }
 }