Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MapData md = new MapData(this.FK_MapData);

            this.Title = md.Name + " - " + "设计框架";
            switch (this.DoType)
            {
            case "DtlList":
                BindList(md);
                break;

            case "New":
                int      num  = BP.DA.DBAccess.RunSQLReturnValInt("SELECT COUNT(No) FROM Sys_MapFrame WHERE FK_MapData='" + this.FK_MapData + "'") + 1;
                MapFrame dtl1 = new MapFrame();
                dtl1.Name    = "框架" + num;
                dtl1.NoOfObj = "F" + num;
                BindEdit(md, dtl1);
                break;

            case "Edit":
                MapFrame dtl = new MapFrame();
                if (this.FK_MapFrame == null)
                {
                    dtl.NoOfObj = "Frm";
                }
                else
                {
                    dtl.MyPK = this.FK_MapFrame;
                    dtl.Retrieve();
                }
                BindEdit(md, dtl);
                break;

            default:
                throw new Exception("er" + this.DoType);
            }
        }