Ejemplo n.º 1
0
 public void Delete(Shipper v)
 {
     _northwind.GetCurrentSession().Delete(v);
 }
Ejemplo n.º 2
0
 public void Update(Shipper v)
 {
     _northwind.GetCurrentSession().Update(v);
 }
Ejemplo n.º 3
0
 public void Update(Shipper v)
 {
     _Northwind.Update(v);
 }
Ejemplo n.º 4
0
 public void Create(Shipper v)
 {
     _northwind.GetCurrentSession().Save(v);
 }
Ejemplo n.º 5
0
 public void Delete(Shipper v)
 {
     _Northwind.Delete(v);
 }
Ejemplo n.º 6
0
 public void Create(Shipper v)
 {
     _Northwind.Save(v);
 }
Ejemplo n.º 7
0
        public IQueryable<Order> SearchNormal(int? orderId, DateTime? orderDate, DateTime? requiredDate, DateTime? shippedDate, decimal? freight, string shipName, string shipAddress, string shipCity, string shipRegion, string shipPostalCode, string shipCountry, Customer customer, Employee employee, Shipper shipper)
        {
            IQueryable<Order> queryable = _Northwind.Linq<Order>();
            if (orderId != default(int?))
            {
                queryable = queryable.Where(x => x.OrderId == orderId);
            }
            if (orderDate != default(DateTime?))
            {
                queryable = queryable.Where(x => x.OrderDate == orderDate);
            }
            if (requiredDate != default(DateTime?))
            {
                queryable = queryable.Where(x => x.RequiredDate == requiredDate);
            }
            if (shippedDate != default(DateTime?))
            {
                queryable = queryable.Where(x => x.ShippedDate == shippedDate);
            }
            if (freight != default(decimal?))
            {
                queryable = queryable.Where(x => x.Freight == freight);
            }
            if (shipName != default(string))
            {
                queryable = queryable.Where(x => x.ShipName == shipName);
            }
            if (shipAddress != default(string))
            {
                queryable = queryable.Where(x => x.ShipAddress == shipAddress);
            }
            if (shipCity != default(string))
            {
                queryable = queryable.Where(x => x.ShipCity == shipCity);
            }
            if (shipRegion != default(string))
            {
                queryable = queryable.Where(x => x.ShipRegion == shipRegion);
            }
            if (shipPostalCode != default(string))
            {
                queryable = queryable.Where(x => x.ShipPostalCode == shipPostalCode);
            }
            if (shipCountry != default(string))
            {
                queryable = queryable.Where(x => x.ShipCountry == shipCountry);
            }
            if (customer != default(Customer))
            {
                queryable = queryable.Where(x => x.Customer == customer);
            }
            if (employee != default(Employee))
            {
                queryable = queryable.Where(x => x.Employee == employee);
            }
            if (shipper != default(Shipper))
            {
                queryable = queryable.Where(x => x.Shipper == shipper);
            }

            return queryable;
        }
 public string ToString(Shipper obj)
 {
     return obj.ShipperId.ToString();
 }
Ejemplo n.º 9
0
        public IPresentableSet<Order> SearchNormal(int? orderId, DateTime? orderDate, DateTime? requiredDate, DateTime? shippedDate, decimal? freight, string shipName, string shipAddress, string shipCity, string shipRegion, string shipPostalCode, string shipCountry, Customer customer, Employee employee, Shipper shipper)
        {
            IQueryable<Order> queryable = _northwind.GetCurrentSession().Linq<Order>();
            if(orderId != default(int?))
            {
                queryable = queryable.Where(x => x.OrderId == orderId);
            }
            if(orderDate != default(DateTime?))
            {
                queryable = queryable.Where(x => x.OrderDate == orderDate);
            }
            if(requiredDate != default(DateTime?))
            {
                queryable = queryable.Where(x => x.RequiredDate == requiredDate);
            }
            if(shippedDate != default(DateTime?))
            {
                queryable = queryable.Where(x => x.ShippedDate == shippedDate);
            }
            if(freight != default(decimal?))
            {
                queryable = queryable.Where(x => x.Freight == freight);
            }
            if(!string.IsNullOrEmpty(shipName))
            {
                queryable = queryable.Where(x => x.ShipName == shipName);
            }
            if(!string.IsNullOrEmpty(shipAddress))
            {
                queryable = queryable.Where(x => x.ShipAddress == shipAddress);
            }
            if(!string.IsNullOrEmpty(shipCity))
            {
                queryable = queryable.Where(x => x.ShipCity == shipCity);
            }
            if(!string.IsNullOrEmpty(shipRegion))
            {
                queryable = queryable.Where(x => x.ShipRegion == shipRegion);
            }
            if(!string.IsNullOrEmpty(shipPostalCode))
            {
                queryable = queryable.Where(x => x.ShipPostalCode == shipPostalCode);
            }
            if(!string.IsNullOrEmpty(shipCountry))
            {
                queryable = queryable.Where(x => x.ShipCountry == shipCountry);
            }
            if(customer != default(Customer))
            {
                queryable = queryable.Where(x => x.Customer == customer);
            }
            if(employee != default(Employee))
            {
                queryable = queryable.Where(x => x.Employee == employee);
            }
            if(shipper != default(Shipper))
            {
                queryable = queryable.Where(x => x.Shipper == shipper);
            }

            return new QueryablePresentableSet<Order>(queryable);
        }