コード例 #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);
        }
コード例 #2
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);
        }
コード例 #3
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);
        }