Example #1
0
        private void Save()
        {
            MapData md = new MapData();

            md.No = this.RptNo;
            md.RetrieveFromDBSources();

            MapAttrs mattrs = new MapAttrs(this.RptNo);
            string   keys   = "";

            foreach (MapAttr mattr in mattrs)
            {
                if (mattr.UIContralType != UIContralType.DDL)
                {
                    continue;
                }
                CheckBox cb = this.Pub2.GetCBByID("CB_F_" + mattr.KeyOfEn);
                if (cb.Checked)
                {
                    keys += "*" + mattr.KeyOfEn;
                }
            }

            md.RptSearchKeys  = keys + "*";
            md.RptIsSearchKey = this.Pub2.GetCBByID("CB_IsSearchKey").Checked;

            if (this.Pub2.IsExit("DDL_DTSearchWay"))
            {
                BP.Web.Controls.DDL ddl = this.Pub2.GetDDLByID("DDL_DTSearchWay");
                md.RptDTSearchWay = (DTSearchWay)ddl.SelectedItemIntVal;

                ddl = this.Pub2.GetDDLByID("DDL_DTSearchKey");
                md.RptDTSearchKey = ddl.SelectedItemStringVal;
            }
            md.Update();

            Cash.Map_Cash.Remove(this.RptNo);
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MapData md = new MapData();

            md.No = this.RptNo;
            md.RetrieveFromDBSources();

            MapAttrs attrs = new MapAttrs(this.RptNo);

            #region 查询条件定义

            this.Pub2.Add("<div style='width:100%'>");
            this.Pub2.Add("<div class='easyui-panel' title='是否增加关键字查询' data-options=\"iconCls:'icon-tip',fit:true\" style='height:auto;padding:10px'>");
            this.Pub2.Add("关键字查询是接受用户输入一个关键字,在整个报表的显示列中使用like查询(外键、枚举、数值类型的除外)");
            this.Pub2.AddBR();

            CheckBox mycb = new CheckBox();
            mycb.ID      = "CB_IsSearchKey";
            mycb.Text    = "是否增加关键字查询";
            mycb.Checked = md.RptIsSearchKey;
            this.Pub2.Add(mycb);
            this.Pub2.AddDivEnd();
            this.Pub2.AddDivEnd();
            this.Pub2.AddBR();

            this.Pub2.Add("<div style='width:100%'>");
            this.Pub2.Add("<div class='easyui-panel' title='外键与枚举类型' data-options=\"iconCls:'icon-tip',fit:true\" style='height:auto;padding:10px'>");
            this.Pub2.Add("外键、枚举类型的数据可以添加到查询条件中,请选择要添加的查询条件:");
            this.Pub2.AddBR();

            foreach (MapAttr mattr in attrs)
            {
                if (mattr.UIContralType != UIContralType.DDL)
                {
                    continue;
                }

                CheckBox cb = new CheckBox();
                cb.ID = "CB_F_" + mattr.KeyOfEn;
                if (md.RptSearchKeys.Contains("*" + mattr.KeyOfEn))
                {
                    cb.Checked = true;
                }

                cb.Text = mattr.Name + "(" + mattr.KeyOfEn + ")";
                this.Pub2.Add(cb);
                this.Pub2.AddBR();
            }

            this.Pub2.AddDivEnd();
            this.Pub2.AddDivEnd();
            this.Pub2.AddBR();

            bool isHave = false;

            foreach (MapAttr mattr in attrs)
            {
                if (mattr.MyDataType == DataType.AppDate || mattr.MyDataType == DataType.AppDateTime)
                {
                    isHave = true;
                    break;
                }
            }

            if (isHave)
            {
                this.Pub2.Add("<div style='width:100%'>");
                this.Pub2.Add("<div class='easyui-panel' title='时间段' data-options=\"iconCls:'icon-tip',fit:true\" style='height:auto;padding:10px'>");
                this.Pub2.Add("对数据按照时间段进行查询,比如:按流程的发起时间,在指定时间段内进行查询。");
                this.Pub2.AddBR();

                this.Pub2.Add("选择方式:");
                BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
                ddl.ID = "DDL_DTSearchWay";
                ddl.BindSysEnum("DTSearchWay");
                ddl.SetSelectItem((int)md.RptDTSearchWay);
                this.Pub2.Add(ddl);
                this.Pub2.AddSpace(3);

                this.Pub2.Add("字段:");
                ddl    = new BP.Web.Controls.DDL();
                ddl.ID = "DDL_DTSearchKey";

                foreach (MapAttr mattr in attrs)
                {
                    if (mattr.MyDataType == DataType.AppDate || mattr.MyDataType == DataType.AppDateTime)
                    {
                        if (mattr.UIVisible == false)
                        {
                            continue;
                        }
                        ddl.Items.Add(new ListItem(mattr.KeyOfEn + "  " + mattr.Name, mattr.KeyOfEn));
                    }
                }

                ddl.SetSelectItem(md.RptDTSearchKey);
                this.Pub2.Add(ddl);
                this.Pub2.AddDivEnd();
                this.Pub2.AddDivEnd();
            }
            #endregion
        }
