Hello you wonderful people!
I am in need of your experience, expertise, and guidance once again. I have been racking my brain trying to figure out what is wrong with my code that is causing it to produce this Application Error.
Maybe one of you can assist me in finding the issue in my script.
//Label Script for Serialized Tube 0520
private void Form_AM0520SN()//AMSerialized Tube Labels
{
EpiTextBox etxtJob = (EpiTextBox)csm.GetNativeControlReference(“71c3e8b2-bf25-42ff-b952-8dab2e16107a”);
EpiTextBox etxtPartNum = (EpiTextBox)csm.GetNativeControlReference(“4b8e7b4e-33f9-4abb-9835-214475913e95”);
EpiTextBox etxtCustPartNum = (EpiTextBox)csm.GetNativeControlReference(“b642bbae-c1a2-46c0-af58-f18ddcf8f849”);
EpiTextBox etxtRev = (EpiTextBox)csm.GetNativeControlReference(“4c89e6e7-58c9-4429-8c63-7016452bea21”);
EpiTextBox etxtCustPartRev = (EpiTextBox)csm.GetNativeControlReference(“8539bf33-2f02-4628-8608-9cc1ad7d687a”);
EpiTextBox etxtPartDesc = (EpiTextBox)csm.GetNativeControlReference(“853c6e43-34b5-4550-b168-c7d1a8891532”);
EpiUltraGrid gridSerials = (EpiUltraGrid)csm.GetNativeControlReference(“fc13911b-15f9-40d5-8668-370e6c0663e6”);
EpiUltraGrid gridLabel = (EpiUltraGrid)csm.GetNativeControlReference(“cb335fb6-d957-485a-8333-0da630a2ac5f”);
EpiTextBox etxtQtyToPrint = (EpiTextBox)csm.GetNativeControlReference(“52b6eb17-2ee3-4ccf-a590-a339bc939101”);
//get week
CultureInfo myCI = new CultureInfo("en-US");
Calendar myCal = myCI.Calendar;
CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;
DayOfWeek myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek;
string curWeek = myCal.GetWeekOfYear( DateTime.Now, myCWR, myFirstDOW ).ToString("00");
string curYY = DateTime.Now.ToString("yy");
//clear current label rows
gridLabel.Selected.Rows.AddRange((Infragistics.Win.UltraWinGrid.UltraGridRow[])gridLabel.Rows.All);
gridLabel.DeleteSelectedRows(false);
gridLabel.DisplayLayout.Bands[0].AddNew();
gridLabel.DisplayLayout.Bands[0].AddNew();
gridLabel.DisplayLayout.Bands[0].AddNew();
gridLabel.DisplayLayout.Bands[0].AddNew();
gridLabel.DisplayLayout.Bands[0].AddNew();
gridLabel.Rows[0].Cells[0].Value = Convert.ToString(etxtCustPartNum.Value); gridLabel.Rows[0].Update();
gridLabel.Rows[1].Cells[0].Value = Convert.ToString(etxtCustPartRev.Value); gridLabel.Rows[1].Update();
gridLabel.Rows[2].Cells[0].Value = "900-{Wy}-{Sn}" ; gridLabel.Rows[2].Update();
gridLabel.Rows[3].Cells[0].Value = Convert.ToString(etxtJob.Value); gridLabel.Rows[3].Update();
gridLabel.Rows[4].Update();
//gridLabel.Rows[3].Cells[0].Value = "{SN}"; gridLabel.Rows[3].Update();
//gridLabel.Rows[4].Cells[0].Value = Convert.ToString(etxtJob.Value); gridLabel.Rows[4].Update();
this.epitbWWWYY.Value = curWeek+curYY;
this.epitbWWWYY.Visible = true;
}
Thank you ahead of time for anyone who takes a few minutes to look at this. You rock!
P.S. Please do not judge my script to harshly, I am not a Computer Programmer and I am just learning how to do this by following what already exists in the application.