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

            Db          db          = new Db(DbServices.ConnectionString);
            ProductType productType = ProductTypeServices.Get(id.Value, db);

            if (productType == null)
            {
                return(HttpNotFound());
            }
            return(View(productType));
        }
        // GET: ProductType/Edit/5
        public ActionResult Edit(Nullable <short> id)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProductType productType = ProductTypeServices.Get(id.Value, db);

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

            ViewBag.PaymentGroupList   = new SelectList(PaymentGroupServices.List(db), "Id", "Name", productType.PaymentGroup);
            ViewBag.ProfitStrategyList = new SelectList(ProfitStrategyServices.List(db), "Id", "Name", productType.ProfitStrategy);
            return(View(productType));
        }