/// <summary>
 /// 
 /// </summary>
 /// <param name="Broker"></param>
 /// <returns></returns>
 public static int Update(Promociones Broker)
 {
     using (MsSqlFacade<Promociones, PromocionesMapper> facade = new MsSqlFacade<Promociones, PromocionesMapper>())
     {
         //// we use the Collection to build the broker entity on an abstract phase to manage it as a all
         return facade.Update(Broker);
     }
 }
예제 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="cliente"></param>
 /// <returns></returns>
 public static int UpdatePerfilCliente(PerfilClientes cliente)
 {
     try
     {
         using (MsSqlFacade<PerfilClientes, PerfilClientesMapper> facade = new MsSqlFacade<PerfilClientes, PerfilClientesMapper>())
         {
             return facade.Update(cliente);
         }
     }
     catch
     {
         /// in case that fails, we give an empty list
         return -1;
     }
 }
예제 #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="Compra"></param>
 /// <param name="Estado"></param>
 /// <returns></returns>
 public static int EstadoPromocion(int Compra, int Estado)
 {
     try
     {
         using (MsSqlFacade<ComprasPromociones, ComprasPromocionesMapper> facade = new MsSqlFacade<ComprasPromociones, ComprasPromocionesMapper>())
         {
             /// we now get the entity
             ComprasPromociones entity = facade.Get(Compra);
             /// this entity we now update
             entity.Estado = Estado;
             entity.FechaCambioEstado = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
             /// this will return the entity update
             return facade.Update(entity);
         }
     }
     catch
     {
         /// in case that fails, we give an empty list
         return -1;
     }
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="broker"></param>
 /// <returns></returns>
 public static int UpdateItemProductos(data.entities.ItemProductos broker)
 {
     try
     {
         using (MsSqlFacade<ItemProductos, ItemProductosMapper> facade = new MsSqlFacade<ItemProductos, ItemProductosMapper>())
         {
             //// we select all the promotion that are active first
             return facade.Update(broker);
         }
     }
     catch
     {
         /// in case that fails, we give an empty list
         return -1;
     }
 }