コード例 #1
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"));
        }
コード例 #2
0
        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());
        }