public ActionResult Create(int id, short productType)
        {
            var model = new SecurityCheckerEditModel();
             model.ProductId = id;
             model.ProductType = productType;
             if (productType == 1)
             {
                 var agricultural = AgriculturalProductSvc.LoadById(id);

                 model.ProductName = agricultural.ProductName;
                 model.ProductTypeName = "农产品";
                 model.CompanyName = agricultural.ProductOwner.CompanyName;
                 model.CompanyId = agricultural.ProductOwner.Id;
             }
             else if (productType == 2)
             {
                 var wholeSale = WholeSaleProductSvc.LoadById(id);
                 model.ProductName = wholeSale.ProductName;
                 model.CompanyName = wholeSale.FromCompany.CompanyName;
                 model.CompanyId = wholeSale.FromCompany.Id;
                 model.ProductTypeName = "批发产品";
             }
             else
             {
                 var retail = RetailProductSvc.LoadById(id);
                 model.CompanyName = retail.FromCompany.CompanyName;
                 model.ProductName = retail.ProductName;
                 model.CompanyId = retail.FromCompany.Id;
                 model.ProductTypeName = "零售产品";
             }
             return View(model);
        }
        public ActionResult Create(SecurityCheckerEditModel model)
        {
            Company company = CompanySvc.LoadById(model.CompanyId);
             switch (model.SecurityLevel)
             {
                 case 0:
                     this.StopByAgriculturalProductId(model.ProductId, model.ProductType);
                     break;
                 case 1:
                     break;
                 case 2:
                     this.StopProduct(model.ProductId, model.ProductType);
                     break;
                 case 3:
                     break;
                 default:
                     break;
             }
             IIdentity id = HttpContext.User.Identity;
             var user = UserSvc.LoadByUserName(id.Name);

             SecurityCheckHistory history = new SecurityCheckHistory
             {
                 InsertBy = user,
                 InsertDate= DateTime.Now,
                 InsertReason = model.InsertReason,
                 ProductName = model.ProductName,
                 ProductType = model.ProductType,
                 ProductOwer = company,
                 ProductId = model.ProductId,
                 ProductTypeName = model.ProductTypeName,
                 SecurityLevel = model.SecurityLevel
             };

             SecurityCheckSvc.Insert(history);

             return RedirectToAction("Index");
        }