This is exactly what I need, the only issue I’m having is converting AssemblySeq and OprSeq to integers. Example: int asm = view.dataView[view.Row]["AssemblySeq"].???
SearchOptions optsTrans = new SearchOptions(SearchMode.AutoSearch);
optsTrans.PageSize = 100; //return this many (can call more later)
string whereTrans = string.Format("JobNum = '{0}'" , JobEdit.Text);
optsTrans.NamedSearch.WhereClauses.Add("JobOper",whereTrans);
var trans =myAdapter.GetRows(optsTrans,out more);
I’m going to open this one up again…an issue I’ve noticed is that because it’s triggered by AfterRowChange, it won’t work if there is only one row (one job clocked in).
Maybe you could add another condition to handle when the first row is added. You could use EpiViewNotification event. Condition AddRow event and a RowCount = 1
I’ve grappled with this for a while now, looking at quite a few threads, and I’m not sure how to get the RowCount. It looks like it’s an attribute of the DataView, but not sure on the syntax.
Hmmmm…the code is compiling, but it’s not triggering when I clock in to a job, and it’s not triggering if I login when there is a job already clocked in. Is there an event that fires when a row is clicked, even if it doesn’t change?
I ran a check on MESMenu_Load and the message box isn’t showing up.
var view = ((EpiDataView)(this.oTrans.EpiDataViews["LaborDtl"]));
if (view.dataView.Count == 1)
{
MessageBox.Show("!!!");
}
Sorry late to party on this one but what is it specifically that you are trying to achieve Fred as I had to do something similar.
Our scenario we wanted the comment text to appear on screen and require clicking ok when the operator logged into the specific operation - does this every time they log into the op for that job - if there is no operation nothing displays and for certain ops where we do mass clock ins (cutting ops) it does not display. We also display the next operation when clocking the op off. We use this for when parts are sent ahead without the route card only a sticker flagging the job. Our shop folks also lose route cards - this enables them to still see specific comments.
My code is pretty brutal and uses standard Epicor text boxes but it might meet your needs.
I stumbled upon this thread, and now it works! I just needed to change the notify type to Initialize instead of AddRow.
So the final solution uses two cases; one to check when the dataview initializes (fires when a user logs in and is already clocked in to a job, and also fires when a user clocks on to a job having no other jobs clocked in), and another to check when a user is going between different clocked in jobs.
Thank you everyone for your help in getting this one resolved!