Exemple #1
0
        private void UpdateSODiscount()
        {
            SOReturnDetails clsSOReturnDetails = new SOReturnDetails();

            clsSOReturnDetails.CreditMemoID    = Convert.ToInt64(lblCreditMemoID.Text);
            clsSOReturnDetails.DiscountApplied = Convert.ToDecimal(txtSODiscountApplied.Text);
            clsSOReturnDetails.DiscountType    = (DiscountTypes)Enum.Parse(typeof(DiscountTypes), cboSODiscountType.SelectedItem.Value);

            SOReturns clsSOReturns = new SOReturns();

            clsSOReturns.UpdateDiscount(clsSOReturnDetails.CreditMemoID, clsSOReturnDetails.DiscountApplied, clsSOReturnDetails.DiscountType);
            clsSOReturns.SynchronizeAmount(Convert.ToInt64(lblCreditMemoID.Text));
            clsSOReturnDetails = clsSOReturns.Details(Convert.ToInt64(lblCreditMemoID.Text));
            clsSOReturns.CommitAndDispose();

            UpdateFooter(clsSOReturnDetails);
        }