Exemplo n.º 1
0
        public void BindDtl()
        {
            BP.Sys.MapDtls dtls = new BP.Sys.MapDtls();
            dtls.Retrieve(MapDtlAttr.FK_MapData, this.FK_MapData);

            this.Pub2.AddTable("width='100%'");
            this.Pub2.AddTR();
            this.Pub2.AddTDTitle("Idx");
            this.Pub2.AddTDTitle("编号");
            this.Pub2.AddTDTitle("名称");
            this.Pub2.AddTDTitle("原始属性");
            this.Pub2.AddTDTitle("编辑");
            this.Pub2.AddTDTitle("删除");
            this.Pub2.AddTREnd();

            int idx = 0;

            foreach (BP.Sys.MapDtl item in dtls)
            {
                if (item.FK_Node != 0)
                {
                    continue;
                }

                idx++;
                this.Pub2.AddTR();
                this.Pub2.AddTDIdx(idx);
                this.Pub2.AddTD(item.No);
                this.Pub2.AddTD(item.Name);
                this.Pub2.AddTD("<a href=\"javascript:EditDtlYuanShi('" + this.FK_MapData + "','" + item.No + "')\">原始属性</a>");
                this.Pub2.AddTD("<a href=\"javascript:EditDtl('" + this.FK_Node + "','" + this.FK_MapData + "','" + item.No + "')\">编辑</a>");

                MapDtl en = new MapDtl();
                en.No = item.No + "_" + this.FK_Node;
                if (en.RetrieveFromDBSources() == 0)
                {
                    this.Pub2.AddTD();
                }
                else
                {
                    this.Pub2.AddTD("<a href=\"javascript:DeleteDtl('" + this.FK_Node + "','" + this.FK_MapData + "','" + item.No + "')\">删除</a>");
                }

                this.Pub2.AddTREnd();
            }
            this.Pub2.AddTableEnd();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            BP.Sys.MapDtls ens = new BP.Sys.MapDtls();
            ens.Retrieve(MapDtlAttr.FK_MapData, this.FK_MapData);

            this.Pub1.AddTable("width='100%'");
            this.Pub1.AddCaptionLeft("表单明细表权限.");
            this.Pub1.AddTR();
            this.Pub1.AddTDTitle("Idx");
            this.Pub1.AddTDTitle("编号");
            this.Pub1.AddTDTitle("名称");
            this.Pub1.AddTDTitle("编辑");
            this.Pub1.AddTDTitle("删除");
            this.Pub1.AddTREnd();

            int idx = 0;

            foreach (BP.Sys.MapDtl item in ens)
            {
                if (item.FK_Node != 0)
                {
                    continue;
                }

                idx++;
                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx);
                this.Pub1.AddTD(item.No);
                this.Pub1.AddTD(item.Name);
                this.Pub1.AddTD("<a href=\"javascript:Edit('" + this.FK_Node + "','" + this.FK_MapData + "','" + item.No + "')\">编辑</a>");

                MapDtl en = new MapDtl();
                if (en.RetrieveFromDBSources() == 0)
                {
                    this.Pub1.AddTD();
                }
                else
                {
                    this.Pub1.AddTD("<a href=\"javascript:Delete('" + this.FK_Node + "','" + this.FK_MapData + "','" + item.No + "')\">删除</a>");
                }

                this.Pub1.AddTREnd();
            }
            this.Pub1.AddTableEnd();
        }