public double ShelfLife(ShelfLife shelflife)
        {
            //[2:26 PM, 12/19/2018] Ahmad Saleem Gcu:
            //
            //{ "ClassName":"SClass", "CategoryName":"SCateg","GroupName":"SGroup", "ShopCode":1,"Season":"SSeason", "SalePrice":1000  }
            var sz = JsonConvert.SerializeObject(shelflife);

            return(calllocalApi(sz, "http://127.0.0.1:5000/api/PredictShelfLife"));
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            // shelf life
            ShelfLife shelflife = new ShelfLife();
            CallAPI   callapi   = new CallAPI();

            shelflife.ShopCode     = int.Parse(m1ShopeCode.Text);
            shelflife.SalePrice    = int.Parse(m1SalePrice.Text);
            shelflife.Season       = m1Season.Text;
            shelflife.GroupName    = m1GroupName.Text;
            shelflife.CategoryName = m1CategoryName.Text;
            shelflife.ClassName    = m1ClassName.Text;
            double sf = callapi.ShelfLife(shelflife);

            Pshelflife.Text = sf.ToString();
        }