Example #3
0
    public void BindNormal()
    {
        //EnsAppCfgs ens = new EnsAppCfgs();
        //ens.Retrieve(EnsAppCfgAttr.EnsName, this.EnsName);

        Entities ens = BP.En.ClassFactory.GetEns(this.EnsName);

        UIConfig cfg = new UIConfig(ens.GetNewEntity);

        EnsAppXmls xmls = new EnsAppXmls();

        xmls.Retrieve("EnsName", this.EnsName);

        //this.UCSys1.AddTable("width=100%");
        this.UCSys1.AddTableNormal();

        if (BP.Web.WebUser.No == "admin")
        {
            //this.UCSys1.AddCaptionLeftTX("<a href='?EnsName=" + this.EnsName + "'>基本设置</a> - <a href='?EnsName=" + this.EnsName + "&DoType=Adv'>高级设置</a> - <a href='EnsDataIO.aspx?EnsName=" + this.EnsName + "' >导入导出</a>");
            this.UCSys1.AddTRGroupTitle(4,
                                        "<a href='?EnsName=" + this.EnsName + "'>基本设置</a> - <a href='?EnsName=" +
                                        this.EnsName + "&DoType=Adv'>高级设置</a> - <a href='EnsDataIO.aspx?EnsName=" +
                                        this.EnsName + "&T=" +
                                        DateTime.Now.ToString("yyyyMMddHHmmssfff") +
                                        "' >导入导出</a>");
        }
        else
        {
            //this.UCSys1.AddCaptionLeftTX("基本设置");
            this.UCSys1.AddTRGroupTitle(4, "基本设置");
        }

        this.UCSys1.AddTR();

        this.UCSys1.AddTR();
        this.UCSys1.AddTDGroupTitle("配置项");
        this.UCSys1.AddTDGroupTitle("内容");
        this.UCSys1.AddTDGroupTitle("信息");
        this.UCSys1.AddTDGroupTitle("备注");
        this.UCSys1.AddTREnd();

        bool is1 = false;

        foreach (EnsAppXml xml in xmls)
        {
            is1 = this.UCSys1.AddTR(is1);
            this.UCSys1.AddTD(xml.No);
            this.UCSys1.AddTD(xml.Name);
            switch (xml.DBType)
            {
            case "Enum":
                BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
                ddl.ID = "DDL_" + xml.No;

                SysEnums ses = new SysEnums(xml.EnumKey, xml.EnumVals);
                ddl.BindSysEnum(xml.EnumKey);

                if (cfg.HisAP.GetValStrByKey(xml.No) == null)
                {
                    ddl.SetSelectItem(xml.DefValInt);
                }
                else
                {
                    ddl.SetSelectItem(cfg.HisAP.GetValIntByKey(xml.No));
                }
                this.UCSys1.AddTD(ddl);
                break;

            case "Boolen":
                CheckBox cb = new CheckBox();
                cb.ID   = "CB_" + xml.No;
                cb.Text = xml.Name;
                if (cfg.HisAP.GetValStrByKey(xml.No) == null)
                {
                    cb.Checked = xml.DefValBoolen;
                }
                else
                {
                    cb.Checked = cfg.HisAP.GetValBoolenByKey(xml.No);
                }
                this.UCSys1.AddTD(cb);
                break;

            default:
                TextBox tb = new TextBox();
                tb.ID = "TB_" + xml.No;
                if (cfg.HisAP.GetValStrByKey(xml.No) == null)
                {
                    tb.Text = xml.DefVal;
                }
                else
                {
                    tb.Text = cfg.HisAP.GetValStrByKey(xml.No);
                }
                tb.Attributes["width"] = "100%";
                this.UCSys1.AddTD(tb);
                break;
            }
            this.UCSys1.AddTDBigDoc(xml.Desc);
            this.UCSys1.AddTREnd();
        }

        if (xmls.Count == 0)
        {
            this.UCSys1.AddTableEnd();
            return;
        }

        this.UCSys1.AddTableEnd();
        this.UCSys1.AddBR();
        this.UCSys1.AddSpace(1);

        //Button btn = new Button();
        LinkBtn btn = new LinkBtn(false, NamesOfBtn.Save, "保存");

        //btn.ID = "Btn_Save";
        //btn.Text = "保存";
        //btn.CssClass = "Btn";
        btn.Click += new EventHandler(btn_Click);
        this.UCSys1.Add(btn);
        this.UCSys1.AddSpace(1);

        //btn = new Button();
        btn = new LinkBtn(false, NamesOfBtn.SaveAndClose, "保存并关闭");
        //btn.ID = "Btn_SaveAndClose";
        //btn.CssClass = "Btn";
        //btn.Text = "保存并关闭";
        btn.Click += new EventHandler(btn_Click);
        this.UCSys1.Add(btn);
    }
