protected void Page_Load(object sender, EventArgs e)
        {
            ReportDataView data = (ReportDataView)HttpContext.Current.Session["ReportData"];

            if (data != null)
            {
                RecipeReportService recipeService = new RecipeReportService();

                bool F = data.FilterEnabled;

                if (F == false)//ok
                {
                    fillTable(recipeService.getRecipeReportNoFilter());
                }
                else
                {
                    fillTable(recipeService.getRecipeReportFilterByCriteria(data));
                }
            }
            else
            {
                GridView3.DataSource = null;
                GridView3.DataBind();
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            RecipeReportService a = new RecipeReportService();

            List<RecipeReportView> x = a.getRecipeReportNoFilter();

            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].RecipeId + "," + x[i].Process + "," + x[i].RecipeProcessId + "," + x[i].Operation
                    + "," + x[i].Product + "," + x[i].Enabled + "," + x[i].Temperature
                    + "," + x[i].Time + "," + x[i].CoolingTime);

            }
            Console.ReadLine();

            /*
            ParameterService a = new ParameterService();

            UnitView x = a.getUnitFromParameter(1);

                Console.WriteLine(x.UnitId + "," + x.UnitName);

            Console.ReadLine();

            /*
             SessionService a = new SessionService();

            List<RecipeParameterView> x = a.getParameterBySession("90473270-02-3");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Parameter + "," + x[i].ParameterId + "," + x[i].Unit + "," + x[i].Value);

            }
            Console.ReadLine();

            /*
            SessionService a = new SessionService();
            SessionViewPlot s= new SessionViewPlot();
            s.SessionId = "90473270-01-1";
            SessionPlotDataView x = a.getDataLogInfo(s);

            Console.ReadLine();

            /*
            ParameterService a = new ParameterService();
            ProcessProductView y = new ProcessProductView();
            y.ProcessId = 1;
            y.ProductId = 1;
            List<ParameterUnitView> x = a.getParameterByProcessAndProduct(y);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Parameter + "," + x[i].UnitId + "," + x[i].Unit);

            }
            Console.ReadLine();

               /*
            RouterService a = new RouterService();
            RouterUpdateDataView x = a.getRouterUpdateData("prueba1");

            Console.WriteLine(x.OperationStatusEN + "," + x.RouterStatusEN + "," + x.OperationStatusId + "," + x.RouterStatusId);

            Console.ReadLine();
            /*
            SessionService a = new SessionService();
            SessionPlotView plot = new SessionPlotView();
            plot.ParameterName = "Temperatura";
            plot.SessionId = "90473270-02-3";

            SessionPlotDataView x = a.getDataLogInfo(plot);

            Console.WriteLine(x.AVG + "," + x.DEVP + "," + x.MaxValue + "," + x.MinValue);

            Console.ReadLine();

            /*

            SessionService a = new SessionService();

            List<RecipeParameterView> x = a.getParameterBySession("90473270-02-3");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Parameter + "," + x[i].ParameterId + "," + x[i].Unit + "," + x[i].Value);

            }
            Console.ReadLine();

             /*
            SessionService a = new SessionService();

            List<SessionDataLogChartView> x = a.getDataLogChart("90473270-02-3");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].ParameterXValue + "-----------------" + x[i].ParameterYValue );

            }
            Console.ReadLine();
            /*
            RecipeService a = new RecipeService();
            RecipeUpdateSecondLoginView logon = new RecipeUpdateSecondLoginView();
            logon.RecipeId = 5;

            logon.enableSecondUser = true;
            logon.SecondUserLoginPermision = "Daniel";

            AuditDataFromWeb audit = new AuditDataFromWeb();
            audit.Reason = "Second user update";
            audit.StationIP = "200.102.475.855";
            audit.UserName = "******";

            CUDView x = a.updateSecondEnable(logon, audit);

            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            //RecipeInsertView
            RecipeService a = new RecipeService();
            RecipeUpdateView recipe = new RecipeUpdateView();
            recipe.RecipeId = 4;
            recipe.FirstRecipeEnable = true;
            recipe.RecipeEnable = true;
            recipe.SecondRecipeEnable = true;

            AuditDataFromWeb audit = new AuditDataFromWeb();
            audit.Reason = "Se quiere cambiar el estado de esta recipe";
            audit.StationIP = "200.102.475.855";
            audit.UserName = "******";

            CUDView x = a.updateRecipe(recipe, audit);

            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            SourceService a = new SourceService();

            List<ReportSourceView> x = a.getSource();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Id + "," + x[i].Name );

            }
            Console.ReadLine();
            /*
            RecipeService a = new RecipeService();
            List<RecipeView> x = a.searchRecipe("annealing");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].FirstRecipeEnable + "," + x[i].FirstUserLoginPermision + "," + x[i].Id + "," + x[i].Operation
                    + "," + x[i].Process + "," + x[i].Product + "," + x[i].Recipe + "," + x[i].RecipeEnable + "," + x[i].SecondRecipeEnable + "," + x[i].SecondUserLoginPermision
                    + "," + x[i].RecipeEnable);

            }
            Console.ReadLine();

            /*
             * getDataLogChart
            SessionService a = new SessionService();
            SessionPlotView b= new SessionPlotView();
            b.ParameterName="Temperatura";
            b.SessionId="33";
            List<SessionPlotDataView> x = a.getDataLogInfo(b);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].AVG + "-----------------" + x[i].DEVP + "------------------" + x[i].MaxValue + "-----------------" + x[i].MinValue );

            }
            Console.ReadLine();

            /*AccountService service = new AccountService();
            AccountView b = new AccountView();
            b.Login = "******";

            CUDView x = service.deleteAccount(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            SessionService a = new SessionService();

            List<SessionView> x = a.getSession();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].ClosedBy + "," + x[i].Equipment + "," + x[i].Operation + "," + x[i].OperationStatus + "," +
                    x[i].ProcessMode + "," + x[i].Router + "," + x[i].SessionEnd + "," + x[i].SessionId + "," + x[i].SessionStart + "," + x[i].SessionStatus
                    + "," + x[i].SubId + "," + x[i].UpnId + "," + x[i].StartByUserName + "," + x[i].RecipeId + "," + x[i].ProcessId);

            }
            Console.ReadLine();

            /*
            SessionReportSearchService a = new SessionReportSearchService();

            List<SessionReportSearchView> x = a.getSessionReportSearchTable("212");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Equipment + "," + x[i].Operation + "," + x[i].OperationStatus + "," + x[i].ProcessMode + "," +
                    x[i].Router + "," + x[i].SessionEnd + "," + x[i].SessionId + "," + x[i].SessionStart + "," + x[i].SessionStatus + "," + x[i].SubId
                    + "," + x[i].UpnId);

            }
            Console.ReadLine();

            /*
            SessionReportSearchService a = new SessionReportSearchService();

            List<SessionReportSearchView> x = a.getSessionReportSearchTable();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Equipment + "," + x[i].Operation + "," + x[i].OperationStatus + "," + x[i].ProcessMode + "," +
                    x[i].Router + "," + x[i].SessionEnd + "," + x[i].SessionId + "," + x[i].SessionStart + "," + x[i].SessionStatus + "," + x[i].SubId
                    + "," + x[i].UpnId );

            }
            Console.ReadLine();

            /*
            ServerAuditTrailReportService a = new ServerAuditTrailReportService();

            List<ServerAuditTrailReportView> x = a.getServerAuditTrailReportNoFilter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Action + "," + x[i].Date + "," + x[i].NewValues + "," + x[i].OldValues + "," +
                    x[i].Reason + "," + x[i].StationIP + "," + x[i].UserName);

            }
            Console.ReadLine();

            /*
            ProcessAuditTrailReportService a = new ProcessAuditTrailReportService();

            List<ProcessAuditTrailReportView> x = a.getRecipeReportFilterByCriteria();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Action + "," + x[i].Date + "," + x[i].EquipmentId + "," + x[i].SessionID + "," +
                    x[i].UserAccount);

            }
            Console.ReadLine();
            /*
            AccountReportService a = new AccountReportService();

            List<AccountReportView> x = a.getAccountNoFilter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Account + "," + x[i].Active + "," + x[i].Block + "," + x[i].FirstName + "," +
                    x[i].GroupName + "," + x[i].LastName + "," + x[i].Login);

            }
            Console.ReadLine();

            /*
            UpnReportService a = new UpnReportService();

            List<UpnReportView> x = a.getUpnReportNoFilter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Enable + "," + x[i].Operation + "," + x[i].Process + "," + x[i].Product + "," +
                    x[i].RecipeProcessId + "," + x[i].UpnId);

            }
            Console.ReadLine();

            /*
            RouterReportService a = new RouterReportService();

            List<RouterReportView> x = a.getRouterNoFilter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Operation + "," + x[i].Process + "," + x[i].Product + "," + x[i].RecipeProcessId + "," + x[i].RouterId + "," + x[i].RouterStatusEn + "," + x[i].SessionModeEn + "," + x[i].UpnId);

            }
            Console.ReadLine();

               /* EquipmentReportService a = new EquipmentReportService();
            ReportDataView b = new ReportDataView();
            b.reportSourceFieldId = 3;
            b.criteriaId = "2";
            List<EquipmentReportView> x = a.getEquipmentReportFilterByCriteria(b);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Brand
                    + "," + x[i].Enabled
                    + "," + x[i].Equipment
                    + "," + x[i].EquipmentGroupId
                    + "," + x[i].EquipmentId
                    + "," + x[i].HMI
                    + "," + x[i].Location
                    + "," + x[i].Model
                    + "," + x[i].PLC
                    + "," + x[i].PLCLink
                   );

            }
            Console.ReadLine();

              /*  RecipeReportService a = new RecipeReportService();

            List<RecipeReportView> x = a.getRecipeReportNoFilter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Enabled + "," + x[i].Operation + "," + x[i].Process + "," + x[i].Product + "," + x[i].RecipeId + "," + x[i].RecipeProcessId );

            }
            Console.ReadLine();

            /*
            DataLogService a = new DataLogService();

            List<DataLogView> x = a.getDataLog();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].DatalogDate + "," + x[i].EquipmentId + "," + x[i].ParameterX + "," + x[i].ParameterXValue + "," + x[i].ParameterY + "," + x[i].ParameterYValue + "," + x[i].SessionId);

            }
            Console.ReadLine();

              /*  EquipmentReportService a = new EquipmentReportService();
            ReportDataView b = new ReportDataView();
            b.reportSourceFieldId = 1;
            b.criteriaId = "EjemploEsteban";
            List<EquipmentReportView> x = a.getEquipmentReportFilterByCriteria(b);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Brand
                    + "," + x[i].Enabled
                    + "," + x[i].Equipment
                    + "," + x[i].EquipmentGroupId
                    + "," + x[i].EquipmentId
                    + "," + x[i].HMI
                    + "," + x[i].Location
                    + "," + x[i].Model
                    + "," + x[i].PLC
                    + "," + x[i].PLCLink
                   );

            }
            Console.ReadLine();

            /*
            EquipmentReportService a = new EquipmentReportService();
            List<EquipmentReportView> x = a.getEquipmentReportNoFilter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Brand
                    + "," + x[i].Enabled
                    + "," + x[i].Equipment
                    + "," + x[i].EquipmentGroupId
                    + "," + x[i].EquipmentId
                    + "," + x[i].HMI
                    + "," + x[i].Location
                    + "," + x[i].Model
                    + "," + x[i].PLC
                    + "," + x[i].PLCLink
                   );

            }
            Console.ReadLine();

             /*
            DataLogService a = new DataLogService();
            ReportDataView b = new ReportDataView();
            b.reportSourceFieldId = 1;
            b.criteriaId = "555";
            b.firstDate = "2015-12-01";
            b.secondDate = "2015-12-30";

            List<DataLogView> x = a.getDataLogFilterByCriteriaAndDate(b);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].DatalogDate + "," + x[i].EquipmentId + "," + x[i].ParameterX + "," + x[i].ParameterXValue + "," + x[i].ParameterY + "," + x[i].ParameterYValue + "," + x[i].SessionId);

            }
            Console.ReadLine();

            /*
            DataLogService a = new DataLogService();
            ReportDataView b = new ReportDataView();
            b.reportSourceFieldId = 1;
            b.criteriaId = "555";

            List<DataLogView> x = a.getDataLogFilterByCriteria(b);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].DatalogDate + "," + x[i].EquipmentId + "," + x[i].ParameterX + "," + x[i].ParameterXValue + "," + x[i].ParameterY + "," + x[i].ParameterYValue + "," + x[i].SessionId);

            }
            Console.ReadLine();

            /*
            DataLogService a = new DataLogService();
            ReportDataView b = new ReportDataView();
            b.firstDate = "2015-12-01";
            b.secondDate = "2015-12-30";

            List<DataLogView> x = a.getDataLogFilterDate(b);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].DatalogDate + "," + x[i].EquipmentId + "," + x[i].ParameterX + "," + x[i].ParameterXValue + "," + x[i].ParameterY + "," + x[i].ParameterYValue + "," + x[i].SessionId);

            }
            Console.ReadLine();

            /*
            RecipeService a = new RecipeService();
            RecipeUpdateValueView b = new RecipeUpdateValueView();
            b.RecipeId = 5;
            b.ParameterValue = 100;
            b.ParameterId =3;

            CUDView x = a.updateRecipeValue(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            SourceService a = new SourceService();
            List<CriteriaView> x = a.getCriteria(6);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].CriteriaId + "," + x[i].Criteria);

            }
            Console.ReadLine();

              /*  SourceService a = new SourceService();
            List<ReportSourceView> x = a.getFilterByField(1);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Id + "," + x[i].Name);

            }
            Console.ReadLine();

               /*
            SourceService a = new SourceService();
            List<ReportSourceView> x = a.getSource();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Id + "," + x[i].Name );

            }
            Console.ReadLine();

            /*
            SessionService a = new SessionService();
            List<SessionView> x = a.getSession();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].ClosedBy + "," + x[i].End + "," + "," + x[i].EquipmentId + "," + x[i].EquipmentName
                    + "," + x[i].EquipmentSubId + "," + x[i].Operation + "," + x[i].OperationId
                    + "," + x[i].RouterId + "," + x[i].Session + "," + x[i].SessionStatusId
                    + "," + x[i].SessionStatusName + ","  + x[i].Start + "," + x[i].UpnId);

            }
            Console.ReadLine();

            /*
            OperationService a = new OperationService();
            List<OperationEquipmentView> x = a.getEquipmentByOperation(1);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].EquipmentId + "," + x[i].GroupId + ","+ "," + x[i].GroupName + "," + x[i].ID);

            }
            Console.ReadLine();
            /*
            ProcessService a = new ProcessService();
            ProcessUpdateView b = new ProcessUpdateView();
            b.ProcessId=2;
            b.ProcessName="Modificado";
            b.ProductLineId=2;
            b.ProcessParameterSet=true;
            b.ProcessPlotEnable=true;
            CUDView x = a.updateProcess(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*

            ProcessService a = new ProcessService();
            ProductUpdateView b = new ProductUpdateView();
            b.ProductLineId = 1;
            b.ProductLineName = "Prueba update";

            CUDView x = a.updateProduct(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            RecipeService a = new RecipeService();
            List<RecipeEquipmentView> x = a.getEquipmentByOperation(1);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Link + "," + x[i].ID + "," + x[i].EquipmentName);
            }

            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            CUDView x = a.insertBrand("Prueba");
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            ProcessService a = new ProcessService();
            List<ProcessView> x = a.getProcess();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Process + "," + x[i].ProcessId + "," + x[i].ProcessParameterSet + "," + x[i].ProcessPlotEnable+ "," + x[i].ProductLine
                    + "," + x[i].ProductLineId );

            }
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            EquipmentGroupView b = new EquipmentGroupView();
            b.EquipmentGroupId = 1;
            b.EquipmentGroupName = "";
            CUDView x = a.UpdateEquipmentGroup(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            EquipmentUpdateView b = new EquipmentUpdateView();
            b.HMIAddress = "";
            b.Id = "";
            b.Location = "";
            b.PLCAddress = "";
            b.PLCLink = true;
            b.Status = true;
            CUDView x = a.updateEquipment(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            List<EquipmentView> x = a.searchEquipment("1");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Brand + "," + x[i].Enabled + "," + x[i].EquipmentGroup + "," + x[i].GroupConsecutive + "," + x[i].HMI
                    + "," + x[i].Id + "," + x[i].Location + "," + x[i].Model + "," + x[i].PLC + "," + x[i].PLCLink);

            }
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            List<EquipmentGroupView> x = a.getEquipmentGroup();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].EquipmentGroupId + "," + x[i].EquipmentGroupName);

            }
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            List<BrandView> x = a.getEquipmentBrand();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].BrandId + "," + x[i].BrandName);

            }
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            BrandView b = new BrandView();
            b.BrandId = 4;
            b.BrandName = "Brand update";
            CUDView x = a.updateBrand(b);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            CUDView x = a.insertBrand("Brand Prueba");
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            CUDView x = a.insertEquipmentGroup("EquipmentGroupPrueba");
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            EquipmentService a = new EquipmentService();
            List<EquipmentView> x = a.getEquipments();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Brand + "," + x[i].Enabled + "," + x[i].EquipmentGroup + "," + x[i].GroupConsecutive + "," + x[i].HMI
                    + "," + x[i].Id + "," + x[i].Location + "," + x[i].Model + "," + x[i].PLC + "," + x[i].PLCLink );

            }
            Console.ReadLine();

            /*
            RecipeService a = new RecipeService();
            RecipeInsertView recipe = new RecipeInsertView();
            recipe.ProcessId= 1;
            recipe.RecipeProcessId = 1;
            recipe.OperationId= 1;
            recipe.RecipeStatus = 0;
            CUDView x = a.insertRecipe(recipe);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*

            RouterService a = new RouterService();
            List<RouterStatusView> x = a.getRoutersStatus();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].RouterStatusEn + "," + x[i].RouterStatusId);

            }
            Console.ReadLine();

            /*
            RouterService a = new RouterService();
            CUDView x = a.deleteRouter("555-555");
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            RouterService a = new RouterService();
            List<RouterOperationStatusView> x = a.getOperationStatus();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].OperationStatusEn + "," + x[i].OperationStatusId );

            }
            Console.ReadLine();

            /*
            RouterService a = new RouterService();
            RouterUpdateView router = new RouterUpdateView();

            CUDView x = a.deleteRouter("555-555");
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            RouterService a = new RouterService();
            RouterUpdateView router = new RouterUpdateView();
            router.RouterId = "555-555";
            router.RouterStatus = 2;
            router.OperationStatusId = 1;

            CUDView x = a.updateRouter(router);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            RouterService a = new RouterService();
            List<RouterView> x = a.SearchData("-2");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Operation + "," + x[i].OperationSatusEN + "," + x[i].Process + "," + x[i].Product + "," + x[i].Recipe + "," + x[i].Router
                    + "," + x[i].RouterStatusEn + "," + x[i].SessionModeEn + "," + x[i].Upn);

            }
            Console.ReadLine();

            /*
            //getRecipeData
            RouterService a = new RouterService();
            List<RouterView> x = a.getRouter();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Operation + "," + x[i].OperationStatusEN + "," + x[i].Process + "," + x[i].Product + "," + x[i].Recipe + "," + x[i].Router
                    + "," + x[i].RouterStatusEn + "," + x[i].SessionModeEn + "," + x[i].Upn );

            }
            Console.ReadLine();

            /*
               //getRecipeData
               RecipeService a = new RecipeService();
               List<RecipeView>  x = a.searchRecipeByOperation (2);
               for (int i = 0; i < x.Count; i++)
               {
               Console.WriteLine(x[i].Enabled + "," + x[i].Operation + "," + x[i].Process + "," + x[i].Product + "," + x[i].Recipe + "," + x[i].Id);

               }
            Console.ReadLine();

               /* UpnService a = new UpnService();
            List<UpnView> x = a.searchUpn("111");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Product + "," + x[i].UpnId + "," + x[i].UPNStatus);

            }
            Console.ReadLine();

              /*
            RecipeService a = new RecipeService();
            RecipeEquipmentInsertView recipe = new RecipeEquipmentInsertView();
            recipe.EquipmentId = "1";
            recipe.Link = true;
            recipe.OperationId = 5;
            recipe.RecipeId = 87;
            CUDView x = a.insertRecipeEquipment(recipe);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            UpnService a = new UpnService();
            UpnUpdateView upn = new UpnUpdateView();
            CUDView x = a.deleteUpn("4000411-02");
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*

            UpnService a = new UpnService();
            UpnUpdateView upn = new UpnUpdateView();
            upn.UpnId="3";
            upn.idProduct=3;
            upn.UpnStatus=true;
            upn.ProductName="update";

            CUDView x = a.updateUpn(upn);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete+ "," + x.errorMessage);
            Console.ReadLine();

            /*
            UpnService a = new UpnService();
            List<UpnOperationView> x = a.getUpnOperationbyProcess(1);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Enable + "," + x[i].Operation + "," + x[i].Order);

            }
            Console.ReadLine();

            /*
            UpnService a = new UpnService();
            UpnInsertView upn = new UpnInsertView();
            upn.ProductLineId = 2;
            upn.UpnId = "3213212-456";
            upn.UPNStatus = true;
            CUDView x = a.insertUpn(upn);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete+ "," + x.errorMessage);
            Console.ReadLine();

            /*
            UpnService a = new UpnService();
            List<UpnView> x = a.getUpn();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Product + "," + x[i].UpnId + "," + x[i].UPNStatus);

            }
            Console.ReadLine();

            /*
            RecipeService a = new RecipeService();
            List<RecipeView> x = a.searchRecipe("ame1");
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Enabled + "," + x[i].Operation + "," + x[i].Process + "," + x[i].Product + "," + x[i].Recipe + "," + x[i].Id);

            }
            Console.ReadLine();

            /*

              RecipeService a = new RecipeService();
              RecipeUpdateView recipe = new RecipeUpdateView();
            recipe.RecipeId=23;
            recipe.ProcessId=9;
            recipe.RecipeProcessId=300;
            recipe.OperationId=9;
            recipe.RecipeStatus=1;
            CUDView x = a.updateRecipe(recipe);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete+ "," + x.errorMessage);
            Console.ReadLine();

            /*

            RecipeService a = new RecipeService();
            List<RecipeEquipmentView> x = a.getEquipmentByOperation(1);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Link + "," + x[i].ID + "," + x[i].EquipmentName);
            }

            Console.ReadLine();

            /*
            RecipeService a = new RecipeService();
            List<RecipeParameterView> x = a.getParameterByProcess(2);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Parameter + "," + x[i].Unit + "," + x[i].Value);
            }

            Console.ReadLine();

            /*
            //getRecipeProcessForProduct
            RecipeService a = new RecipeService();
            List<RecipeProcessView> x = a.getRecipeProcessForProduct(66);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].ProcessId + "," + x[i].ProcessName);
            }

            Console.ReadLine();

            /*
            //getRecipeOperationForProcess
            RecipeService a = new RecipeService();
            List<RecipeOperationView> x = a.getRecipeOperationForProcess(2);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].OperationId + "," + x[i].OperationName);

            }

            Console.ReadLine();
            /*
            //getRecipeParameterData
            RecipeService a = new RecipeService();
            List<ProductsView> x = a.getProducts();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Product + "," + x[i].ProductLineId );

            }
            Console.ReadLine();

            /*
            //deleteRecipe
            RecipeService a = new RecipeService();
            CUDView x = a.deleteRecipe(54);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete+ "," + x.errorMessage);
            Console.ReadLine();

               /*

            //RecipeInsertView
               RecipeService a = new RecipeService();
            RecipeInsertView recipe = new RecipeInsertView();
            recipe.ProcessId= 4;
            recipe.RecipeProcessId = 24;
            recipe.OperationId= 2;
            recipe.RecipeStatus = 0;
            CUDView x = a.insertRecipe(recipe);
            Console.WriteLine(x.insert + "," + x.insertPK + "," + x.update + "," + x.delete + "," + x.errorMessage);
            Console.ReadLine();

            /*
            RecipeService a = new RecipeService();
            List<RecipeEquipmentView> x = a.getRecipeEquipmentData(3);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].EquipmentName + "," + x[i].ID + "," + x[i].Link);

            }
            Console.ReadLine();
            /*
            //getRecipeParameterData
            RecipeService a = new RecipeService();
            List<RecipeParameterView> x = a.getRecipeParameterData(3);
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Parameter + "," + x[i].Unit + "," + x[i].Value);

            }
             Console.ReadLine();

               /*
            //getRecipeData
            RecipeService a = new RecipeService();
            List<RecipeView>  x = a.getRecipeData();
            for (int i = 0; i < x.Count; i++)
            {
                Console.WriteLine(x[i].Enabled + "," + x[i].Operation + "," + x[i].Process + "," + x[i].Product + "," + x[i].Recipe + "," + x[i].Id);

            }
             Console.ReadLine();
               */
        }
        private void getData()
        {
            ReportDataView data = (ReportDataView)HttpContext.Current.Session["ReportData"];

            if (data != null)
            {
                RecipeReportService recipeService = new RecipeReportService();

                bool F = data.FilterEnabled;

                if (F == false)//ok
                {
                    fillTable(recipeService.getRecipeReportNoFilter());
                }
                else
                {
                    fillTable(recipeService.getRecipeReportFilterByCriteria(data));
                }
            }
            else
            {
                GridView3.DataSource = null;
                GridView3.DataBind();
            }
        }