예제 #1
0
        public string GoToFrmDesigner_Init()
        {
            //根据不同的表单类型转入不同的表单设计器上去.
            BP.Sys.MapData md = new BP.Sys.MapData(this.FK_MapData);
            if (md.HisFrmType == BP.Sys.FrmType.FoolForm)
            {
                /* 傻瓜表单 需要翻译. */
                return("url@../FoolFormDesigner/Designer.htm?IsFirst=1&FK_MapData=" + this.FK_MapData);
            }

            if (md.HisFrmType == BP.Sys.FrmType.FreeFrm)
            {
                /* 自由表单 */
                return("[email protected]?FK_MapData=" + this.FK_MapData + "&IsFirst=1");
            }

            if (md.HisFrmType == BP.Sys.FrmType.VSTOForExcel)
            {
                /* 自由表单 */
                return("[email protected]?FK_MapData=" + this.FK_MapData);
            }

            if (md.HisFrmType == BP.Sys.FrmType.Url)
            {
                /* 自由表单 */
                return("url@../../Comm/RefFunc/EnOnly.htm?EnName=BP.WF.Template.MapDataURL&No=" + this.FK_MapData);
            }

            if (md.HisFrmType == BP.Sys.FrmType.Entity)
            {
                return("url@../../Comm/Ens.htm?EnsName=" + md.PTable);
            }

            return("err@没有判断的表单转入类型" + md.HisFrmType.ToString());
        }
예제 #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
        private void LoadAttachment()
        {
            string EnName = "ND" + this.FK_Node;

            BP.Sys.MapData mapdata = new BP.Sys.MapData(EnName);

            FrmAttachments attachments = new BP.Sys.FrmAttachments();

            attachments = mapdata.FrmAttachments;


            bool isCompleate = false;

            BP.WF.Node node = new BP.WF.Node(FK_Node);
            try
            {
                WorkFlow workFlow = new WorkFlow(node.FK_Flow, WorkID);
                isCompleate = workFlow.IsComplete;
            }
            catch (Exception)
            {
                try
                {
                    Flow  fl  = new Flow(node.FK_Flow);
                    GERpt rpt = fl.HisGERpt;
                    rpt.OID = WorkID;
                    rpt.Retrieve();

                    if (rpt != null)
                    {
                        if (rpt.WFState == WFState.Complete)
                        {
                            isCompleate = true;
                        }
                    }
                }
                catch (Exception ex)
                {
                }
            }



            foreach (FrmAttachment ath in attachments)
            {
                string src = "";
                if (!isCompleate)
                {
                    src = CCFlowAppPath + "WF/CCForm/AttachmentUpload.aspx?PKVal=" + this.WorkID + "&Ath=" + ath.NoOfObj + "&FK_MapData=" + EnName + "&FK_FrmAttachment=" + ath.MyPK + "&FK_Node=" + this.FK_Node;
                }
                else
                {
                    src = CCFlowAppPath + "WF/CCForm/AttachmentUpload.aspx?PKVal=" + this.WorkID + "&Ath=" + ath.NoOfObj + "&FK_MapData=" + EnName + "&FK_FrmAttachment=" + ath.MyPK + "&FK_Node=" + this.FK_Node + "&IsReadonly=1";
                }

                this.Pub1.Add("<iframe ID='F" + ath.MyPK + "'    src='" + src + "' frameborder=0  style='position:absolute;width:" + ath.W + "px; height:" + ath.H + "px;text-align: left;'  leftMargin='0'  topMargin='0' scrolling=auto /></iframe>");
            }
        }
