public ViewModel_Index Index()
        {
            GrowBl bl            = new GrowBl();
            var    firstPageData = bl.GetFirstPageData();

            return(firstPageData);
        }
Example #2
0
        public ActionResult Index()
        {
            GrowBl bl            = new GrowBl();
            var    firstPageData = bl.GetFirstPageData();

            return(View(firstPageData));
        }
Example #3
0
        public RedirectToRouteResult Create(string id, string weight)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Index"));
            }

            Models.PersonRecord toinsert = new Models.PersonRecord(0, Convert.ToInt32(id), "", Convert.ToDecimal(weight), 0, DateTime.Now, "");

            GrowBl insertHandler = new GrowBl();

            insertHandler.InsertNewData(toinsert);

            return(RedirectToAction("Index"));
        }
Example #4
0
 public ActionResult Detail(string id)
 {
     if (string.IsNullOrEmpty(id))
     {
         return(View());
     }
     else
     {
         int    person  = Convert.ToInt32(id);
         GrowBl bl      = new GrowBl();
         var    alldata = bl.GetPersonAllData(person);
         ViewBag.Message = alldata[0].Name + "'s  Weight Tracking";
         return(View(alldata));
     }
 }
        public string Create([FromBody] NewData newdata)
        {
            if (newdata == null || newdata.id == 0)
            {
                return("");
            }


            PersonRecord toinsert = new PersonRecord(0, newdata.id, "", newdata.weight, 0, DateTime.Now, "");

            GrowBl insertHandler = new GrowBl();

            insertHandler.InsertNewData(toinsert);


            return(newdata.weight.ToString());
        }
        public List <PersonRecord> Detail(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(null);
            }
            else
            {
                var result = new PersonDetailJsonModel();

                int    person  = Convert.ToInt32(id);
                GrowBl bl      = new GrowBl();
                var    alldata = bl.GetPersonAllData(person);

                return(alldata);
            }
        }