コード例 #1
0
        // GET: HealthLoanDecisionFirstPayment/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db db = new Db(DbServices.ConnectionString);
            HealthLoanDecisionFirstPayment healthLoanDecisionFirstPayment = HealthLoanDecisionFirstPaymentServices.Get(id.Value, db);

            if (healthLoanDecisionFirstPayment == null)
            {
                return(HttpNotFound());
            }
            return(View(healthLoanDecisionFirstPayment));
        }
コード例 #2
0
        // GET: HealthLoanDecisionFirstPayment/Edit/5
        public ActionResult Edit(Nullable <int> id)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HealthLoanDecisionFirstPayment healthLoanDecisionFirstPayment = HealthLoanDecisionFirstPaymentServices.Get(id.Value, db);

            if (healthLoanDecisionFirstPayment == null)
            {
                return(HttpNotFound());
            }

            ViewBag.EmployeeList           = new SelectList(EmployeeServices.List(db), "Id", "FirstName", healthLoanDecisionFirstPayment.Employee);
            ViewBag.HealthLoanDecisionList = new SelectList(HealthLoanDecisionServices.List(db), "Id", "CersNumber", healthLoanDecisionFirstPayment.HealthLoanDecision);
            ViewBag.InsuranceTypeList      = new SelectList(InsuranceTypeServices.List(db), "Id", "Name", healthLoanDecisionFirstPayment.InsuranceType);
            return(View(healthLoanDecisionFirstPayment));
        }