コード例 #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 "Edit":
                MapDtl dtl = new MapDtl();
                if (this.FK_MapDtl == null)
                {
                    dtl.No = this.FK_MapData + "Dtl";
                }
                else
                {
                    dtl.No = this.FK_MapDtl;
                    dtl.Retrieve();
                }
                BindEdit(md, dtl);
                break;

            default:
            case "New":
                int    num  = BP.DA.DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM Sys_MapDtl WHERE FK_MapData='" + this.FK_MapData + "'") + 1;
                MapDtl dtl1 = new MapDtl();
                dtl1.Name   = "从表" + num;
                dtl1.No     = this.FK_MapData + "Dtl" + num;
                dtl1.PTable = this.FK_MapData + "Dtl" + num;
                BindEdit(md, dtl1);
                break;
            }
        }