예제 #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());
        }
예제 #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++;
            }
        }
예제 #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++;
        }