List <PlanTable> CorrespondingPlanData() { int index = 1; List <PlanTable> list = new List <PlanTable> (); if (planDataList.Count > 0 && hisPlanDataList.Count > 0) { foreach (PlanTable pt in planDataList) { PlanTable pts = new PlanTable(); foreach (PlanTable hpt in hisPlanDataList) { if (pt.workOrder == hpt.workOrder) { pts = hpt; break; } } pts.sequence = index.ToString(); list.Add(pts); index++; } } return(list); }
public string GetHisPlan(string name) { string sql = "SELECT * FROM [NYMESDBTEST].[dbo].[View_Zsd_MES_HisPlan] WHERE [dbo].[View_Zsd_MES_HisPlan].TechNM ='" + name + "'"; string[] value = ExcuteSqls(sql); hisPlanDataList.Clear(); for (int i = 0; i < value.Length; i++) { if (value [i] != "") { string[] val = value [i].Split(','); PlanTable pt = new PlanTable(); pt.sequence = i.ToString(); pt.number = val [0]; pt.batchId = val [1]; pt.workOrder = val [2]; pt.group = val [5]; pt.classes = val [4]; pt.startTime = val [8]; pt.endTime = val [9]; pt.workTime = val [10]; pt.wTUnit = "时间"; pt.output = val [6]; pt.optUnit = val [7]; pt.chestId = val [11]; pt.chestNum = val [12]; pt.cnUnit = val [7]; pt.saveTime = val [19]; pt.timeUnit = "时间"; hisPlanDataList.Add(pt); } } return(GetPlanDataToString(CorrespondingPlanData())); }
public async void refreshData() { try { task = await PDashAPI.Controller.GetTask(task.Id); PlanTable.Source = new TaskDetailTableSource(task, this); PlanTable.ReloadData(); refreshControlButtons(); } catch (Exception ex) { ViewControllerHelper.ShowAlert(this, null, ex.Message + " Please try again later."); } }
void ReleaseDesignerOutlets() { if (PlanTable != null) { PlanTable.Dispose(); PlanTable = null; } if (TdCheckboxBtn != null) { TdCheckboxBtn.Dispose(); TdCheckboxBtn = null; } if (TdNotesTf != null) { TdNotesTf.Dispose(); TdNotesTf = null; } if (TdPauseBtn != null) { TdPauseBtn.Dispose(); TdPauseBtn = null; } if (TdPlayBtn != null) { TdPlayBtn.Dispose(); TdPlayBtn = null; } if (tdProjectNameBtn != null) { tdProjectNameBtn.Dispose(); tdProjectNameBtn = null; } if (TdTaskNameLb != null) { TdTaskNameLb.Dispose(); TdTaskNameLb = null; } }