예제 #1
0
        private void grv_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            int    qty = 0;
            double prc = 0;

            switch (e.Column.Caption)
            {
            case "Particulars":
                int PID = Convert.ToInt32(grv.GetFocusedRowCellValue(colPID));
                wrProducts.Server2Client spc = new wrProducts.Server2Client();
                wrProducts.wsProducts    prd = new wrProducts.wsProducts();
                wrProducts.Product       p   = new wrProducts.Product();
                p = prd.GetProductByID(PID);
                grv.SetFocusedRowCellValue(colBVL, p.BuyingValue);
                grv.SetFocusedRowCellValue(colSVL, p.SellingValue);
                grv.UpdateCurrentRow();
                break;

            case "Quantity":
                qty = Convert.ToInt32(grv.GetFocusedRowCellValue(colQTY));
                prc = Convert.ToDouble(grv.GetFocusedRowCellValue(colSVL));
                grv.SetFocusedRowCellValue(colAMT, qty * prc);
                grv.UpdateCurrentRow();
                break;

            case "Rate":
                qty = Convert.ToInt32(grv.GetFocusedRowCellValue(colQTY));
                prc = Convert.ToDouble(grv.GetFocusedRowCellValue(colSVL));
                grv.SetFocusedRowCellValue(colAMT, qty * prc);
                grv.UpdateCurrentRow();
                break;
            }
        }
예제 #2
0
        private void luePNM1_EditValueChanged(object sender, EventArgs e)
        {
            if (luePNM1.EditValue != null)
            {
                int pid = Convert.ToInt32(luePNM1.EditValue);
                wrProducts.Server2Client s2c = new wrProducts.Server2Client();
                wrProducts.wsProducts    prd = new wrProducts.wsProducts();
                wrProducts.Product       p   = new wrProducts.Product();
                p = prd.GetProductByID(pid);

                txtBVL1.EditValue = p.BuyingValue;
                txtSVL1.EditValue = p.SellingValue;
                txtQTY1.EditValue = 1;
            }
        }
예제 #3
0
 private void luePNM_EditValueChanged(object sender, EventArgs e)
 {
     if (luePNM.EditValue == null)
     {
         Clear();
     }
     else
     {
         int PID = Convert.ToInt32(luePNM.EditValue);
         wrProducts.Server2Client spc = new wrProducts.Server2Client();
         wrProducts.wsProducts    prd = new wrProducts.wsProducts();
         wrProducts.Product       p   = new wrProducts.Product();
         p                          = prd.GetProductByID(PID);
         BuyingValue                = p.BuyingValue;
         txtSVL.EditValue           = p.SellingValue;
         txtQTY.Properties.MaxValue = p.Quantity;
         BarCode                    = p.BarCode;
     }
 }
예제 #4
0
        private void luePRD_EditValueChanged(object sender, EventArgs e)
        {
            if (luePRD.EditValue != null)
            {
                int pid = Convert.ToInt32(luePRD.EditValue);

                wrProducts.Product p = new wrProducts.Product();
                prd = new wrProducts.wsProducts();

                p = prd.GetProductByID(pid);

                lueCAT2.EditValue = lueCAT.EditValue;

                txtPNM.Text      = p.ProductName;
                txtBVL.EditValue = p.BuyingValue;
                txtSVL.EditValue = p.SellingValue;
                txtQTY.EditValue = p.Quantity;
                txtBCD.EditValue = p.BarCode;
            }
        }