Example #4
0
    public void BindAdv()
    {
        //this.UCSys1.AddTable("width=100%");
        this.UCSys1.AddTableNormal();
        this.UCSys1.AddTRGroupTitle(3,
                                    "<b>基本配置</b> - <a href='?EnsName=" + this.EnsName + "&DoType=SelectCols&T=" +
                                    DateTime.Now.ToString("yyyyMMddHHmmssfff") +
                                    "'>选择列</a> - <a href='EnsDataIO.aspx?EnsName=" + this.EnsName + "&T=" +
                                    DateTime.Now.ToString("yyyyMMddHHmmssfff") +
                                    "' >数据导入导出</a>");
        //this.UCSys1.AddCaptionLeftTX("<b>基本配置</b> - <a href='?EnsName=" + this.EnsName + "&DoType=SelectCols&T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "'>选择列</a> - <a href='EnsDataIO.aspx?EnsName=" + this.EnsName + "' >数据导入导出</a>");

        this.UCSys1.AddTR();
        this.UCSys1.AddTDGroupTitle("配置项");
        this.UCSys1.AddTDGroupTitle("内容");
        this.UCSys1.AddTDGroupTitle("信息");
        this.UCSys1.AddTREnd();

        Entity   en1   = BP.En.ClassFactory.GetEns(this.EnsName).GetNewEntity;
        Attrs    attrs = en1.EnMap.HisCfgAttrs;
        UIConfig cfg   = new UIConfig(en1);
        bool     is1   = false;

        foreach (Attr attr in attrs)
        {
            if (attr.IsRefAttr)
            {
                continue;
            }

            if (attr.UIVisible == false)    //added by liuxc,2015-8-7
            {
                continue;
            }

            is1 = this.UCSys1.AddTR(is1);
            this.UCSys1.AddTD(attr.Key);
            this.UCSys1.AddTD(attr.Desc);
            switch (attr.UIContralType)
            {
            case UIContralType.DDL:
                BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
                ddl.ID = "DDL_" + attr.Key;

                SysEnums ses = new SysEnums(attr.Key, attr.UITag);
                ddl.BindSysEnum(attr.Key);

                if (string.IsNullOrEmpty(cfg.HisAP.GetValStrByKey(attr.Key)))
                {
                    ddl.SetSelectItem(attr.DefaultVal.ToString());
                }
                else
                {
                    ddl.SetSelectItem(cfg.HisAP.GetValIntByKey(attr.Key));
                }

                this.UCSys1.AddTD(ddl);
                break;

            case UIContralType.CheckBok:
                CheckBox cb = new CheckBox();
                cb.ID   = "CB_" + attr.Key;
                cb.Text = attr.Desc;
                if (string.IsNullOrEmpty(cfg.HisAP.GetValStrByKey(attr.Key)))
                {
                    if (attr.DefaultVal.ToString() == "0")
                    {
                        cb.Checked = false;
                    }
                    else
                    {
                        cb.Checked = true;
                    }
                }
                else
                {
                    cb.Checked = cfg.HisAP.GetValBoolenByKey(attr.Key);    // en.CfgValOfBoolen;
                }
                this.UCSys1.AddTD(cb);
                break;

            default:
                TextBox tb = new TextBox();
                tb.ID = "TB_" + attr.Key;
                if (cfg.HisAP.GetValStrByKey(attr.Key) == null)
                {
                    tb.Text = attr.DefaultVal.ToString();
                }
                else
                {
                    tb.Text = cfg.HisAP.GetValStrByKey(attr.Key);
                }
                tb.Attributes["width"] = "100%";
                this.UCSys1.AddTD(tb);
                break;
            }
            this.UCSys1.AddTREnd();
        }

        this.UCSys1.AddTableEnd();
        this.UCSys1.AddBR();
        this.UCSys1.AddSpace(1);

        //Button btn = new Button();
        LinkBtn btn = new LinkBtn(false, NamesOfBtn.Save, "保存");

        //btn.ID = "Btn_Save";
        //btn.CssClass = "Btn";
        //btn.Text = "保存";
        btn.Click += new EventHandler(btn_Click);
        this.UCSys1.Add(btn);
        this.UCSys1.AddSpace(1);

        //btn = new Button();
        btn = new LinkBtn(false, NamesOfBtn.SaveAndClose, "保存并关闭");
        //btn.ID = "Btn_SaveAndClose";
        //btn.CssClass = "Btn";
        //btn.Text = "保存并关闭";
        btn.Click += new EventHandler(btn_Click);
        this.UCSys1.Add(btn);
    }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            FrmAttachment ath = new FrmAttachment();

            ath.FK_MapData = this.FK_MapData;
            ath.NoOfObj    = this.Ath;
            ath.FK_Node    = this.FK_Node;

            if (this.FK_Node == 0)
            {
                ath.MyPK = this.FK_MapData + "_" + this.Ath;
            }
            else
            {
                ath.MyPK = this.FK_MapData + "_" + this.Ath + "_" + this.FK_Node;
            }

            int i = ath.RetrieveFromDBSources();

            if (i == 0 && this.FK_Node != 0)
            {
                /*这里处理 独立表单解决方案, 如果有FK_Node 就说明该节点需要单独控制该附件的属性. */
                MapData mapData = new MapData();
                mapData.RetrieveByAttr(MapDataAttr.No, this.FK_MapData);
                if (mapData.AppType == "0")
                {
                    FrmAttachment souceAthMent = new FrmAttachment();
                    // 查询出来原来的数据.
                    int rowCount = souceAthMent.Retrieve(FrmAttachmentAttr.FK_MapData, this.FK_MapData, FrmAttachmentAttr.NoOfObj, this.Ath, FrmAttachmentAttr.FK_Node, "0");
                    if (rowCount > 0)
                    {
                        ath.Copy(souceAthMent);
                    }
                }
                if (this.FK_Node == 0)
                {
                    ath.MyPK = this.FK_MapData + "_" + this.Ath;
                }
                else
                {
                    ath.MyPK = this.FK_MapData + "_" + this.Ath + "_" + this.FK_Node;
                }

                //插入一个新的.
                ath.FK_Node    = this.FK_Node;
                ath.FK_MapData = this.FK_MapData;
                ath.NoOfObj    = this.Ath;
                ath.DirectInsert();
            }

            #region 基本属性.
            this.Title = "附件属性设置";
            this.Pub1.AddTable();
            this.Pub1.AddCaption("附件属性设置");

            int idx = 0;
            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTDTitle("colspan=3", "基本属性");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("编号");
            TextBox tb = new TextBox();
            tb.ID   = "TB_" + FrmAttachmentAttr.NoOfObj;
            tb.Text = ath.NoOfObj;
            if (this.Ath != null)
            {
                tb.Enabled = false;
            }

            this.Pub1.AddTD(tb);
            this.Pub1.AddTD("标示号只能英文字母数字或下滑线.");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("名称");
            tb      = new TextBox();
            tb.ID   = "TB_" + FrmAttachmentAttr.Name;
            tb.Text = ath.Name;
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD("附件的中文名称.");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("文件格式");
            tb      = new TextBox();
            tb.ID   = "TB_" + FrmAttachmentAttr.Exts;
            tb.Text = ath.Exts;
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD("实例:doc,docx,xls,多种格式用逗号分开.");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("文件数据存储方式");

            DDL ddl = new DDL();
            ddl.ID = "DDL_" + FrmAttachmentAttr.SaveWay;
            ddl.Items.Add(new ListItem("按文件方式保存", "0"));
            ddl.Items.Add(new ListItem("保存到数据库", "1"));
            ddl.SetSelectItem(ath.SaveWay);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD("上传的附件如何保存?");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("保存到");
            tb         = new TextBox();
            tb.ID      = "TB_" + FrmAttachmentAttr.SaveTo;
            tb.Text    = ath.SaveTo;
            tb.Columns = 60;
            this.Pub1.AddTD("colspan=2", "文件存储格式才有意义", tb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("类别");
            tb         = new TextBox();
            tb.ID      = "TB_" + FrmAttachmentAttr.Sort;
            tb.Text    = ath.Sort;
            tb.Columns = 60;
            this.Pub1.AddTD("colspan=2", tb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("colspan=3", "帮助:类别可以为空,设置的格式为:列头显示名称@类别名1,类别名2,类别名3(列头显示名称@ :可以不写,默认为:类别)");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("完整性校验");

            //  BP.Web.Controls.DDL ddl=new DDL();
            ddl    = new DDL();
            ddl.ID = "DDL_UploadFileNumCheck";
            ddl.BindSysEnum("UploadFileCheck", (int)ath.UploadFileNumCheck);
            this.Pub1.AddTD("colspan=2", ddl);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("高度");
            BP.Web.Controls.TB mytb = new BP.Web.Controls.TB();
            mytb.ID       = "TB_" + FrmAttachmentAttr.H;
            mytb.Text     = ath.H.ToString();
            mytb.ShowType = BP.Web.Controls.TBType.Float;
            this.Pub1.AddTD("colspan=1", mytb);
            this.Pub1.AddTD("对傻瓜表单有效");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("宽度");
            mytb          = new BP.Web.Controls.TB();
            mytb.ID       = "TB_" + FrmAttachmentAttr.W;
            mytb.Text     = ath.W.ToString();
            mytb.ShowType = BP.Web.Controls.TBType.Float;
            mytb.Columns  = 60;
            this.Pub1.AddTD("colspan=1", mytb);
            this.Pub1.AddTD("对傻瓜表单有效");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("自动控制");
            CheckBox cb = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsAutoSize;
            cb.Text    = "自动控制高度与宽度(对傻瓜表单有效)";
            cb.Checked = ath.IsAutoSize;
            this.Pub1.AddTD("colspan=2", cb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsNote;
            cb.Text    = "是否增加备注列";
            cb.Checked = ath.IsNote;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsShowTitle;
            cb.Text    = "是否显示标题列";
            cb.Checked = ath.IsShowTitle;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTD("");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsVisable;
            cb.Text    = "是否可见(不打勾就隐藏,隐藏后就显示不到表单上,可以显示在组件里.)";
            cb.Checked = ath.IsVisable;
            this.Pub1.AddTD("colspan=3", cb);
            this.Pub1.AddTREnd();


            GroupFields gfs = new GroupFields(ath.FK_MapData);

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("显示在分组");
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_GroupField";
            ddl.BindEntities(gfs, GroupFieldAttr.OID, GroupFieldAttr.Lab, false, BP.Web.Controls.AddAllLocation.None);
            ddl.SetSelectItem(ath.GroupID);
            this.Pub1.AddTD("colspan=1", ddl);
            this.Pub1.AddTD("对傻瓜表单有效");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("展现方式");
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + FrmAttachmentAttr.FileShowWay;
            ddl.Items.Clear();
            ddl.Items.Add(new ListItem("Table方式", "0"));
            ddl.Items.Add(new ListItem("图片轮播方式", "1"));
            ddl.Items.Add(new ListItem("自由模式", "2"));

            ddl.SelectedValue = Convert.ToString((int)ath.FileShowWay);
            this.Pub1.AddTD("colspan=2", ddl);
            this.Pub1.AddTREnd();
            #endregion 基本属性.


            #region 权限控制.
            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTDTitle("colspan=3", "权限控制" + BP.WF.Glo.GenerHelpCCForm("帮助", null, null));
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsDownload;
            cb.Text    = "是否可下载";
            cb.Checked = ath.IsDownload;
            this.Pub1.AddTD(cb);


            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + FrmAttachmentAttr.IsDelete;
            ddl.Items.Clear();
            ddl.Items.Add(new ListItem("不能删除", "0"));
            ddl.Items.Add(new ListItem("删除所有", "1"));
            ddl.Items.Add(new ListItem("只能删除自己上传的", "2"));
            ddl.SetSelectItem(ath.IsDeleteInt);
            this.Pub1.AddTD(ddl);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsUpload;
            cb.Text    = "是否可上传";
            cb.Checked = ath.IsUpload;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsOrder;
            cb.Text    = "是否可以排序";
            cb.Checked = ath.IsOrder;
            this.Pub1.AddTD(cb);

            this.Pub1.AddTD("使用上传控件方式");
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + FrmAttachmentAttr.UploadCtrl;
            ddl.Items.Clear();
            ddl.Items.Add(new ListItem("批量上传", "0"));
            ddl.Items.Add(new ListItem("普通上传", "1"));
            ddl.SetSelectItem(ath.UploadCtrl);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTREnd();

            if (ath.IsNodeSheet == true)
            {
                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD("数据显示控制方式");
                ddl    = new BP.Web.Controls.DDL();
                ddl.ID = "DDL_CtrlWay";
                ddl.Items.Clear();
                ddl.Items.Add(new ListItem("按主键", "0"));
                ddl.Items.Add(new ListItem("FID", "1"));
                ddl.Items.Add(new ListItem("ParentWorkID", "2"));
                ddl.Items.Add(new ListItem("仅可以查看自己上传数据", "3"));
                ddl.SetSelectItem((int)ath.HisCtrlWay);
                this.Pub1.AddTD("colspan=2", ddl);
                this.Pub1.AddTREnd();


                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD("子线程节点控制(对节点表单有效)");
                cb         = new CheckBox();
                cb.ID      = "CB_" + FrmAttachmentAttr.IsToHeLiuHZ;
                cb.Text    = "该附件是否要汇总到合流节点上去?(对子线程节点有效)";
                cb.Checked = ath.IsToHeLiuHZ;
                this.Pub1.AddTD("colspan=2", cb);
                this.Pub1.AddTREnd();


                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD("合流节点控制(对节点表单有效)");
                cb         = new CheckBox();
                cb.ID      = "CB_" + FrmAttachmentAttr.IsHeLiuHuiZong;
                cb.Text    = "是否是合流节点的汇总附件组件?(对合流节点有效)";
                cb.Checked = ath.IsHeLiuHuiZong;
                this.Pub1.AddTD("colspan=2", cb);
                this.Pub1.AddTREnd();


                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD("数据上传控制方式");
                ddl    = new BP.Web.Controls.DDL();
                ddl.ID = "DDL_AthUploadWay";
                ddl.Items.Clear();
                ddl.Items.Add(new ListItem("继承模式", "0"));
                ddl.Items.Add(new ListItem("协作模式", "1"));
                ddl.SetSelectItem((int)ath.AthUploadWay);
                this.Pub1.AddTD("colspan=2", ddl);
                this.Pub1.AddTREnd();
                this.Pub1.AddTREnd();
            }
            #endregion 权限控制.



            #region WebOffice控制方式.

            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTDTitle("colspan=3", "WebOffice控制方式(如果上传的是excel word附件,在打开的时候对其的控制).");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableWF;
            cb.Text    = "是否启用weboffice?";
            cb.Checked = ath.IsWoEnableWF;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableSave;
            cb.Text    = "是否启用保存?";
            cb.Checked = ath.IsWoEnableSave;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableReadonly;
            cb.Text    = "是否只读?";
            cb.Checked = ath.IsWoEnableReadonly;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();



            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableRevise;
            cb.Text    = "是否启用修订?";
            cb.Checked = ath.IsWoEnableRevise;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableViewKeepMark;
            cb.Text    = "是否查看用户留痕?";
            cb.Checked = ath.IsWoEnableViewKeepMark;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnablePrint;
            cb.Text    = "是否打印?";
            cb.Checked = ath.IsWoEnablePrint;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableOver;
            cb.Text    = "是否启用套红?";
            cb.Checked = ath.IsWoEnableOver;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableSeal;
            cb.Text    = "是否启用签章?";
            cb.Checked = ath.IsWoEnableSeal;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableTemplete;
            cb.Text    = "是否启用模板文件?";
            cb.Checked = ath.IsWoEnableTemplete;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableCheck;
            cb.Text    = "是否记录节点信息?";
            cb.Checked = ath.IsWoEnableCheck;
            this.Pub1.AddTD(cb);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableInsertFlow;
            cb.Text    = "是否启用插入流程?";
            cb.Checked = ath.IsWoEnableInsertFlow;
            this.Pub1.AddTD(cb);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableInsertFengXian;
            cb.Text    = "是否启用插入风险点?";
            cb.Checked = ath.IsWoEnableInsertFengXian;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableMarks;
            cb.Text    = "是否进入留痕模式?";
            cb.Checked = ath.IsWoEnableMarks;
            this.Pub1.AddTD(cb);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.IsWoEnableDown;
            cb.Text    = "是否启用下载?";
            cb.Checked = ath.IsWoEnableDown;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTD("");
            this.Pub1.AddTREnd();


            this.Pub1.AddTREnd();
            #endregion WebOffice控制方式.

            #region 快捷键生成规则.
            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTDTitle("colspan=3", "快捷键生成规则.");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmAttachmentAttr.FastKeyIsEnable;
            cb.Text    = "是否启用生成快捷键?(启用就会按照规则生成放在附件的同一个目录里面)";
            cb.Checked = ath.FastKeyIsEnable;
            this.Pub1.AddTD("colspan=3", cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            tb         = new BP.Web.Controls.TB();
            tb.ID      = "TB_" + FrmAttachmentAttr.FastKeyGenerRole;
            tb.Text    = ath.FastKeyGenerRole;
            tb.Columns = 30;
            this.Pub1.AddTD("colspan=3", tb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("colspan=3", "格式:*FiledName.*OID");
            this.Pub1.AddTREnd();
            #endregion 快捷键生成规则.

            #region 保存按钮.
            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("");
            Button btn = new Button();
            btn.ID       = "Btn_Save";
            btn.Text     = "  Save  ";
            btn.CssClass = "Btn";
            btn.Click   += new EventHandler(btn_Click);
            this.Pub1.AddTD(btn);

            if (this.Ath != null)
            {
                btn          = new Button();
                btn.ID       = "Btn_Delete";
                btn.Text     = "  Delete  ";
                btn.CssClass = "Btn";
                btn.Attributes["onclick"] = " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Click);
                this.Pub1.AddTD(btn);
            }
            else
            {
                this.Pub1.AddTD();
            }
            this.Pub1.AddTREnd();
            #endregion 保存按钮.

            this.Pub1.AddTableEnd();
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MapExt me = new MapExt();
            // me.MyPK = this.FK_MapData + "_" + this.ExtType + "_" + me.AttrOfOper + "_" + me.AttrsOfActive;

            int i = me.Retrieve(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.ExtType, MapExtXmlList.ActiveDDL,
                                MapExtAttr.AttrOfOper, this.RefNo);

            this.Pub1.AddEasyUiPanelInfoBegin("为下拉框[" + this.RefNo + "]设置联动.", "icon-edit");
            me.FK_MapData = this.FK_MapData;

            this.Pub1.AddTableNormal();

            MapAttrs attrs = new MapAttrs(this.FK_MapData);

            this.Pub1.AddTR();
            this.Pub1.AddTDGroupTitle("联动下拉框:");
            BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_Attr";
            foreach (MapAttr attr in attrs)
            {
                if (attr.UIVisible == false)
                {
                    continue;
                }

                if (attr.UIIsEnable == false)
                {
                    continue;
                }

                if (attr.UIContralType != UIContralType.DDL)
                {
                    continue;
                }

                if (attr.KeyOfEn == this.RefNo)
                {
                    continue;
                }

                ddl.Items.Add(new ListItem(attr.KeyOfEn + " - " + attr.Name, attr.KeyOfEn));
            }
            ddl.SetSelectItem(me.AttrsOfActive);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD("要实现联动的菜单");
            this.Pub1.AddTREnd();

            // 数据源列表.
            this.Pub1.AddTR();
            this.Pub1.AddTDGroupTitle("colspan=1", "数据源");

            ddl = new DDL();
            SFDBSrcs srcs = new SFDBSrcs();

            srcs.RetrieveAll();
            ddl.BindEntitiesNoName(srcs);

            this.Pub1.AddTD(ddl);
            // this.Pub1.AddTD("ccform允许从其他数据源中取数据,<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs')\" ><img src='/WF/Img/Setting.png' border=0/>设置/新建数据源</a>, <a href=\"javascript:window.localhost.href=window.localhost.href;\" >刷新数据源</a>");
            this.Pub1.AddTD("ccform允许从其他数据源中取数据,<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs','d2')\" ><img src='/WF/Img/Setting.png' border=0/>设置/新建数据源</a>, <a href=\"javascript:window.localhost.href=window.localhost.href;\" >刷新数据源</a>");

            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan='3'");
            RadioButton rb = new RadioButton();

            rb.Text      = "通过sql获取联动";
            rb.GroupName = "sdr";
            rb.ID        = "RB_0";
            if (me.DoWay == 0)
            {
                rb.Checked = true;
            }

            this.Pub1.Add("在下面文本框中输入一个SQL,具有编号,标签列,用来绑定下从动下拉框。<br />");
            this.Pub1.Add("比如:SELECT No, Name FROM CN_City WHERE FK_SF = '@Key' ");
            this.Pub1.AddBR();
            TextBox tb = new TextBox();

            tb.ID       = "TB_Doc";
            tb.Text     = me.Doc;
            tb.Columns  = 80;
            tb.CssClass = "TH";
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 7;
            tb.Style.Add("width", "99%");
            this.Pub1.Add(tb);
            this.Pub1.AddBR();
            this.Pub1.Add("说明:@Key是ccflow约定的关键字,是主下拉框传递过来的值");
            //this.Pub1.AddFieldSetEnd();

            rb           = new RadioButton();
            rb.Text      = "通过编码标识获取";
            rb.GroupName = "sdr";
            rb.Enabled   = false;
            rb.ID        = "RB_1";
            if (me.DoWay == 1)
            {
                rb.Checked = true;
            }

            //this.Pub1.AddFieldSet(rb);
            this.Pub1.Add("主菜单是编号的是从动菜单编号的前几位,不必联动内容。<br />");
            this.Pub1.Add("比如: 主下拉框是省份,联动菜单是城市。");
            //this.Pub1.AddFieldSetEnd();

            //this.Pub1.Add("</TD>");
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            var btn = new LinkBtn(false, NamesOfBtn.Save, "保存");

            btn.Click += new EventHandler(btn_SaveJiLian_Click);
            this.Pub1.AddTD("colspan=2", btn);

            if (i != 0)
            {
                btn        = new LinkBtn(false, NamesOfBtn.Delete, "删除");
                btn.Click += new EventHandler(btn_Del_Click);
                this.Pub1.AddTD("colspan=1", btn);
            }

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