예제 #1
0
    protected void RadComboBox2_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        if (this.KeyID == 0)
        {
            mesOrderDetail.InnerText = "(Phải lưu thông tin đơn hàng trước khi thêm sản phẩm !)";
            return;
        }
        mesOrderDetail.InnerText = "";
        DAOrderDetailt daOrderDetailt = new DAOrderDetailt();
        int            ProductID      = int.Parse(sProfuctSearch.SelectedValue);
        int            Quatity        = 1;

        daOrderDetailt.USP_OrderDetailt_AddProduct(ProductID, Quatity, this.KeyID);

        LoadDataOrderDetailt();
        LoadData();

        fTotalNeedPay.Value = fTotalPrice.Value + fShippingPrice.Value - fDiscount.Value;

        string searchValue = Session["searchValue"] == null ? "" : Session["searchValue"].ToString();

        LoadDataProductList(searchValue);
    }
예제 #2
0
    public void UpdateQuality_CLick(object sender, EventArgs e)
    {
        int lKeyID = 0;

        foreach (GridDataItem item in RadGrid_OrderDetailt.Items)
        {
            try
            {
                lKeyID = int.Parse(item.GetDataKeyValue(RadGrid_OrderDetailt.MasterTableView.DataKeyNames[0]).ToString());
                RadNumericTextBox fQuanlity = (RadNumericTextBox)item.FindControl("fQuatity");

                DAOrderDetailt daOrderDetailt = new DAOrderDetailt();
                daOrderDetailt.USP_OrderDetailt_UpdateQuatity(lKeyID, int.Parse(fQuanlity.Text));
            }
            catch
            {
                break;
            }
        }


        LoadData();
        LoadDataOrderDetailt();
    }