public static TransType ToTransType(this InventoryShipmentOrderTypeEnum orderType) { switch (orderType) { case InventoryShipmentOrderTypeEnum.InterWarehouseOrder: return(TransType.Move); case InventoryShipmentOrderTypeEnum.TreatmentOrder: return(TransType.ToTrmt); case InventoryShipmentOrderTypeEnum.SalesOrder: return(TransType.Sale); case InventoryShipmentOrderTypeEnum.ConsignmentOrder: return(TransType.OnConsignment); case InventoryShipmentOrderTypeEnum.MiscellaneousOrder: return(TransType.MiscInvoice); default: throw new ArgumentOutOfRangeException("orderType"); } }
internal static Expression <Func <InventoryShipmentOrder, bool> > ByOrderType(InventoryShipmentOrderTypeEnum orderType) { return(i => i.OrderType == orderType); }