protected void btnAddNewDetail_Click(object sender, EventArgs e)
 {
     Disassociate service = MESPageService as Disassociate;
     DisassociateDetail sd = new DisassociateDetail();
     sd.ChildContainerName = "";
     service.InsertDetail(sd);
     GridView1.DataBind();
 }
Beispiel #2
0
 private void InsertFullDetails(Container co)
 {
     foreach (Container child in co.ChildContainers)
     {
         DisassociateDetail sd = new DisassociateDetail();
         sd.ChildContainerName = child.ContainerName;
         InsertDetail(sd);
     }
 }
Beispiel #3
0
 public void UpdateDetails(DisassociateDetail s)
 {
     foreach (DisassociateDetail t in DisassociateDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignDisassociateDetailToDisassociateDetail(s, t);
         }
     }
 }
Beispiel #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);
 }
Beispiel #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);
            }
        }
Beispiel #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);
        }
Beispiel #7
0
 public void InsertDetail(DisassociateDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     DisassociateDetails.Add(s);
 }
Beispiel #8
0
 protected virtual void AssignDisassociateDetailToDisassociateHistoryDetail(DisassociateDetail s, DisassociateHistoryDetail t)
 {
     t.ChildContainer = ResolveContainer(s.ChildContainerName);
 }
Beispiel #9
0
 protected virtual void AssignDisassociateDetailToDisassociateDetail(DisassociateDetail s, DisassociateDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
 }
Beispiel #10
0
 public void InsertDetail(DisassociateDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     DisassociateDetails.Add(s);
 }
Beispiel #11
0
 private void InsertFullDetails(Container co)
 {
     foreach (Container child in co.ChildContainers)
     {
         DisassociateDetail sd = new DisassociateDetail();
         sd.ChildContainerName = child.ContainerName;
         InsertDetail(sd);
     }
 }
Beispiel #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;
 }
Beispiel #13
0
 protected virtual void AssignDisassociateDetailToDisassociateHistoryDetail(DisassociateDetail s, DisassociateHistoryDetail t)
 {
     t.ChildContainer = ResolveContainer(s.ChildContainerName);
 }
Beispiel #14
0
 protected virtual void AssignDisassociateDetailToDisassociateDetail(DisassociateDetail s, DisassociateDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
 }
Beispiel #15
0
 public void UpdateDetails(DisassociateDetail s)
 {
     foreach (DisassociateDetail t in DisassociateDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignDisassociateDetailToDisassociateDetail(s, t);
         }
     }
 }