예제 #1
0
        private void LoadData()
        {
            this.Title = Caption;

            CTable t = new CTable("INVENTORY_TX");

            vw = new MInventoryTransaction(t);
            //vw.LocationObj = this.locationObj;
            vw.CreateDefaultValue();

            DataContext = vw;

            CUtil.EnableForm(false, this);

            if (Mode.Equals("E"))
            {
                CTable newDB = actualView.GetDbObject().Clone();
                vw.SetDbObject(newDB);
                vw.NotifyAllPropertiesChanged();
                radUp.IsChecked   = vw.UpSelected;
                radDown.IsChecked = vw.DownSelected;
            }
            else
            {
                vw.DownSelected   = true;
                radDown.IsChecked = true;
            }

            vw.IsModified = false;

            CUtil.EnableForm(true, this);
        }
예제 #2
0
        private void LoadData()
        {
            this.Title = Caption;

            CUtil.EnableForm(false, this);

            if (Mode.Equals("E"))
            {
                CTable newDB = actualView.GetDbObject().Clone();
                vw.SetDbObject(newDB);
                vw.NotifyAllPropertiesChanged();
            }

            vw.IsModified = false;

            CUtil.EnableForm(true, this);
        }
예제 #3
0
        private void addReturnDocItems(ArrayList items)
        {
            //To prevent the duplication selection
            Hashtable hash = CUtil.ObserableCollectionToHash(mv.TxItems, "BorrowID");

            foreach (MInventoryTransaction ai in items)
            {
                if (hash.ContainsKey(ai.InventoryTxID))
                {
                    continue;
                }

                MInventoryTransaction di = new MInventoryTransaction(new CTable(""));
                di.SetDbObject(ai.GetDbObject().CloneAll());
                di.InventoryTxID    = "";
                di.ExtFlag          = "A";
                di.TxType           = "I";
                di.BorrowID         = ai.InventoryTxID;
                di.BorrowDocumentNo = ai.DocumentNo;
                di.ItemQuantity     = ai.ReturnQuantityNeed;

                mv.AddTxItem(di, dt);
            }
        }