Пример #1
0
    protected void bind_formview(string mode)
    {
        //have to use a collection as formview needs to bind to enumerable
        PortTableCollection _tbl = new PortTableCollection();

        if (mode != "Insert")
        {
            int       _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship"));
            PortTable _ct  = new PortTable(_pid);
            _tbl.Add(_ct);

            //store original value for country name so we can check against database when saving
            if (this.dxhfOrder.Contains("oldvalue"))
            {
                this.dxhfOrder.Remove("oldvalue");
            }
            this.dxhfOrder.Add("oldvalue", _ct.PortName);
        }
        else
        {
            PortTable _ct = new PortTable();
            _tbl.Add(_ct);
        }

        this.fmvPort.DataSource = _tbl;
        this.fmvPort.DataBind();
    }
Пример #2
0
    protected void bind_formview(string mode)
    {
        //have to use a collection as formview needs to bind to enumerable
        PortTableCollection _tbl = new PortTableCollection();
        if (mode != "Insert")
        {
            int _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship"));
            PortTable _ct = new PortTable(_pid);
            _tbl.Add(_ct);

            //store original value for country name so we can check against database when saving
            if (this.dxhfOrder.Contains("oldvalue")) { this.dxhfOrder.Remove("oldvalue"); }
            this.dxhfOrder.Add("oldvalue", _ct.PortName); 
        }
        else
        {
            PortTable _ct = new PortTable();
            _tbl.Add(_ct);
        }

        this.fmvPort.DataSource = _tbl;
        this.fmvPort.DataBind();
    }