You would use LINQ to get the data you need and then just update the table.
Depending on the context, you may or may not need a transaction scope.
So for example:
Erp.Tables.QuoteDtl QuoteDtl;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
QuoteDtl = (from QuoteDtl_row in Db.QuoteDtl where QuoteDtl.QuoteNum == <some quote num> && QuoteDtl.QuoteLine == <some line num> select QuoteDtl_row).FirstOrDefault();
If (QuoteDtl != null)
{
QuoteDtl.Number02 = ttQuoteDtl.Number02; /* you would have already used LINQ to query ttQuoteDtl */
Db.Validate(QuoteDtl);
}
txscope1 .Complete();
}
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:c1f169.png@5fb40a04.44b66cf0]
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: Thursday, April 09, 2015 9:41 AM
To: vantage@yahoogroups.com
Subject: [Vantage] 4GL to C# Question
I have recently been performing a E10 upgrade and there is something in progress that doesn't go over to C#, at least, I don't know how. Does anyone know how to take this line of code:
Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:Handle, 'Number02',ttQuoteDtl.Number02).
and make it C#?
I tried the ICE3 Migration tool, and it gives me this:
Services.Lib.UpdateTableBuffer._UpdateTableBuffer(OrderDtl, "Number02", (decimal)ttQuoteDtl_xRow["Number02"]);
however, the compiler throws the error:
Error CS0103: The name 'Services' does not exist in the current context [Quote.CreateOrder.cs(446,13)]
. Any ideas?
[Non-text portions of this message have been removed]
Depending on the context, you may or may not need a transaction scope.
So for example:
Erp.Tables.QuoteDtl QuoteDtl;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
QuoteDtl = (from QuoteDtl_row in Db.QuoteDtl where QuoteDtl.QuoteNum == <some quote num> && QuoteDtl.QuoteLine == <some line num> select QuoteDtl_row).FirstOrDefault();
If (QuoteDtl != null)
{
QuoteDtl.Number02 = ttQuoteDtl.Number02; /* you would have already used LINQ to query ttQuoteDtl */
Db.Validate(QuoteDtl);
}
txscope1 .Complete();
}
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:c1f169.png@5fb40a04.44b66cf0]
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: Thursday, April 09, 2015 9:41 AM
To: vantage@yahoogroups.com
Subject: [Vantage] 4GL to C# Question
I have recently been performing a E10 upgrade and there is something in progress that doesn't go over to C#, at least, I don't know how. Does anyone know how to take this line of code:
Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:Handle, 'Number02',ttQuoteDtl.Number02).
and make it C#?
I tried the ICE3 Migration tool, and it gives me this:
Services.Lib.UpdateTableBuffer._UpdateTableBuffer(OrderDtl, "Number02", (decimal)ttQuoteDtl_xRow["Number02"]);
however, the compiler throws the error:
Error CS0103: The name 'Services' does not exist in the current context [Quote.CreateOrder.cs(446,13)]
. Any ideas?
[Non-text portions of this message have been removed]