In progress we had code that would change a row in the database. Here is an example:
Run lib\UpdateTableBuffer.p(input Buffer PartLot:HANDLE, "LotLaborCost", vLbrCost).
Now I am aware that does not exist like that in E10, but does anyone know how to do this in a BPM in the C#/E10 way? I would greatly appreciate any help. Also when using the Progress 4GL to C#, it converted that line to this:
Services.Lib.UpdateTableBuffer._UpdateTableBuffer(PartLot, "LotLaborCost", vLbrCost);
where I get the error:
Error CS0103: The name 'Services' does not exist in the current context
Thanks in advance for any advice!
Jose C Gomez
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, Apr 15, 2015 at 11:22 AM, amathis@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p></p><p><span></span></p><p>In progress we had code that would change a row in the database. Here is an example:</p><p><br></p><p>Run lib\UpdateTableBuffer.p(input Buffer PartLot:HANDLE, "LotLaborCost", vLbrCost).</p><p><br></p><p>Now I am aware that does not exist like that in E10, but does anyone know how to do this in a BPM in the C#/E10 way? I would greatly appreciate any help. Also when using the Progress 4GL to C#, it converted that line to this:</p><p><br></p><p>Services.Lib.UpdateTableBuffer._UpdateTableBuffer(PartLot, "LotLaborCost", vLbrCost);</p><p><br></p><p>where I get the error: </p><font size="1"><p><br></p><p>Error CS0103: The name 'Services' does not exist in the current context </p><p><br></p><p><font size="2">Thanks in advance for any advice!</font></p></font><p></p> </div> <div style="color:#fff;min-height:0;"></div>
Ok, so I have this code.
PartLot = (from PartLot_Row in Db.PartLot
where (PartLot_Row.Company == Session.CompanyID) && ((PartLot_Row.PartNum == ttInvTrans_xRow.PartNum) && (PartLot_Row.LotNum == ttInvTrans_xRow.FromLotNumber))
select PartLot_Row).FirstOrDefault();
if (PartLot != null)
{
assign PartLot.ShortChar01 = "Something"
}
Like that?
or how would I do this?
Jose C Gomez
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, Apr 15, 2015 at 11:40 AM, amathis@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p></p><p>Ok, so I have this code.</p><p><br></p><p>PartLot = (from PartLot_Row in Db.PartLot<br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â where (PartLot_Row.Company == Session.CompanyID) && ((PartLot_Row.PartNum == ttInvTrans_xRow.PartNum) && (PartLot_Row.LotNum == ttInvTrans_xRow.FromLotNumber))<br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â select PartLot_Row).FirstOrDefault();<br>Â Â Â Â Â Â Â if (PartLot != null)<br>Â Â Â Â Â Â Â {</p><p>Â Â Â Â Â Â Â Â Â Â Â Â Â Â assign PartLot.ShortChar01 = "Something"</p><p>Â Â Â Â Â Â Â }</p><p><br></p><p>Like that?</p><p><br></p><p>or how would I do this?<br></p><p></p> </div><span class="ygrps-yiv-1791411966"> <div style="color:#fff;min-height:0;"></div>
Jose C Gomez
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, Apr 15, 2015 at 12:05 PM, amathis@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p>I downloaded all the epicor guids, but I don't see a programmers guide. That might of been useful. Do I get that from the EpicWeb Site?</p> </div><span class="ygrps-yiv-1792421829"> <div style="color:#fff;min-height:0;"></div>
Jose one more question. So following the example I have this so far:
var OrderDtl_UD = (from OrderDtl_Row_UD in Db.OrderDtl_UD.With(LockHint.UpdLock)
where OrderDtl.SysRowID == OrderDtl_Row_UD.ForeignSysRowID &&
OrderDtl.Company == Session.CompanyID
select OrderDtl_Row_UD).FirstOrDefault();
OrderDtl_UD.ShortChar02 = ttQuoteDtlRow.UDField<System.String>("ShortChar02");
OrderDtl_UD.Number02 = (decimal)ttQuoteDtlRow.UDField<System.String>("Number02");
Db.Validate();
however, my issue is this, I get this error message:
Error CS1061: 'Erp.ErpContext' does not contain a definition for 'OrderDtl_UD' and no extension method 'OrderDtl_UD' accepting a first argument of type 'Erp.ErpContext' could be found (are you missing a using directive or an assembly reference?) [Quote.CreateOrder.cs(449,53)]
any ideas?
Jose C Gomez
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, Apr 15, 2015 at 4:51 PM, amathis@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p></p><p>Jose one more question. So following the example I have this so far:</p><p><br></p><p>var OrderDtl_UD = (from OrderDtl_Row_UD in Db.OrderDtl_UD.With(LockHint.UpdLock)<br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â where OrderDtl.SysRowID == OrderDtl_Row_UD.ForeignSysRowID &&<br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â OrderDtl.Company == Session.CompanyID <br>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â select OrderDtl_Row_UD).FirstOrDefault();</p><p><br>Â Â Â Â Â Â Â Â Â Â Â OrderDtl_UD.ShortChar02 = ttQuoteDtlRow.UDField<System.String>("ShortChar02");<br>Â Â Â Â Â Â Â Â Â Â Â OrderDtl_UD.Number02 = (decimal)ttQuoteDtlRow.UDField<System.String>("Number02");<br>Â Â Â Â Â Â Db.Validate();</p><p><br></p><p>however, my issue is this, I get this error message: </p><font size="1"><p><br></p><p>Error CS1061: 'Erp.ErpContext' does not contain a definition for 'OrderDtl_UD' and no extension method 'OrderDtl_UD' accepting a first argument of type 'Erp.ErpContext' could be found (are you missing a using directive or an assembly reference?) [Quote.CreateOrder.cs(449,53)]</p><p><br></p></font><p>any ideas?<br></p><p></p> </div><span class="ygrps-yiv-1451545208"> <div style="color:#fff;min-height:0;"></div>