コード例 #1
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="enName"></param>
        /// <returns></returns>
        public int RetrieveFieldGroup(string enName)
        {
            QueryObject qo = new QueryObject(this);

            qo.AddWhere(GroupFieldAttr.FrmID, enName);
            qo.addAnd();
            qo.AddWhereIsNull(GroupFieldAttr.CtrlID);
            //qo.AddWhereLen(GroupFieldAttr.CtrlID, " = ", 0, SystemConfig.AppCenterDBType);
            int num = qo.DoQuery();

            if (num == 0)
            {
                GroupField gf = new GroupField();
                gf.FrmID = enName;
                MapData md = new MapData();
                md.No = enName;
                if (md.RetrieveFromDBSources() == 0)
                {
                    gf.Lab = "基础信息";
                }
                else
                {
                    gf.Lab = md.Name;
                }
                gf.Idx = 0;
                gf.Insert();
                this.AddEntity(gf);
                return(1);
            }
            return(num);
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "ccfrom:导入导出";
            BP.Sys.MapData md = new BP.Sys.MapData();
            md.No = this.RefNo;
            md.RetrieveFromDBSources();
            switch (this.DoType)
            {
            case "Exp":
                DataSet ds   = md.GenerHisDataSet();
                string  file = this.Request.PhysicalApplicationPath + "\\DataUser\\Temp\\" + this.RefNo + ".xml";
                ds.WriteXml(file);
                BP.Sys.PubClass.DownloadFile(file, md.Name + ".xml");
                this.WinClose();
                break;

            case "Imp":
                MapData mdForm = new MapData(this.FromMap);
                MapData.ImpMapData(this.RefNo, mdForm.GenerHisDataSet(), true);
                this.WinClose();
                return;

            case "Share":
                this.Share();
                break;

            default:
                this.BindHome();
                break;
            }
        }
コード例 #3
0
        /// <summary>
        /// GroupFields
        /// </summary>
        /// <param name="enName">名称</param>
        public GroupFields(string enName)
        {
            int i = this.Retrieve(GroupFieldAttr.FrmID, enName, GroupFieldAttr.Idx);

            if (i == 0)
            {
                GroupField gf = new GroupField();
                gf.FrmID = enName;
                MapData md = new MapData();
                md.No = enName;
                if (md.RetrieveFromDBSources() == 0)
                {
                    gf.Lab = "基础信息";
                }
                else
                {
                    gf.Lab = md.Name;
                }
                gf.Idx = 0;
                gf.Insert();
                this.AddEntity(gf);
            }
        }