예제 #1
0
 protected void btnAddNewDetail_Click(object sender, EventArgs e)
 {
     Disassociate service = MESPageService as Disassociate;
     DisassociateDetail sd = new DisassociateDetail();
     sd.ChildContainerName = "";
     service.InsertDetail(sd);
     GridView1.DataBind();
 }
예제 #2
0
 private void InsertFullDetails(Container co)
 {
     foreach (Container child in co.ChildContainers)
     {
         DisassociateDetail sd = new DisassociateDetail();
         sd.ChildContainerName = child.ContainerName;
         InsertDetail(sd);
     }
 }
예제 #3
0
 public void UpdateDetails(DisassociateDetail s)
 {
     foreach (DisassociateDetail t in DisassociateDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignDisassociateDetailToDisassociateDetail(s, t);
         }
     }
 }
예제 #4
0
 public void DeleteDetail(DisassociateDetail s)
 {
     int i = -1;
     foreach (DisassociateDetail t in DisassociateDetails)
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             i = DisassociateDetails.IndexOf(t);
             break;
         }
     if (-1 != i)
         DisassociateDetails.RemoveAt(i);
 }
예제 #5
0
        public void DeleteDetail(DisassociateDetail s)
        {
            int i = -1;

            foreach (DisassociateDetail t in DisassociateDetails)
            {
                if (t.ServiceDetailID == s.ServiceDetailID)
                {
                    i = DisassociateDetails.IndexOf(t);
                    break;
                }
            }
            if (-1 != i)
            {
                DisassociateDetails.RemoveAt(i);
            }
        }
예제 #6
0
        protected override bool ModifyEntity()
        {
            bool success = base.ModifyEntity();

            if (true == DisassociateAll)
            {
                DisassociateDetails.Clear();
                foreach (UO_Model.Execution.Container d in this.Container.ChildContainers)
                {
                    DisassociateDetail sd = new DisassociateDetail();
                    sd.ChildContainerName = d.ContainerName;
                    DisassociateDetails.Add(sd);
                }
            }
            foreach (DisassociateDetail d in DisassociateDetails)
            {
                Container childContainer = ResolveContainer(d.ChildContainerName);
                this.Container.Qty   -= childContainer.Qty;
                childContainer.Parent = null;
            }
            return(success);
        }
예제 #7
0
 public void InsertDetail(DisassociateDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     DisassociateDetails.Add(s);
 }
예제 #8
0
 protected virtual void AssignDisassociateDetailToDisassociateHistoryDetail(DisassociateDetail s, DisassociateHistoryDetail t)
 {
     t.ChildContainer = ResolveContainer(s.ChildContainerName);
 }
예제 #9
0
 protected virtual void AssignDisassociateDetailToDisassociateDetail(DisassociateDetail s, DisassociateDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
 }
예제 #10
0
 public void InsertDetail(DisassociateDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     DisassociateDetails.Add(s);
 }
예제 #11
0
 private void InsertFullDetails(Container co)
 {
     foreach (Container child in co.ChildContainers)
     {
         DisassociateDetail sd = new DisassociateDetail();
         sd.ChildContainerName = child.ContainerName;
         InsertDetail(sd);
     }
 }
예제 #12
0
 protected override bool ModifyEntity()
 {
     bool success = base.ModifyEntity();
     if (true == DisassociateAll)
     {
         DisassociateDetails.Clear();
         foreach (UO_Model.Execution.Container d in this.Container.ChildContainers)
         {
             DisassociateDetail sd = new DisassociateDetail();
             sd.ChildContainerName = d.ContainerName;
             DisassociateDetails.Add(sd);
         }
     }
     foreach (DisassociateDetail d in DisassociateDetails)
     {
         Container childContainer = ResolveContainer(d.ChildContainerName);
         this.Container.Qty -= childContainer.Qty;
         childContainer.Parent = null;
     }
     return success;
 }
예제 #13
0
 protected virtual void AssignDisassociateDetailToDisassociateHistoryDetail(DisassociateDetail s, DisassociateHistoryDetail t)
 {
     t.ChildContainer = ResolveContainer(s.ChildContainerName);
 }
예제 #14
0
 protected virtual void AssignDisassociateDetailToDisassociateDetail(DisassociateDetail s, DisassociateDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
 }
예제 #15
0
 public void UpdateDetails(DisassociateDetail s)
 {
     foreach (DisassociateDetail t in DisassociateDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignDisassociateDetailToDisassociateDetail(s, t);
         }
     }
 }