public ActionResult AddSupplier(SupplierValidation item)
        {
            Supplier obj = new Supplier();

            obj.Name        = item.Name;
            obj.Description = item.Description;
            obj.isActive    = item.isActive;

            context.Suppliers.Add(obj);
            context.SaveChanges();

            ModelState.Clear();
            return(View());
        }
예제 #2
0
 public SuppliersController(ISupplierBusinessLogic supplierBusinessLogic, SupplierValidation supplierValidation)
 {
     this.supplierBusinessLogic = supplierBusinessLogic;
     this.supplierValidation    = supplierValidation;
 }
예제 #3
0
 public SupplierManager(ISupplierDal supplierDal)
 {
     validator        = new SupplierValidation();
     this.supplierDal = supplierDal;
 }