예제 #4
0
        public string GoToFrmDesigner_Init()
        {
            //根据不同的表单类型转入不同的表单设计器上去.
            BP.Sys.MapData md = new BP.Sys.MapData(this.FK_MapData);
            if (md.HisFrmType == BP.Sys.FrmType.FoolForm)
            {
                /* 傻瓜表单 需要翻译. */
                return("url@../FoolFormDesigner/Designer.htm?IsFirst=1&FK_MapData=" + this.FK_MapData);
            }

            if (md.HisFrmType == BP.Sys.FrmType.FreeFrm)
            {
                /* 自由表单 */
                return("[email protected]?FK_MapData=" + this.FK_MapData + "&IsFirst=1");
            }

            if (md.HisFrmType == BP.Sys.FrmType.VSTOForExcel)
            {
                /* 自由表单 */
                return("[email protected]?FK_MapData=" + this.FK_MapData);
            }

            return("err@没有判断的表单转入类型" + md.HisFrmType.ToString());
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Request.Browser.Cookies == false)
            {
                //this.Response.Write("您的浏览器不支持cookies功能,无法使用该系统。");
                //return;
            }

            if (this.PassKey != BP.Sys.SystemConfig.AppSettings["PassKey"])
            {
                return;
            }

            //if (this.Lang == null || this.Lang == "")
            //    throw new Exception("语言编号错误。");

            //   BP.Sys.SystemConfig.DoClearCash();
            BP.Port.Emp emp = new BP.Port.Emp("admin");
            BP.Web.WebUser.SignInOfGenerLang(emp, "CH");

            string fk_flow = this.Request.QueryString["FK_Flow"];
            string fk_Node = this.Request.QueryString["FK_Node"];

            string FK_MapData = this.Request.QueryString["FK_MapData"];

            if (string.IsNullOrEmpty(FK_MapData))
            {
                FK_MapData = this.Request.QueryString["PK"];
            }

            switch (this.DoType)
            {
            case "DownFormTemplete":
                DataSet        ds   = BP.Sys.MapData.GenerHisDataSet(FK_MapData);
                BP.Sys.MapData md   = new BP.Sys.MapData(FK_MapData);
                string         file = BP.Sys.SystemConfig.PathOfTemp + md.No + ".xml";
                ds.WriteXml(file);
                System.IO.FileInfo f = new System.IO.FileInfo(file);
                BP.Sys.PubClass.DownloadFile(f.FullName, md.Name + ".xml");
                this.Pub1.AddFieldSet("下载提示");

                string url = "../../../Temp/" + md.No + ".xml";
                this.Pub1.AddH2("ccflow 已经完成模板的生成了,正在执行下载如果您的浏览器没有反应请<a href='" + url + "' >点这里进行下载</a>。");
                this.Pub1.Add("如果该xml文件是在ie里直接打开的,请把鼠标放在连接上右键目标另存为,保存该模板。");
                this.Pub1.AddFieldSetEnd();
                return;

            case "Ens":     // 实体编辑.
                this.Response.Redirect("../../Comm/Batch.aspx?EnsName=" + this.EnsName, true);
                break;

            case "En":     // 单个实体编辑.
                switch (this.EnName)
                {
                case "BP.WF.Flow":
                    Flow fl = new Flow(this.PK);
                    if (fl.FlowAppType == FlowAppType.DocFlow)
                    {
                        this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.FlowDocs&No=" + this.PK, true);
                    }
                    else
                    {
                        this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.FlowSheets&No=" + this.PK, true);
                    }
                    return;

                case "BP.WF.Template.FlowSheet":
                case "BP.WF.Template.Ext.FlowSheet":
                    this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.FlowSheets&No=" + this.PK, true);
                    return;

                case "BP.WF.Template.Ext.NodeExts":
                    this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.NodeExts&No=" + this.PK, true);
                    return;

                case "BP.WF.Node":
                    Node nd = new Node(this.PK);
                    this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.NodeSheets&PK=" + this.PK, true);
                    return;

                case "BP.WF.Template.FlowExt":
                    this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.FlowExts&PK=" + this.PK, true);
                    return;

                case "BP.WF.Template.NodeExt":
                    this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.NodeExts&PK=" + this.PK, true);
                    return;

                case "BP.WF.Template.FlowSort":
                    this.Response.Redirect("../../Comm/RefFunc/UIEn.aspx?EnsName=BP.WF.Template.FlowSorts&PK=" + this.PK, true);
                    return;

                default:
                    throw new Exception("err");
                    //this.Response.Redirect("./Comm/RefFunc/UIEn.aspx?EnsName=" + this.EnsName + "&No=" + this.PK, true);
                }

            case "FrmLib":     //"表单库"
                this.Response.Redirect("../BindFrms.aspx?ShowType=SelectedFrm&FK_Flow=" + fk_flow + "&FK_Node=" + fk_Node + "&Lang=" + BP.Web.WebUser.SysLang, true);
                break;

            case "FlowFrms":     //"独立表单"
                this.Response.Redirect("../BindFrms.aspx?ShowType=FlowFrms&FK_Flow=" + fk_flow + "&FK_Node=" + fk_Node + "&Lang=" + BP.Web.WebUser.SysLang, true);
                break;

            case "StaDef":     // 节点岗位.
                this.Response.Redirect("../../Comm/RefFunc/Dot2Dot.aspx?EnName=BP.WF.Template.NodeSheet&AttrKey=BP.WF.Template.NodeStations&PK=" + this.PK + "&NodeID=" + this.PK + "&RunModel=0&FLRole=0&FJOpen=0&r=" + this.PK, true);
                break;

            case "StaDefNew":     // 新版本.. http://localhost:13432/WF/Comm/RefFunc/Dot2DotSingle.aspx
                this.Response.Redirect("../../Comm/RefFunc/Dot2DotSingle.aspx?EnsName=BP.WF.Template.NodeSheets&EnName=BP.WF.Template.NodeSheet&AttrKey=BP.WF.Template.NodeStations&NodeID=" + this.PK + "&r=0319061642&1=FK_StationType&ShowWay=None" + this.PK, true);
                break;

            case "WFRpt":     // 报表设计.r
                this.Response.Redirect("../../Rpt/OneFlow.aspx?FK_MapData=ND" + int.Parse(this.PK) + "Rpt&FK_Flow=" + this.PK, true);
                break;

            case "MapDef":     //表单定义.
                int  nodeid = int.Parse(this.PK.Replace("ND", ""));
                Node nd1    = new Node();
                nd1.NodeID = nodeid;
                nd1.RetrieveFromDBSources();
                if (nd1.HisFormType == NodeFormType.FreeForm)
                {
                    this.Response.Redirect("../../MapDef/CCForm/Frm.aspx?FK_MapData=" + this.PK + "&FK_Flow=" + nd1.FK_Flow + "&FK_Node=" + this.FK_Node, true);
                }
                else
                {
                    this.Response.Redirect("../../MapDef/MapDef.aspx?PK=" + this.PK + "&FK_Flow=" + nd1.FK_Flow + "&FK_Node=" + this.FK_Node, true);
                }
                break;

            case "MapDefFixModel":     // 表单定义.
            case "FormFixModel":
                this.Response.Redirect("../../MapDef/MapDef.aspx?FK_MapData=" + FK_MapData + "&FK_Flow=" + this.FK_Flow + "&FK_Node=" + this.FK_Node, true);
                break;

            case "MapDefFreeModel":     // 表单定义.
            case "FormFreeModel":
                this.Response.Redirect("../../MapDef/CCForm/Frm.aspx?FK_MapData=" + FK_MapData + "&FK_Flow=" + this.FK_Flow + "&FK_Node=" + this.FK_Node, true);
                break;

            case "MapDefFree":     //表单定义.
                int  nodeidFree = int.Parse(this.PK.Replace("ND", ""));
                Node ndFree     = new Node(nodeidFree);
                this.Response.Redirect("../MapDef/CCForm/Frm.aspx?FK_MapData=" + this.PK + "&FK_Flow=" + ndFree.FK_Flow + "&FK_Node=" + ndFree.NodeID, true);
                break;

            case "MapDefF4":     //表单定义.
                int  nodeidF4 = int.Parse(this.PK.Replace("ND", ""));
                Node ndF4     = new Node(nodeidF4);
                this.Response.Redirect("../../MapDef/MapDef.aspx?PK=" + this.PK + "&FK_Flow=" + ndF4.FK_Flow + "&FK_Node=" + nodeidF4, true);
                break;

            case "Dir":     // 方向。
                this.Response.Redirect("../Admin/ConditionLine.aspx?CondType=" + this.Request.QueryString["CondType"] + "&FK_Flow=" + this.Request.QueryString["FK_Flow"] + "&FK_MainNode=" + this.Request.QueryString["FK_MainNode"] + "&FK_Node=" + this.Request.QueryString["FK_Node"] + "&FK_Attr=" + this.Request.QueryString["FK_Attr"] + "&DirType=" + this.Request.QueryString["DirType"] + "&ToNodeID=" + this.Request.QueryString["ToNodeID"], true);
                break;

            case "RunFlow":     //运行流程
                this.Response.Redirect("../Admin/StartFlow.aspx?FK_Flow=" + fk_flow + "&Lang=" + BP.Web.WebUser.SysLang, true);
                break;

            case "FlowCheck":     // 流程设计
                this.Response.Redirect("../Admin/DoType.aspx?RefNo=" + this.Request.QueryString["RefNo"] + "&DoType=" + this.DoType, true);
                break;

            case "ExpFlowTemplete":     //流程设计.
                Flow   flow    = new Flow(FK_Flow);
                string fileXml = flow.GenerFlowXmlTemplete();

                BP.Sys.PubClass.DownloadFile(fileXml, flow.Name + ".xml");
                BP.Sys.PubClass.WinClose();
                break;

            case "UploadShare":
                upload();
                break;

            case "ShareToFtp":
                // BP.Web.Common.ShareToFtp();
                break;

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