Esempio n. 1
0
        public IHttpActionResult UpdateProduct([FromBody] villageproduct product, [FromUri] int id)
        {
            string msg;
            var    data = prdctdetails.UpdateProduct(product, id);

            if (data == "Success")
            {
                msg = "Product Updated Succesfully";
            }
            else
            {
                msg = "Product is not Updated try again";
            }
            return(Json(msg));
        }
Esempio n. 2
0
        public IHttpActionResult AddProduct([FromBody] villageproduct product)
        {
            string msg;
            var    data = prdctdetails.InsertProduct(product);

            if (data == "Success")
            {
                msg = "Product Added Succesfully";
            }
            else
            {
                msg = "Product is not added try again";
            }
            return(Json(msg));
        }