Beispiel #1
0
        private Boolean SaveData()
        {
            if (Mode.Equals("A"))
            {
                if (SaveToView())
                {
                    parentView.AddTxItem(vw, Idt);
                    return(true);
                }

                return(false);
            }
            else if (Mode.Equals("E"))
            {
                if (vw.IsModified)
                {
                    Boolean result = SaveToView();
                    if (result)
                    {
                        CTable o = actualView.GetDbObject();
                        o.CopyFrom(vw.GetDbObject());
                        actualView.NotifyAllPropertiesChanged();

                        return(true);
                    }

                    return(false);
                }

                return(true);
            }

            return(true);
        }
Beispiel #2
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);
            }
        }
Beispiel #3
0
        protected override void addSubItem()
        {
            MInventoryDoc parent = (MInventoryDoc)loadParam.ActualParentView;

            parent.AddTxItem(mv, dt);
        }