コード例 #1
0
        private void btnAddToCart_Click(object sender, EventArgs e)
        {
            DataRow row = CartTable.NewRow();

            row["ProductCode"] = searchLookUpMedicine.EditValue.ToString();
            row["ProductName"] = searchLookUpMedicine.Properties.View.GetFocusedDisplayText();
            row["Qty"]         = txtQuantity.Text;

            CartTable.Rows.Add(row);
            searchLookUpMedicine.Text = "";
            txtQuantity.Text          = "";
            searchLookUpMedicine.Focus();
        }
コード例 #2
0
ファイル: cart.cs プロジェクト: Pawankhosa/Englishtree_new
    protected void AddProduct(string id, string itemcode, int productid, string description, decimal price, int qty, string imagefile, string imagefile2)
    {
        DataTable dt = new DataTable();

        dr                = CartTable.NewRow();
        dr["id"]          = id;
        dr["itemcode"]    = itemcode;
        dr["productid"]   = productid;
        dr["imagefile"]   = imagefile;
        dr["description"] = description;
        dr["qty"]         = qty;
        dr["price"]       = price;
        dr["Total"]       = price;
        dr["imagefile2"]  = imagefile2;

        CartTable.Rows.Add(dr);


        addCartItemToTable(dr);

        HttpContext.Current.Session["carttable"] = CartTable;
    }