예제 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (!dxVP.Validate())
            {
                return;
            }

            wrProducts.Product p = new wrProducts.Product();
            p.ProductID    = Convert.ToInt32(luePRD.EditValue);
            p.CategoryID   = Convert.ToInt32(lueCAT2.EditValue);
            p.ProductName  = txtPNM.EditValue.ToString();
            p.BuyingValue  = Convert.ToDouble(txtBVL.EditValue);
            p.SellingValue = Convert.ToDouble(txtSVL.EditValue);
            p.Quantity     = Convert.ToInt32(txtQTY.EditValue);
            p.BarCode      = txtBCD.Text;

            sc  = new wrProducts.Server2Client();
            prd = new wrProducts.wsProducts();
            sc  = prd.updateProduct(p);
            if (sc.Message != null)
            {
                XtraMessageBox.Show(sc.Message);
            }
            else
            {
                DialogResult = DialogResult.OK;
            }
        }