Beispiel #1
0
        public void DeleteSelectedItem(MSelectedItem itm)
        {
            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("BILL_SIMULATE_ITEM");
            int       seq = itm.Seq;

            foreach (CTable t in arr)
            {
                int q = CUtil.StringToInt(t.GetFieldValue("INTERNAL_SEQ"));
                if (q == seq)
                {
                    if (itm.BillSelectedItemID.Equals(""))
                    {
                        arr.Remove(t);
                        break;
                    }
                    else
                    {
                        itm.ExtFlag = "D";
                    }
                }
            }

            selectedItems.Remove(itm);
            //arr.Remove(itm.GetDbObject());
        }
Beispiel #2
0
        public void InitSelectedItems()
        {
            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("BILL_SIMULATE_ITEM");

            if (arr == null)
            {
                return;
            }

            selectedItems.Clear();
            foreach (CTable t in arr)
            {
                MSelectedItem v = new MSelectedItem(t);
                v.Seq = seq;
                selectedItems.Add(v);

                v.ExtFlag = "I";
                seq++;
            }
        }
Beispiel #3
0
        public void AddSelectedItem(MSelectedItem sitm)
        {
            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("BILL_SIMULATE_ITEM");

            if (arr == null)
            {
                arr = new ArrayList();
                o.AddChildArray("BILL_SIMULATE_ITEM", arr);
            }

            sitm.ExtFlag = "A";
            sitm.Seq     = seq;

            CTable t = sitm.GetDbObject();

            //t.SetFieldValue("INTERNAL_SEQ", seq.ToString());

            arr.Add(t);

            selectedItems.Add(sitm);

            seq++;
        }