utaylor
(Utah Taylor)
1
var LaborDataSet = new Erp.Tablesets.LaborTableset();
Erp.Contracts.LaborSvcContract hLbr = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.LaborSvcContract>(Db);
string strMsg = String.Empty;
string strJobNum = String.Empty;
int lbrHedSeq = 0;
LaborDataSet = hLbr.GetByID(lbrHedSeq);
hLbr.StartActivity(lbrHedSeq, "P", ref LaborDataSet);
hLbr.DefaultOprSeq(ref LaborDataSet, xOpr, out strMsg);
hLbr.LaborRateCalc(ref LaborDataSet);
hLbr.CheckWarnings(ref LaborDataSet, out strMsg);
hLbr.SetClockInAndDisplayTimeMES(ref LaborDataSet);
hLbr.Update(ref LaborDataSet);// <------ HOW CAN I REFERENCE THE UPDATED VALUES?
I am looking for the labordtlsequence that gets generated.
josecgomez
(Jose C Gomez)
2
What do you mean the Updated Values? What are you looking for? Before the Update call or After?
utaylor
(Utah Taylor)
3
After. After the update I believe the labor dtl sequence should be generated. I need it to end the labor transaction.
josecgomez
(Jose C Gomez)
4
You can use LINQ to get the Modified Record before the call, then that record should appear updated by Reference after the Update call
Before the Update
var ld = LaborDataSet.LaborDtl.Where(r=>r.Added() || r.Updated()).FirstOrDefault();
hLbr.Update(ref LaborDataSet);
Console.WriteLine(ld.LaborDtlSeq);
utaylor
(Utah Taylor)
6
Are you implying that the hLbr.Update(ref LaborDataSet); line already has a labordtlseq when we use it in the Update method?
josecgomez
(Jose C Gomez)
7
no, but the LaborDtl record exists in the dataset and it is updated by the BO after processing.
utaylor
(Utah Taylor)
8
It worked by the way. I am using the labordtlseq you helped me get to end the labordtl transaction in another block of code.
utaylor
(Utah Taylor)
9
Okay, and since it is a ref, it updates the ld variable?