Exemple #1
0
        public static IEnumerable <Order> RequestOrders(DateTime dateTime, string operatorsIds, string clientsIds, string factoriesIds, string productsIds)
        {
            operatorsIds = string.IsNullOrWhiteSpace(operatorsIds) ? "0" : "0," + operatorsIds;
            clientsIds   = string.IsNullOrWhiteSpace(clientsIds) ? "0" : "0," + clientsIds;
            factoriesIds = string.IsNullOrWhiteSpace(factoriesIds) ? "0" : "0," + factoriesIds;
            productsIds  = string.IsNullOrWhiteSpace(productsIds) ? "0" : "0," + productsIds;

            string         fecha = dateTime.ToString();
            PlannerDataSet ds    = new PlannerDataSet();

            ds.EnforceConstraints = false;
            PlannerDataSetTableAdapters.PlannerOrdersTableAdapter adapter = new PlannerDataSetTableAdapters.PlannerOrdersTableAdapter();
            //adapter.FillByPending(ds.PlannerOrders, dateTime.ToString(), operatorsIds, clientsIds, factoriesIds, productsIds);
            adapter.FillByPendingsp(ds.PlannerOrders, dateTime, operatorsIds, clientsIds, factoriesIds, productsIds);
            //adapter.FillByPendingtestInner(ds.PlannerOrders, dateTime.ToString() ,operatorsIds, clientsIds, factoriesIds, productsIds);



            var table = ds.PlannerOrders;

            foreach (DataRow row in table.Rows)
            {
                yield return(ConvertToOrder(row, table));
            }
        }
Exemple #2
0
        public static IEnumerable <Order> RequestOrders(DateTime dateTime)
        {
            PlannerDataSet ds = new PlannerDataSet();

            ds.EnforceConstraints = false;
            PlannerDataSetTableAdapters.PlannerOrdersTableAdapter adapter = new PlannerDataSetTableAdapters.PlannerOrdersTableAdapter();
            adapter.FillByPending(ds.PlannerOrders, dateTime.ToString(), "0", "0", "0", "0");
            //adapter.FillByPendingsp(ds.PlannerOrders, dateTime, "0", "0", "0", "0");

            var table = ds.PlannerOrders;

            foreach (DataRow row in table.Rows)
            {
                yield return(ConvertToOrder(row, table));
            }
        }