public void SetCheckToSpecs(Specs spec) { //JobDetail detail = FindBySpecsID(spec.ID); JobDetail detail = findByBarCode(spec.BarCode); if (detail != null) { foreach (string kv in detail.CheckDetailList.Split(',')) { String[] checkresults = kv.Split('='); if (checkresults.Length == 2) { int spid = Int32.Parse(checkresults[0]); String checkresult = checkresults[1].Trim(); bool ispass = checkresult.Substring(0, 1) == "1" ? true : false; string note = ""; if (checkresult.Length > 2) { note = checkresult.Substring(2, checkresult.Length - 2); } SpecsDetail spdetail = spec.FindByID(spid); if (spdetail != null) { spdetail.isChecked = ispass; spdetail.isDone = true; spdetail.Note = note; } } } spec.IsCheckAll = true; detail.BarCode = spec.BarCode; } }
public void SetCheckToSpecs(Specs spec) { JobDetail detail = FindBySpecsID(spec.ID); if (detail != null) { foreach (string kv in detail.CheckDetailList.Split(',')) { String[] checkresults = kv.Split('='); if (checkresults.Length == 2) { int spid = Int32.Parse(checkresults[0]); bool ispass = checkresults[1] == "1" ? true : false; SpecsDetail spdetail = spec.FindByID(spid); if (spdetail != null) { spdetail.isChecked = ispass; spdetail.isDone = true; } } } spec.IsCheckAll = true; } }
public void SetCheckToSpecs(Specs spec) { JobDetail detail = FindBySpecsID(spec.ID); if (detail != null) { foreach (string kv in detail.CheckDetailList.Split(',')) { String[] checkresults = kv.Split('='); if (checkresults.Length == 2) { int spid = Int32.Parse(checkresults[0]); String checkresult = checkresults[1].Trim(); bool ispass = checkresult.Substring(0, 1) == "1" ? true : false; string note = ""; if (checkresult.Length > 2) { note = checkresult.Substring(2, checkresult.Length - 2); } SpecsDetail spdetail = spec.FindByID(spid); if (spdetail != null) { spdetail.isChecked = ispass; spdetail.isDone = true; spdetail.Note = note; } } } spec.IsCheckAll = true; detail.BarCode = spec.BarCode; } }