public ActionResult GetTypes()
 {
     Hydro.HydroService theHydro     = new Hydro.HydroService();
     Hydro.SiteType[]   theSiteTypes = theHydro.GetSiteTypes();
     ViewBag.SiteTypes = theSiteTypes;
     return(View());
 }
Exemple #2
0
        public ActionResult Hello()
        {
            Hydro.HydroService theHydro = new Hydro.HydroService();
            string             ss       = theHydro.Hello("test");

            ViewBag.ss = ss;
            return(View());
        }
        public ActionResult GetVariables()
        {
            const int TYPE_AGK = 6;

            Hydro.HydroService theHydro     = new Hydro.HydroService();
            Hydro.Variable[]   theVariables = theHydro.GetSiteTypeVariables(TYPE_AGK, true);
            ViewBag.Variables = theVariables;
            return(View());
        }
        public ActionResult GetSites(int TypeId = 0)
        {
            Hydro.HydroService theHydro = new Hydro.HydroService();
            Hydro.Site[]       theSites;
            if (TypeId > 0)
            {
                theSites = theHydro.GetSiteList(TypeId, true);
            }
            else
            {
                theSites = theHydro.GetSiteList(null, true);
            }
            ViewBag.Sites = theSites;

            return(View());
        }
Exemple #5
0
        public JsonResult GetSites()
        {
            List <amurportal.Models.Site> theSites = new List <amurportal.Models.Site>();

            Hydro.HydroService theHydro = new Hydro.HydroService();
            Hydro.Site[]       _sites   = theHydro.GetSiteList(null, true);

            if (_sites != null)
            {
                foreach (var site in _sites)
                {
                    amurportal.Models.Site _site = new amurportal.Models.Site(site);

                    theSites.Add(_site);
                }
            }

            return(Json(theSites, JsonRequestBehavior.AllowGet));
        }
Exemple #6
0
        public ActionResult GetSiteParams(int SiteId)
        {
            Hydro.HydroService theHydro = new Hydro.HydroService();

            Hydro.Site[] _sites = theHydro.GetSiteList(null, true);

            if (_sites != null)
            {
                foreach (var site in _sites)
                {
                    if (site.SiteId == SiteId)
                    {
                        Models.Site theSite = new Models.Site(site);
                        return(View(theSite));
                    }
                }
            }

            return(View());
        }