public ActionResult Edit(KeyProducto key) { ProductoServicesController oServices = new ProductoServicesController(); GrupoServicesController oGrupoServices = new GrupoServicesController(); EntityProducto oEntityProducto = oServices.SelectByKey(key); ProductoViewModel oProductoViewModel = new ProductoViewModel(); oProductoViewModel.EntityProducto = oEntityProducto; oProductoViewModel.ListGrupo = oGrupoServices.Select (new EntityGrupo { IDGrupoPadre = Constantes.UnoNegativo, Key = new KeyGrupo { IDGrupo = Constantes.UnoNegativo } } ); oProductoViewModel.EditableCantidadinventario = Constantes.Falso; return(PartialView(Constantes.ProductoEdit, oProductoViewModel)); }
public EntityProducto SelectByKey(KeyProducto oKeyProducto) { try { CTransaction oCTransaction = CTransaction.Empty; return(Repo.SelectByKey(oKeyProducto, oCTransaction)); } catch (Exception ex) { throw ex; } }
public EntityProducto SelectByKey(KeyProducto okey, CTransaction oCTransaction) { try { DataProductoRepository data = new DataProductoRepository(EntityProducto.Empty, "producto"); return(data.SelectByKey(okey, oCTransaction)); } catch (Exception ex) { throw ex; } }
public EntityProducto SelectByKey(KeyProducto oKeyProducto) { try { using (ProductoServices.ProductoServicesClient oGrupoServices = new ProductoServices.ProductoServicesClient()) { return(oGrupoServices.SelectByKey(oKeyProducto)); } } catch (Exception ex) { throw ex; } }
public EntityProducto Insert(EntityProducto entity, CTransaction transaction) { try { DataProductoRepository data = new DataProductoRepository(entity, "producto"); entity = data.Insert(transaction); KeyProducto key = new KeyProducto(DataCreator.CreateInt32(data.CollectionParams.GetParameter("IDProducto").Value)); entity.Key = key; return(entity); } catch (Exception ex) { throw ex; } }
public EntityProducto SelectByKey(KeyProducto okey, CTransaction oCTransaction) { DataProcedure run = new DataProcedure(); run.CollectionParams.AddInputParameter("IDProducto", okey.IDProducto); using (IDataReader reader = run.ExecuteReader(oCTransaction, Procedimientos.Producto_Select)) { if (reader.Read()) { return(EntityProducto.Create(reader)); } } return(EntityProducto.Empty); }
public EntityProducto( Keys.KeyProducto okey, String oNombre, String oDescripcionCorta, String oDescripcionLarga, Int32 oCantidadMinimaInventario, Int32 oCantidadInventario, Decimal oPrecioUnitario, int oIdGrupo, int oEstado ) { this.key = okey; this.nombre = oNombre; this.descripcionCorta = oDescripcionCorta; this.descripcionLarga = oDescripcionLarga; this.cantidadMinimaInventario = oCantidadMinimaInventario; this.cantidadInventario = oCantidadInventario; this.precioUnitario = oPrecioUnitario; this.idGrupo = oIdGrupo; this.estado = oEstado; }
public ActionResult InnerEdit(KeyProducto key) { return(Edit(key)); }