Exemplo n.º 1
0
        protected void btnOrder_Click(object sender, EventArgs e)
        {
            string str_productId = txtProductID.Text;
            string str_quantity  = txtQuantity.Text;

            // Dari session di cast ke User terus diambil Id nya
            int userId = ((User)Session["user"]).Id;

            string response = CartController.CheckInsert(userId, str_productId, str_quantity);

            if (response == "")
            {
                lblError.Text = "";
                FillGrid();
            }
            else
            {
                lblError.Text = response;
            }
        }