// GET: LoanDecisionType/Delete/5
        public ActionResult Delete(Nullable <byte> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db db = new Db(DbServices.ConnectionString);
            LoanDecisionType loanDecisionType = LoanDecisionTypeServices.Get(id.Value, db);

            if (loanDecisionType == null)
            {
                return(HttpNotFound());
            }
            return(View(loanDecisionType));
        }
        public ActionResult Create([Bind(Include = "Id, Name")] LoanDecisionType loanDecisionType)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (ModelState.IsValid)
            {
                try
                {
                    LoanDecisionTypeServices.Insert(CurrentUser.Id, loanDecisionType, db);
                    TempData["Success"] = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "UI", "InsertConfirmed");
                    return(RedirectToAction("Index"));
                }
                catch (CfException cfex)
                {
                    TempData["Failure"] = cfex.ErrorDefinition.LocalizedMessage;
                }
                catch (Exception ex)
                {
                    TempData["Failure"] = ex.Message;
                }
            }

            return(View(loanDecisionType));
        }