Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public void UpdateDetails(StartDetail s)
 {
     foreach (StartDetail t in Details)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignStartDetailToStartDetail(s, t);
         }
     }
 }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 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;
         }
     }
 }
Ejemplo n.º 7
0
 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;
         }
     }
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 9
0
 public void UpdateDetails(StartDetail s)
 {
     foreach (StartDetail t in Details)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignStartDetailToStartDetail(s, t);
         }
     }
 }
Ejemplo n.º 10
0
 public void InsertDetail(StartDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     Details.Add(s);
 }
Ejemplo n.º 11
0
 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);
 }
Ejemplo n.º 12
0
 public void InsertDetail(StartDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     Details.Add(s);
 }