protected virtual void AssignStartDetailToStartDetail(StartDetail s, StartDetail t) { t.ContainerName = s.ContainerName; t.ContainerLevel_Name = s.ContainerLevel_Name; t.DueDate = s.DueDate; t.Product_Revision = s.Product_Revision; t.Qty = s.Qty; t.UOM_Name = s.UOM_Name; }
public void UpdateDetails(StartDetail s) { foreach (StartDetail t in Details) { if (t.ServiceDetailID == s.ServiceDetailID) { AssignStartDetailToStartDetail(s, t); } } }
protected void btnAddNewDetail_Click(object sender, EventArgs e) { Start s = MESPageService as Start; StartDetail sd = new StartDetail(); sd.ContainerName = "NewLot"+s.SelectDetails().Count; sd.ContainerLevel_Name = "Lot"; sd.DueDate = DateTime.Now; sd.Product_Revision = "ProductA(r2)"; sd.UOM_Name = "Piece"; sd.ContainerStatus_Name = "Active"; s.InsertDetail(sd); GridView1.DataBind(); }
public void DeleteDetail(StartDetail s) { int i = -1; foreach (StartDetail t in Details) { if (t.ServiceDetailID == s.ServiceDetailID) { i = Details.IndexOf(t); break; } } if (-1 != i) { Details.RemoveAt(i); } }
public void T020_Start_LOT2() { Start s = new Start(); s.Factory_Name = "F1"; s.MfgOrder_Name = "MfgOrder_PA_r2"; s.Workflow_Revision = "WF_First(r1)"; s.WorkflowStep = s.Workflow.FirstStep; s.StartReason_Name = "Engineer"; StartDetail d = new StartDetail(); d.ContainerName = "LOT2"; d.ContainerLevel_Name = "Lot"; d.ContainerStatus_Name = "Active"; d.Product_Revision = "ProductA(r2)"; s.InsertDetail(d); Assert.IsTrue(s.ExecuteService(), s.CompletionMessage); }
protected virtual void AssignStartDetailToStartHistoryDetail(StartDetail s, StartHistoryDetail t) { t.ContainerName = s.ContainerName; t.ContainerLevel = ResolveCDO("ContainerLevel", s.ContainerLevel_Name) as ContainerLevel; t.ContainerStatus = ResolveCDO("ContainerStatus", s.ContainerStatus_Name) as ContainerStatus; t.DueDate = s.DueDate; t.Qty = s.Qty; t.UOM = ResolveCDO("UOM", s.UOM_Name) as UOM; t.Product = ResolveCDO("Product", s.Product_Revision) as Product; if (t.Product != null) { if (t.Qty == 0) { t.Qty = t.Product.StdStartedQty; t.UOM = t.Product.StdStartedUOM; } } }
public void InsertDetail(StartDetail s) { s.ServiceDetailID = detailIDCount++; Details.Add(s); }
public void DeleteDetail(StartDetail s) { int i = -1; foreach (StartDetail t in Details) if (t.ServiceDetailID == s.ServiceDetailID) { i = Details.IndexOf(t); break; } if(-1 != i) Details.RemoveAt(i); }