Esempio n. 1
0
        public ActionResult Index(string Select1, string Select2)
        {
            ClassToun.CreateListToun();
            SelectList list = new SelectList(Countrys, "Code", "Country", Select1);

            Toun = ClassToun.DefaultListToun(listH, Select1);
            bool ret = false;

            foreach (ClassToun buff in Toun)
            {
                if (buff.Code == Select2)
                {
                    ret = true;
                }
            }
            SelectList list1 = new SelectList(Toun, "Code", "Toun", (!ret) ? Toun[0].Code : Select2);
            string     ss = list1.SelectedValue.ToString();
            string     ts = "5";
            string     timeStr = "", ColorStr = "", hintStr = "", LevelStr = "", titleStr = "";
            int        res = GetRecvest(ss, ts, ref timeStr, ref ColorStr, ref hintStr, ref LevelStr, ref titleStr);

            ViewBag.CountryList = list;
            ViewBag.TounList    = list1;

            ViewBag.Time      = timeStr;
            ViewBag.Level     = LevelStr;
            ViewBag.color     = ColorStr;
            ViewBag.Hint      = hintStr;
            ViewBag.TitleToun = titleStr;
            if (res == -1)
            {
                ViewBag.Error = "Данные какимто образом не коректны";
            }
            return(View());
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            ClassToun.CreateListToun();
            SelectList list = new SelectList(Countrys, "Code", "Country", Countrys[0].Code);

            SelectList list1 = new SelectList(Toun, "Code", "Toun", Toun[1].Code);
            string     ss = list1.SelectedValue.ToString();
            string     ts = "5";
            string     timeStr = "", ColorStr = "", hintStr = "", LevelStr = "", titleStr = "";
            int        res = GetRecvest(ss, ts, ref timeStr, ref ColorStr, ref hintStr, ref LevelStr, ref titleStr);

            ViewBag.CountryList = list;
            ViewBag.TounList    = list1;

            ViewBag.Time      = timeStr;
            ViewBag.Level     = LevelStr;
            ViewBag.color     = ColorStr;
            ViewBag.Hint      = hintStr;
            ViewBag.TitleToun = titleStr;
            //if(res>0)
            return(View());
        }