Example #1
0
 protected void btnAddNewDetail_Click(object sender, EventArgs e)
 {
     Serialize service = MESPageService as Serialize;
     SerializeDetail sd = new SerializeDetail();
     sd.ChildContainerName = txtContainer.Text + '-' + service.SelectDetails().Count;
     service.InsertDetail(sd);
     GridView1.DataBind();
 }
Example #2
0
 public void UpdateDetails(SerializeDetail s)
 {
     foreach (SerializeDetail t in SerializeDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignSerializeDetailToSerializeDetail(s, t);
         }
     }
 }
Example #3
0
        public void DeleteDetail(SerializeDetail s)
        {
            int i = -1;

            foreach (SerializeDetail t in SerializeDetails)
            {
                if (t.ServiceDetailID == s.ServiceDetailID)
                {
                    i = SerializeDetails.IndexOf(t);
                    break;
                }
            }
            if (-1 != i)
            {
                SerializeDetails.RemoveAt(i);
            }
        }
Example #4
0
 public void InsertDetail(SerializeDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     SerializeDetails.Add(s);
 }
Example #5
0
 protected virtual void AssignSerializeDetailsToSerializeHistoryDetail(SerializeDetail s, SerializeHistoryDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
     t.ChildQty           = s.ChildQty;
 }
Example #6
0
 protected virtual void AssignSerializeDetailsToChildContainer(SerializeDetail s, Container t)
 {
     t.ContainerName = s.ChildContainerName;
     t.Qty           = s.ChildQty;
     t.Parent        = this.Container;
 }
Example #7
0
 public void DeleteDetail(SerializeDetail s)
 {
     int i = -1;
     foreach (SerializeDetail t in SerializeDetails)
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             i = SerializeDetails.IndexOf(t);
             break;
         }
     if(-1 != i)
         SerializeDetails.RemoveAt(i);
 }
Example #8
0
 protected virtual void AssignSerializeDetailToSerializeDetail(SerializeDetail s, SerializeDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
     t.ChildQty = s.ChildQty;
 }
Example #9
0
 protected virtual void AssignSerializeDetailsToChildContainer(SerializeDetail s, Container t)
 {
     t.ContainerName = s.ChildContainerName;
     t.Qty = s.ChildQty;
     t.Parent = this.Container;
 }
Example #10
0
 public void UpdateDetails(SerializeDetail s)
 {
     foreach (SerializeDetail t in SerializeDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignSerializeDetailToSerializeDetail(s, t);
         }
     }
 }
Example #11
0
 public void InsertDetail(SerializeDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     SerializeDetails.Add(s);
 }