locked
How to write code for previous transaction RRS feed

  • Question

  • Hi,

    I have this code currently : 

    if (_isEditable)
       Endorsements.Clear();

    Meaning whenever I raised a quotation and being approved, and being edited again and sent for approve, all my saved endorsements will be cleared.

    Now I would like to change the code if the quotation is already approved, then being edited and sent for approval -- I still wants my endorsements remain there. The clear only need to happen when the ProposalStatus is Incomplete.

    I am doing the checking in this way --> If _isEditable true and previous last transaction proposal status is Approved, don;t clear the endorsement.

    Is this right?

           

    if (_isEditable && previouslasttransaction=Approved)
    {

    }

    else

    {

       Endorsements.Clear();
    }

    How to write the previous last transaction? Am I supposed to get it from the ProposalID?



    Durga

    Friday, July 22, 2016 7:25 AM

Answers

  • We need to see more of your code. I have no idea what "transaction" you're talking about, so I do not know what "previouslasttransaction" is. Nor, do we know what "ProposalID" is ... I'm assuming that some of this is in your Endorsements class?

    But, again, we definitely need to see some more of your code, with maybe some further explanation of your process...


    ~~Bonnie DeWitt [C# MVP]

    http://geek-goddess-bonnie.blogspot.com

    • Proposed as answer by DotNet Wang Friday, July 29, 2016 7:10 AM
    • Marked as answer by DotNet Wang Friday, August 5, 2016 7:37 AM
    Sunday, July 24, 2016 4:59 PM

All replies

  • Since this is C# I am moving your question to the C# forum.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, July 22, 2016 9:46 AM
  • We need to see more of your code. I have no idea what "transaction" you're talking about, so I do not know what "previouslasttransaction" is. Nor, do we know what "ProposalID" is ... I'm assuming that some of this is in your Endorsements class?

    But, again, we definitely need to see some more of your code, with maybe some further explanation of your process...


    ~~Bonnie DeWitt [C# MVP]

    http://geek-goddess-bonnie.blogspot.com

    • Proposed as answer by DotNet Wang Friday, July 29, 2016 7:10 AM
    • Marked as answer by DotNet Wang Friday, August 5, 2016 7:37 AM
    Sunday, July 24, 2016 4:59 PM