E10: Comparing RowMod in BPM

Thanks Jose.
I’m grateful the detailed explanation.

I will continue to leave the converted code alone but I may consider option two when typing new code to make it “easier”.





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:14f6e0.png@c8a71213.49b1624a]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, December 17, 2014 2:51 PM
To: Vantage
Subject: Re: [Vantage] E10: Comparing RowMod in BPM


"Technically" speaking since you are using Strings there is no real difference however

in .NET C# when you use the == operator it compares the values of the objects by using the override implementation of System.Object.ReferenceEquals however since String's override implementation of said virtual method already compares the contents of the string you should have no issue using version 2.

This could be a problem if you were not using strings and comparing objects which may have a different implementation of the virtual method.

However I would use the second options and not the third solely because if at some point in the future epicor goes away from "A" , "U" the second implementation would continue to work while the last implementation would no longer.


Thanks!



Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, Dec 17, 2014 at 2:39 PM, Joe Rojas jrojas@...<mailto:jrojas@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:


Hi All,

For the most part, I have been using the ABL converter to do the heavy lifting with converting our BPMS from E9 to E10.

One thing that I’ve been curious about is that is always does the following when we need to look for the row that was changed, added, or deleted.

foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where string.Equals(ttOHOrderMsc_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase)
|| string.Equals(ttOHOrderMsc_Row.RowMod, IceRow.ROWSTATE_UPDATED, StringComparison.OrdinalIgnoreCase)
select ttOHOrderMsc_Row))

If seems over complicated when compared to:
foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where ttOHOrderMsc_Row.RowMod == IceRow.ROWSTATE_ADDED
|| ttOHOrderMsc_Row.RowMod == IceRow.ROWSTATE_UPDATED
select ttOHOrderMsc_Row))

or even:
foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where ttOHOrderMsc_Row.RowMod == “A”
|| ttOHOrderMsc_Row.RowMod == “U”
select ttOHOrderMsc_Row))

Is there a benefit to following what the converter is doing and use the string.Equals() approach or are all three the equivalent and there is no real difference?





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291<tel:781-573-0291> | cell: 781-408-9278<tel:781-408-9278> | fax: 781-232-5191<tel:781-232-5191>

addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring

[cid:59b428.png@4cb07a91.4c9e5946]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]
Hi All,

For the most part, I have been using the ABL converter to do the heavy lifting with converting our BPMS from E9 to E10.

One thing that I’ve been curious about is that is always does the following when we need to look for the row that was changed, added, or deleted.

foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where string.Equals(ttOHOrderMsc_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase)
|| string.Equals(ttOHOrderMsc_Row.RowMod, IceRow.ROWSTATE_UPDATED, StringComparison.OrdinalIgnoreCase)
select ttOHOrderMsc_Row))

If seems over complicated when compared to:
foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where ttOHOrderMsc_Row.RowMod == IceRow.ROWSTATE_ADDED
|| ttOHOrderMsc_Row.RowMod == IceRow.ROWSTATE_UPDATED
select ttOHOrderMsc_Row))

or even:
foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where ttOHOrderMsc_Row.RowMod == “A”
|| ttOHOrderMsc_Row.RowMod == “U”
select ttOHOrderMsc_Row))

Is there a benefit to following what the converter is doing and use the string.Equals() approach or are all three the equivalent and there is no real difference?





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:59b428.png@4cb07a91.4c9e5946]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.




[Non-text portions of this message have been removed]
"Technically" speaking since you are using Strings there is no real difference however

in .NET C# when you use the == operator it compares the values of the objects by using the override implementation of System.Object.ReferenceEquals however since String's override implementation of said virtual method already compares the contents of the string you should have no issue using version 2.

This could be a problem if you were not using strings and comparing objects which may have a different implementation of the virtual method.

However I would use the second options and not the third solely because if at some point in the future epicor goes away from "A" , "U" the second implementation would continue to work while the last implementation would no longer.


Thanks!



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Dec 17, 2014 at 2:39 PM, Joe Rojas jrojas@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Hi All,


For the most part, I have been using the ABL converter to do the heavy lifting with converting our BPMS from E9 to E10.

One thing that I’ve been curious about is that is always does the following when we need to look for the row that was changed, added, or deleted.

foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where string.Equals(ttOHOrderMsc_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase)
|| string.Equals(ttOHOrderMsc_Row.RowMod, IceRow.ROWSTATE_UPDATED, StringComparison.OrdinalIgnoreCase)
select ttOHOrderMsc_Row))

If seems over complicated when compared to:
foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where ttOHOrderMsc_Row.RowMod == IceRow.ROWSTATE_ADDED
|| ttOHOrderMsc_Row.RowMod == IceRow.ROWSTATE_UPDATED
select ttOHOrderMsc_Row))

or even:
foreach (var ttOHOrderMsc_iterator in (from ttOHOrderMsc_Row in ttOHOrderMsc
where ttOHOrderMsc_Row.RowMod == “A”
|| ttOHOrderMsc_Row.RowMod == “U”
select ttOHOrderMsc_Row))

Is there a benefit to following what the converter is doing and use the string.Equals() approach or are all three the equivalent and there is no real difference?





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:59b428.png@4cb07a91.4c9e5946]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.



[Non-text portions of this message have been removed]

</div>
 


<div style="color:#fff;min-height:0;"></div>