private KeyValuePairItems GetConfigurations()
        {
            var configurations = new KeyValuePairItems
            {
                new KeyValuePairItem("ORDERTYPE", ORDERTYPE),
                new KeyValuePairItem("LOCATION", LOCATION),
                new KeyValuePairItem("FR", FR),
                new KeyValuePairItem("FROMDATE", FROMDATE),
                new KeyValuePairItem("TODATE", TODATE)
            };

            if (txtFromDate.Text.Trim() == string.Empty || txtToDate.Text.Trim() == string.Empty)
            {
                var configuration = configurations.Where(x => x.Key == "FROMDATE");
                if (configuration.Any())
                {
                    configuration.FirstOrDefault().Value = string.Empty;
                }
                configuration = configurations.Where(x => x.Key == "TODATE");
                if (configuration.Any())
                {
                    configuration.FirstOrDefault().Value = string.Empty;
                }
            }

            return(configurations);
        }
        private KeyValuePairItems GetConfigurations()
        {
            if (STAGE == "01")
            {
                FILTER = "FRFC";
            }
            else if (STAGE == "02")
            {
                FILTER = "FRFC";
            }
            else if (STAGE == "03")
            {
                FILTER = "GP";
            }
            else if (STAGE == "04")
            {
                FILTER = "C0";
            }
            else if (STAGE == "05")
            {
                FILTER = "XR";
            }
            else if (STAGE == "11")
            {
                FILTER = "OA";
            }

            var configurations = new KeyValuePairItems
            {
                new KeyValuePairItem("ORDERTYPE", ORDERTYPE),
                //new KeyValuePairItem("TYPE", TYPE),
                //new KeyValuePairItem("STAGE", STAGE),
                new KeyValuePairItem("LOCATION", LOCATION),
                new KeyValuePairItem("FILTER", FILTER),
                new KeyValuePairItem("FR", FR),
                new KeyValuePairItem("FROMDATE", FROMDATE),
                new KeyValuePairItem("TODATE", TODATE)
            };

            if (txtFromDate.Text.Trim() == string.Empty || txtToDate.Text.Trim() == string.Empty)
            {
                var configuration = configurations.Where(x => x.Key == "FROMDATE");
                if (configuration.Any())
                {
                    configuration.FirstOrDefault().Value = string.Empty;
                }
                configuration = configurations.Where(x => x.Key == "TODATE");
                if (configuration.Any())
                {
                    configuration.FirstOrDefault().Value = string.Empty;
                }
            }
            return(configurations);
        }
Пример #3
0
        private KeyValuePairItems GetConfigurations()
        {
            if (TEAM == "06")
            {
                LOGGED = Constants.TRNLogedOFF;
                FILTER = Constants.VerificationDeviation;
            }
            else if (TEAM == "07")
            {
                LOGGED = Constants.TRNInProcessOFF;
                FILTER = Constants.VerificationDeviation;
                ORDCAT = Constants.DeviationType;
            }
            else if (TEAM == "08")
            {
                //FILTER = Constants.VerificationDeviation;
                FILTER = Constants.OrderingType;
                ddlStage_SelectedIndexChanged(this, EventArgs.Empty);
                chkPending_CheckedChanged(this, EventArgs.Empty);
                chkDeviation_CheckedChanged(this, EventArgs.Empty);
            }
            else if (TEAM == "09")
            {
                FILTER = Constants.TxnDebriefingType;
            }
            else if (TEAM == "10")
            {
                FILTER = Constants.TxnTrackingType;
                ddlStage_SelectedIndexChanged(this, EventArgs.Empty);
                chkClosed_CheckedChanged(this, EventArgs.Empty);
            }
            else if (TEAM == "12")
            {
                //FILTER = Constants.GPRSC09;
                CATEGORY = "01";
                ddlStage_SelectedIndexChanged(this, EventArgs.Empty);
                chkGPRSPending_CheckedChanged(this, EventArgs.Empty);
            }
            else if (TEAM == "13")
            {
                //FILTER = Constants.GPRSC09;
                CATEGORY = "02";
                ddlStage_SelectedIndexChanged(this, EventArgs.Empty);
                chkGPRSPending_CheckedChanged(this, EventArgs.Empty);
            }


            var configurations = new KeyValuePairItems
            {
                new KeyValuePairItem("LOGGED", LOGGED),
                new KeyValuePairItem("STAGE", STAGE),
                new KeyValuePairItem("FILTER", FILTER),
                new KeyValuePairItem("CATEGORY", CATEGORY),
                new KeyValuePairItem("LOCATION", LOCATION),
                new KeyValuePairItem("SR", SR),
                new KeyValuePairItem("FROMDATE", FROMDATE),
                new KeyValuePairItem("TODATE", TODATE),

                new KeyValuePairItem("STATUS", STATUS),

                new KeyValuePairItem("ORDCAT", ORDCAT),

                new KeyValuePairItem("PENDING_ORD", PENDING_ORD),

                new KeyValuePairItem("TYPE", TYPE),
            };

            if (txtFromDate.Text.Trim() == string.Empty || txtToDate.Text.Trim() == string.Empty)
            {
                var configuration = configurations.Where(x => x.Key == "FROMDATE");
                if (configuration.Any())
                {
                    configuration.FirstOrDefault().Value = string.Empty;
                }
                configuration = configurations.Where(x => x.Key == "TODATE");
                if (configuration.Any())
                {
                    configuration.FirstOrDefault().Value = string.Empty;
                }
            }
            return(configurations);
        }