Beispiel #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();
 }
Beispiel #2
0
 public void UpdateDetails(SerializeDetail s)
 {
     foreach (SerializeDetail t in SerializeDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignSerializeDetailToSerializeDetail(s, t);
         }
     }
 }
Beispiel #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);
            }
        }
Beispiel #4
0
 public void InsertDetail(SerializeDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     SerializeDetails.Add(s);
 }
Beispiel #5
0
 protected virtual void AssignSerializeDetailsToSerializeHistoryDetail(SerializeDetail s, SerializeHistoryDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
     t.ChildQty           = s.ChildQty;
 }
Beispiel #6
0
 protected virtual void AssignSerializeDetailsToChildContainer(SerializeDetail s, Container t)
 {
     t.ContainerName = s.ChildContainerName;
     t.Qty           = s.ChildQty;
     t.Parent        = this.Container;
 }
Beispiel #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);
 }
Beispiel #8
0
 protected virtual void AssignSerializeDetailToSerializeDetail(SerializeDetail s, SerializeDetail t)
 {
     t.ChildContainerName = s.ChildContainerName;
     t.ChildQty = s.ChildQty;
 }
Beispiel #9
0
 protected virtual void AssignSerializeDetailsToChildContainer(SerializeDetail s, Container t)
 {
     t.ContainerName = s.ChildContainerName;
     t.Qty = s.ChildQty;
     t.Parent = this.Container;
 }
Beispiel #10
0
 public void UpdateDetails(SerializeDetail s)
 {
     foreach (SerializeDetail t in SerializeDetails)
     {
         if (t.ServiceDetailID == s.ServiceDetailID)
         {
             AssignSerializeDetailToSerializeDetail(s, t);
         }
     }
 }
Beispiel #11
0
 public void InsertDetail(SerializeDetail s)
 {
     s.ServiceDetailID = detailIDCount++;
     SerializeDetails.Add(s);
 }