public AddTypeVM() { SelectedProduct = new Entity.Product(); SelectedProduct.ProductType = new ProductType(); surrogate = new Surrogate<Entity.Product>(new ProductServiceProxy()); Products = surrogate.Deserialize(surrogate.GetAll()); surrogateProductType = new Surrogate<ProductType>(new ProductTypeServiceProxy()); }
public IActionResult GetAll([Required] string group) { try { return(Ok(CustomResponse.ok(_service.GetAll(group)))); } catch (Exception ex) { _logger.LogError(ex.Message); return(BadRequest()); } }
public AddProductParametrVM() { SelectedProduct = new Entity.Product(); SelectedProduct.ProductType = new ProductType(); SelectedProductParameter = new ProductParametr(); surrogateProduct = new Surrogate<Entity.Product>(new ProductServiceProxy()); Products = surrogateProduct.Deserialize(surrogateProduct.GetAll()); surrogateProductParameter = new Surrogate<ProductParametr>(new ProductParameterServiceProxy()); Products = surrogateProduct.Deserialize(surrogateProductParameter.GetAll()); ProductParametrs = new ObservableCollection<ProductParametr>(Products.Select(a => a.ProductType).ToList().FirstOrDefault().ProductParametrs.ToList()); }
public MainWindowVM() { _surrogateProduct = new Surrogate<Product>(new ProductServiceProxy()); Products = _surrogateProduct.Deserialize(_surrogateProduct.GetAll()); _surrogateBuyer = new Surrogate<Buyer>(new BuyerServiceProxy()); Buyers = _surrogateBuyer.Deserialize(_surrogateBuyer.GetAll()); _surrogatePurchase = new Surrogate<Purchase>(new PurchaseServiceProxy()); _surrogatePurchaseProduct = new Surrogate<PurchaseProduct>(new PurchaseProductServiceProxy()); originator = new OriginatorSearching(); history = new ProductsHistory(); history.History.Push(originator.SaveState(new List<Product>(Products))); ProductPurchasesInCheck = new ObservableCollection<PurchaseProduct>(); }
public ActionResult Tareas(int id) { try { int idU; int.TryParse(Session["IdUsuario"].ToString(), out idU); Usuario usuario = _generalUserService.Get(idU); ViewBag.nombreCarpeta = usuario.Carpeta.Where(x => x.IdCarpeta == id).First().Nombre; ViewBag.tareas = _generalTareaService.GetAll().Where(x => x.IdCarpeta == id).ToList(); return View("Tareas"); } catch (Exception e) { throw e; } }
public AddValueToParametrVM() { surrogateProduct = new Surrogate<Entity.Product>(new ProductServiceProxy()); surrogateProductParametrValue = new Surrogate<Entity.ProductParametrValue>(new ProductParameterValueServiceProxy()); Products = surrogateProduct.Deserialize(surrogateProduct.GetAll()); }
public LoginVM() { _surrogateBuyer = new Surrogate<Entity.Buyer>(new BuyerServiceProxy()); Buyers = _surrogateBuyer.Deserialize(_surrogateBuyer.GetAll()); }