Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
 public SuppliersController(ISupplierBusinessLogic supplierBusinessLogic, SupplierValidation supplierValidation)
 {
     this.supplierBusinessLogic = supplierBusinessLogic;
     this.supplierValidation    = supplierValidation;
 }
Ejemplo n.º 3
0
 public SupplierManager(ISupplierDal supplierDal)
 {
     validator        = new SupplierValidation();
     this.supplierDal = supplierDal;
 }