public string Save()
        {
            string html         = base.Request["html"];
            string text         = base.Request["name"];
            string attribute    = base.Request["att"];
            string str          = base.Request["id"];
            string str2         = base.Request["type"];
            string subTableJson = base.Request["subtable"];
            string eventsJson   = base.Request["formEvents"];

            if (text.IsNullOrEmpty())
            {
                return("表单名称不能为空!");
            }
            Guid test;

            if (!str.IsGuid(out test))
            {
                return("表单ID无效!");
            }
            RoadFlow.Platform.WorkFlowForm   workFlowForm  = new RoadFlow.Platform.WorkFlowForm();
            RoadFlow.Data.Model.WorkFlowForm workFlowForm2 = workFlowForm.Get(test);
            bool   flag   = false;
            string oldXML = string.Empty;

            if (workFlowForm2 == null)
            {
                workFlowForm2                = new RoadFlow.Data.Model.WorkFlowForm();
                workFlowForm2.ID             = test;
                workFlowForm2.CreateUserID   = RoadFlow.Platform.Users.CurrentUserID;
                workFlowForm2.CreateUserName = RoadFlow.Platform.Users.CurrentUserName;
                workFlowForm2.CreateTime     = DateTimeNew.Now;
                workFlowForm2.Status         = 0;
                flag = true;
            }
            else
            {
                oldXML = workFlowForm2.Serialize();
            }
            workFlowForm2.Attribute      = attribute;
            workFlowForm2.Html           = html;
            workFlowForm2.LastModifyTime = DateTimeNew.Now;
            workFlowForm2.Name           = text;
            workFlowForm2.Type           = str2.ToGuid();
            workFlowForm2.SubTableJson   = subTableJson;
            workFlowForm2.EventsJson     = eventsJson;
            if (flag)
            {
                workFlowForm.Add(workFlowForm2);
                RoadFlow.Platform.Log.Add("添加了流程表单", workFlowForm2.Serialize(), RoadFlow.Platform.Log.Types.流程相关);
            }
            else
            {
                workFlowForm.Update(workFlowForm2);
                RoadFlow.Platform.Log.Add("修改了流程表单", "", RoadFlow.Platform.Log.Types.流程相关, oldXML, workFlowForm2.Serialize());
            }
            return("保存成功!");
        }
Exemplo n.º 2
0
        private List <RoadFlow.Data.Model.WorkFlowForm> DataReaderToList(OracleDataReader dataReader)
        {
            List <RoadFlow.Data.Model.WorkFlowForm> list = new List <RoadFlow.Data.Model.WorkFlowForm>();

            RoadFlow.Data.Model.WorkFlowForm workFlowForm = null;
            while (((DbDataReader)dataReader).Read())
            {
                workFlowForm                = new RoadFlow.Data.Model.WorkFlowForm();
                workFlowForm.ID             = ((DbDataReader)dataReader).GetString(0).ToGuid();
                workFlowForm.Name           = ((DbDataReader)dataReader).GetString(1);
                workFlowForm.Type           = ((DbDataReader)dataReader).GetString(2).ToGuid();
                workFlowForm.CreateUserID   = ((DbDataReader)dataReader).GetString(3).ToGuid();
                workFlowForm.CreateUserName = ((DbDataReader)dataReader).GetString(4);
                workFlowForm.CreateTime     = ((DbDataReader)dataReader).GetDateTime(5);
                workFlowForm.LastModifyTime = ((DbDataReader)dataReader).GetDateTime(6);
                if (!((DbDataReader)dataReader).IsDBNull(7))
                {
                    workFlowForm.Html = ((DbDataReader)dataReader).GetString(7);
                }
                if (!((DbDataReader)dataReader).IsDBNull(8))
                {
                    workFlowForm.SubTableJson = ((DbDataReader)dataReader).GetString(8);
                }
                if (!((DbDataReader)dataReader).IsDBNull(9))
                {
                    workFlowForm.EventsJson = ((DbDataReader)dataReader).GetString(9);
                }
                if (!((DbDataReader)dataReader).IsDBNull(10))
                {
                    workFlowForm.Attribute = ((DbDataReader)dataReader).GetString(10);
                }
                workFlowForm.Status = ((DbDataReader)dataReader).GetInt32(11);
                list.Add(workFlowForm);
            }
            return(list);
        }
Exemplo n.º 3
0
        public int Update(RoadFlow.Data.Model.WorkFlowForm model)
        {
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0020: Unknown result type (might be due to invalid IL or missing references)
            //IL_002c: Expected O, but got Unknown
            //IL_002d: Expected O, but got Unknown
            //IL_0038: Unknown result type (might be due to invalid IL or missing references)
            //IL_003d: Unknown result type (might be due to invalid IL or missing references)
            //IL_004e: Expected O, but got Unknown
            //IL_004f: Expected O, but got Unknown
            //IL_005a: Unknown result type (might be due to invalid IL or missing references)
            //IL_005f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0070: Expected O, but got Unknown
            //IL_0071: Expected O, but got Unknown
            //IL_007c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0081: Unknown result type (might be due to invalid IL or missing references)
            //IL_008d: Expected O, but got Unknown
            //IL_008e: Expected O, but got Unknown
            //IL_0098: Unknown result type (might be due to invalid IL or missing references)
            //IL_009d: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ae: Expected O, but got Unknown
            //IL_00af: Expected O, but got Unknown
            //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00be: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cf: Expected O, but got Unknown
            //IL_00d0: Expected O, but got Unknown
            //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f2: Expected O, but got Unknown
            //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
            //IL_0100: Unknown result type (might be due to invalid IL or missing references)
            //IL_010b: Expected O, but got Unknown
            //IL_010c: Expected O, but got Unknown
            //IL_011d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0122: Unknown result type (might be due to invalid IL or missing references)
            //IL_012e: Expected O, but got Unknown
            //IL_0137: Unknown result type (might be due to invalid IL or missing references)
            //IL_013c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0147: Expected O, but got Unknown
            //IL_0148: Expected O, but got Unknown
            //IL_0159: Unknown result type (might be due to invalid IL or missing references)
            //IL_015e: Unknown result type (might be due to invalid IL or missing references)
            //IL_016a: Expected O, but got Unknown
            //IL_0173: Unknown result type (might be due to invalid IL or missing references)
            //IL_0178: Unknown result type (might be due to invalid IL or missing references)
            //IL_0183: Expected O, but got Unknown
            //IL_0184: Expected O, but got Unknown
            //IL_0196: Unknown result type (might be due to invalid IL or missing references)
            //IL_019b: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a7: Expected O, but got Unknown
            //IL_01b0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c0: Expected O, but got Unknown
            //IL_01c1: Expected O, but got Unknown
            //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e1: Expected O, but got Unknown
            //IL_01e2: Expected O, but got Unknown
            //IL_01ee: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f3: Unknown result type (might be due to invalid IL or missing references)
            //IL_0204: Expected O, but got Unknown
            //IL_0205: Expected O, but got Unknown
            string sql = "UPDATE WorkFlowForm SET \r\n\t\t\t\tName=:Name,Type=:Type,CreateUserID=:CreateUserID,CreateUserName=:CreateUserName,CreateTime=:CreateTime,LastModifyTime=:LastModifyTime,Html=:Html,SubTableJson=:SubTableJson,EventsJson=:EventsJson,Attribute=:Attribute,Status=:Status\r\n\t\t\t\tWHERE ID=:ID";

            OracleParameter[] obj = new OracleParameter[12];
            OracleParameter   val = new OracleParameter(":Name", 119, 1000);

            ((DbParameter)val).Value = model.Name;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Type", 126, 40);

            ((DbParameter)val2).Value = model.Type;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":CreateUserID", 126, 40);

            ((DbParameter)val3).Value = model.CreateUserID;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":CreateUserName", 119, 100);

            ((DbParameter)val4).Value = model.CreateUserName;
            obj[3] = val4;
            OracleParameter val5 = new OracleParameter(":CreateTime", 106, 8);

            ((DbParameter)val5).Value = model.CreateTime;
            obj[4] = val5;
            OracleParameter val6 = new OracleParameter(":LastModifyTime", 106, 8);

            ((DbParameter)val6).Value = model.LastModifyTime;
            obj[5] = val6;
            _003F val7;

            if (model.Html != null)
            {
                val7 = new OracleParameter(":Html", 105);
                ((DbParameter)val7).Value = model.Html;
            }
            else
            {
                val7 = new OracleParameter(":Html", 105);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.SubTableJson != null)
            {
                val8 = new OracleParameter(":SubTableJson", 105);
                ((DbParameter)val8).Value = model.SubTableJson;
            }
            else
            {
                val8 = new OracleParameter(":SubTableJson", 105);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.EventsJson != null)
            {
                val9 = new OracleParameter(":EventsJson", 105);
                ((DbParameter)val9).Value = model.EventsJson;
            }
            else
            {
                val9 = new OracleParameter(":EventsJson", 105);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.Attribute != null)
            {
                val10 = new OracleParameter(":Attribute", 105);
                ((DbParameter)val10).Value = model.Attribute;
            }
            else
            {
                val10 = new OracleParameter(":Attribute", 105);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            OracleParameter val11 = new OracleParameter(":Status", 112);

            ((DbParameter)val11).Value = model.Status;
            obj[10] = val11;
            OracleParameter val12 = new OracleParameter(":ID", 126, 40);

            ((DbParameter)val12).Value = model.ID;
            obj[11] = val12;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 4
0
        public int Add(RoadFlow.Data.Model.WorkFlowForm model)
        {
            //IL_0018: Unknown result type (might be due to invalid IL or missing references)
            //IL_001d: Unknown result type (might be due to invalid IL or missing references)
            //IL_002e: Expected O, but got Unknown
            //IL_002f: Expected O, but got Unknown
            //IL_003d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0042: Unknown result type (might be due to invalid IL or missing references)
            //IL_004e: Expected O, but got Unknown
            //IL_004f: Expected O, but got Unknown
            //IL_005a: Unknown result type (might be due to invalid IL or missing references)
            //IL_005f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0070: Expected O, but got Unknown
            //IL_0071: Expected O, but got Unknown
            //IL_007c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0081: Unknown result type (might be due to invalid IL or missing references)
            //IL_0092: Expected O, but got Unknown
            //IL_0093: Expected O, but got Unknown
            //IL_009e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00af: Expected O, but got Unknown
            //IL_00b0: Expected O, but got Unknown
            //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d0: Expected O, but got Unknown
            //IL_00d1: Expected O, but got Unknown
            //IL_00db: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f1: Expected O, but got Unknown
            //IL_00f2: Expected O, but got Unknown
            //IL_0103: Unknown result type (might be due to invalid IL or missing references)
            //IL_0108: Unknown result type (might be due to invalid IL or missing references)
            //IL_0114: Expected O, but got Unknown
            //IL_011d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0122: Unknown result type (might be due to invalid IL or missing references)
            //IL_012d: Expected O, but got Unknown
            //IL_012e: Expected O, but got Unknown
            //IL_013f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0144: Unknown result type (might be due to invalid IL or missing references)
            //IL_0150: Expected O, but got Unknown
            //IL_0159: Unknown result type (might be due to invalid IL or missing references)
            //IL_015e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0169: Expected O, but got Unknown
            //IL_016a: Expected O, but got Unknown
            //IL_017c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0181: Unknown result type (might be due to invalid IL or missing references)
            //IL_018d: Expected O, but got Unknown
            //IL_0196: Unknown result type (might be due to invalid IL or missing references)
            //IL_019b: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a6: Expected O, but got Unknown
            //IL_01a7: Expected O, but got Unknown
            //IL_01b9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01be: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ca: Expected O, but got Unknown
            //IL_01d3: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e3: Expected O, but got Unknown
            //IL_01e4: Expected O, but got Unknown
            //IL_01ee: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f3: Unknown result type (might be due to invalid IL or missing references)
            //IL_0204: Expected O, but got Unknown
            //IL_0205: Expected O, but got Unknown
            string sql = "INSERT INTO WorkFlowForm\r\n\t\t\t\t(ID,Name,Type,CreateUserID,CreateUserName,CreateTime,LastModifyTime,Html,SubTableJson,EventsJson,Attribute,Status) \r\n\t\t\t\tVALUES(:ID,:Name,:Type,:CreateUserID,:CreateUserName,:CreateTime,:LastModifyTime,:Html,:SubTableJson,:EventsJson,:Attribute,:Status)";

            OracleParameter[] obj = new OracleParameter[12];
            OracleParameter   val = new OracleParameter(":ID", 126, 40);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Name", 119, 1000);

            ((DbParameter)val2).Value = model.Name;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":Type", 126, 40);

            ((DbParameter)val3).Value = model.Type;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":CreateUserID", 126, 40);

            ((DbParameter)val4).Value = model.CreateUserID;
            obj[3] = val4;
            OracleParameter val5 = new OracleParameter(":CreateUserName", 119, 100);

            ((DbParameter)val5).Value = model.CreateUserName;
            obj[4] = val5;
            OracleParameter val6 = new OracleParameter(":CreateTime", 106, 8);

            ((DbParameter)val6).Value = model.CreateTime;
            obj[5] = val6;
            OracleParameter val7 = new OracleParameter(":LastModifyTime", 106, 8);

            ((DbParameter)val7).Value = model.LastModifyTime;
            obj[6] = val7;
            _003F val8;

            if (model.Html != null)
            {
                val8 = new OracleParameter(":Html", 105);
                ((DbParameter)val8).Value = model.Html;
            }
            else
            {
                val8 = new OracleParameter(":Html", 105);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.SubTableJson != null)
            {
                val9 = new OracleParameter(":SubTableJson", 105);
                ((DbParameter)val9).Value = model.SubTableJson;
            }
            else
            {
                val9 = new OracleParameter(":SubTableJson", 105);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.EventsJson != null)
            {
                val10 = new OracleParameter(":EventsJson", 105);
                ((DbParameter)val10).Value = model.EventsJson;
            }
            else
            {
                val10 = new OracleParameter(":EventsJson", 105);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.Attribute != null)
            {
                val11 = new OracleParameter(":Attribute", 105);
                ((DbParameter)val11).Value = model.Attribute;
            }
            else
            {
                val11 = new OracleParameter(":Attribute", 105);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            OracleParameter val12 = new OracleParameter(":Status", 112);

            ((DbParameter)val12).Value = model.Status;
            obj[11] = val12;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
        public string Publish()
        {
            string text  = base.Request["html"];
            string text2 = base.Request["name"];
            string text3 = base.Request["att"];
            string text4 = base.Request["id"];
            string str   = base.Request["formats"];
            Guid   test;

            if (!text4.IsGuid(out test) || text2.IsNullOrEmpty() || text3.IsNullOrEmpty())
            {
                return("参数错误!");
            }
            RoadFlow.Platform.WorkFlowForm   workFlowForm  = new RoadFlow.Platform.WorkFlowForm();
            RoadFlow.Data.Model.WorkFlowForm workFlowForm2 = workFlowForm.Get(test);
            if (workFlowForm2 == null)
            {
                return("请先保存表单再发布!");
            }
            string        str2          = text4 + ".cshtml";
            StringBuilder stringBuilder = new StringBuilder("@{\r\n");
            JsonData      jsonData      = JsonMapper.ToObject(text3);

            stringBuilder.Append("\tstring FlowID = Request.QueryString[\"flowid\"];\r\n");
            stringBuilder.Append("\tstring StepID = Request.QueryString[\"stepid\"];\r\n");
            stringBuilder.Append("\tstring GroupID = Request.QueryString[\"groupid\"];\r\n");
            stringBuilder.Append("\tstring TaskID = Request.QueryString[\"taskid\"];\r\n");
            stringBuilder.Append("\tstring InstanceID = Request.QueryString[\"instanceid\"];\r\n");
            stringBuilder.Append("\tstring DisplayModel = Request.QueryString[\"display\"] ?? \"0\";\r\n");
            stringBuilder.AppendFormat("\tstring DBConnID = \"{0}\";\r\n", jsonData["dbconn"].ToString());
            stringBuilder.AppendFormat("\tstring DBTable = \"{0}\";\r\n", jsonData["dbtable"].ToString());
            stringBuilder.AppendFormat("\tstring DBTablePK = \"{0}\";\r\n", jsonData["dbtablepk"].ToString());
            stringBuilder.AppendFormat("\tstring DBTableTitle = \"{0}\";\r\n", jsonData["dbtabletitle"].ToString());
            stringBuilder.Append("\tif(InstanceID.IsNullOrEmpty()){InstanceID = Request.QueryString[\"instanceid1\"];}\r\n");
            stringBuilder.Append("\tRoadFlow.Platform.Dictionary BDictionary = new RoadFlow.Platform.Dictionary();\r\n");
            stringBuilder.Append("\tRoadFlow.Platform.WorkFlow BWorkFlow = new RoadFlow.Platform.WorkFlow();\r\n");
            stringBuilder.Append("\tRoadFlow.Platform.WorkFlowTask BWorkFlowTask = new RoadFlow.Platform.WorkFlowTask();\r\n");
            stringBuilder.Append("\tstring fieldStatus = BWorkFlow.GetFieldStatus(FlowID, StepID);\r\n");
            stringBuilder.Append("\tLitJson.JsonData initData = BWorkFlow.GetFormData(DBConnID, DBTable, DBTablePK, InstanceID, fieldStatus, \"" + str + "\");\r\n");
            stringBuilder.Append("\tstring TaskTitle = BWorkFlow.GetFromFieldData(initData, DBTable, DBTableTitle);\r\n");
            stringBuilder.Append("}\r\n");
            stringBuilder.Append("<link href=\"~/Scripts/FlowRun/Forms/flowform.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
            stringBuilder.Append("<script src=\"~/Scripts/FlowRun/Forms/common.js\" type=\"text/javascript\" ></script>\r\n");
            if (jsonData.ContainsKey("hasEditor") && "1" == jsonData["hasEditor"].ToString())
            {
                stringBuilder.Append("<script src=\"~/Scripts/Ueditor/ueditor.config.js\" type=\"text/javascript\" ></script>\r\n");
                stringBuilder.Append("<script src=\"~/Scripts/Ueditor/ueditor.all.min.js\" type=\"text/javascript\" ></script>\r\n");
                stringBuilder.Append("<script src=\"~/Scripts/Ueditor/lang/zh-cn/zh-cn.js\" type=\"text/javascript\" ></script>\r\n");
                stringBuilder.Append("<input type=\"hidden\" id=\"Form_HasUEditor\" name=\"Form_HasUEditor\" value=\"1\" />\r\n");
            }
            string str3 = jsonData.ContainsKey("validatealerttype") ? jsonData["validatealerttype"].ToString() : "2";

            stringBuilder.Append("<input type=\"hidden\" id=\"Form_ValidateAlertType\" name=\"Form_ValidateAlertType\" value=\"" + str3 + "\" />\r\n");
            if (jsonData.ContainsKey("autotitle") && jsonData["autotitle"].ToString().ToLower() == "true")
            {
                stringBuilder.AppendFormat("<input type=\"hidden\" id=\"{0}\" name=\"{0}\" value=\"{1}\" />\r\n", jsonData["dbtable"].ToString() + "." + jsonData["dbtabletitle"].ToString(), "@(TaskTitle.IsNullOrEmpty() ? BWorkFlow.GetAutoTaskTitle(FlowID, StepID, Request.QueryString[\"groupid\"]) : TaskTitle)");
            }
            stringBuilder.AppendFormat("<input type=\"hidden\" id=\"Form_TitleField\" name=\"Form_TitleField\" value=\"{0}\" />\r\n", jsonData["dbtable"].ToString() + "." + jsonData["dbtabletitle"].ToString());
            stringBuilder.AppendFormat("<input type=\"hidden\" id=\"Form_DBConnID\" name=\"Form_DBConnID\" value=\"{0}\" />\r\n", jsonData["dbconn"].ToString());
            stringBuilder.AppendFormat("<input type=\"hidden\" id=\"Form_DBTable\" name=\"Form_DBTable\" value=\"{0}\" />\r\n", jsonData["dbtable"].ToString());
            stringBuilder.AppendFormat("<input type=\"hidden\" id=\"Form_DBTablePk\" name=\"Form_DBTablePk\" value=\"{0}\" />\r\n", jsonData["dbtablepk"].ToString());
            stringBuilder.AppendFormat("<input type=\"hidden\" id=\"Form_DBTableTitle\" name=\"Form_DBTableTitle\" value=\"{0}\" />\r\n", jsonData["dbtabletitle"].ToString());
            stringBuilder.AppendFormat("<input type=\"hidden\" id=\"Form_AutoSaveData\" name=\"Form_AutoSaveData\" value=\"{0}\" />\r\n", "1");
            stringBuilder.AppendFormat("<textarea id=\"Form_DBTableTitleExpression\" name=\"Form_DBTableTitleExpression\" style=\"display:none;width:0;height:0;\">{0}</textarea>\r\n", jsonData.ContainsKey("dbtabletitle1") ? jsonData["dbtabletitle1"].ToString() : "");
            stringBuilder.Append("<script type=\"text/javascript\">\r\n");
            stringBuilder.Append("\tvar initData = @Html.Raw(BWorkFlow.GetFormDataJsonString(initData));\r\n");
            stringBuilder.Append("\tvar fieldStatus = \"1\"==\"@Request.QueryString[\"isreadonly\"]\" ? {} : @Html.Raw(fieldStatus);\r\n");
            stringBuilder.Append("\tvar displayModel = '@DisplayModel';\r\n");
            stringBuilder.Append("\t$(window).load(function (){\r\n");
            stringBuilder.AppendFormat("\t\tformrun.initData(initData, \"{0}\", fieldStatus, displayModel);\r\n", jsonData["dbtable"].ToString());
            stringBuilder.Append("\t});\r\n");
            stringBuilder.Append("</script>\r\n");
            FileStream fileStream = System.IO.File.Open(base.Server.MapPath("~/Views/WorkFlowFormDesigner/Forms/" + str2), FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);

            fileStream.SetLength(0L);
            StreamWriter streamWriter = new StreamWriter(fileStream, Encoding.UTF8);

            streamWriter.Write(stringBuilder.ToString());
            streamWriter.Write(base.Server.HtmlDecode(text));
            streamWriter.Close();
            fileStream.Close();
            string str4 = JsonMapper.ToObject(workFlowForm2.Attribute)["apptype"].ToString();

            RoadFlow.Platform.AppLibrary   appLibrary  = new RoadFlow.Platform.AppLibrary();
            RoadFlow.Data.Model.AppLibrary appLibrary2 = appLibrary.GetByCode(text4);
            bool flag = false;

            if (appLibrary2 == null)
            {
                appLibrary2      = new RoadFlow.Data.Model.AppLibrary();
                appLibrary2.ID   = Guid.NewGuid();
                appLibrary2.Code = text4;
                flag             = true;
            }
            appLibrary2.Address  = "/Views/WorkFlowFormDesigner/Forms/" + str2;
            appLibrary2.Note     = "流程表单";
            appLibrary2.OpenMode = 0;
            appLibrary2.Params   = "";
            appLibrary2.Title    = text2.Trim();
            appLibrary2.Type     = (str4.IsGuid() ? str4.ToGuid() : new RoadFlow.Platform.Dictionary().GetIDByCode("FormTypes"));
            if (flag)
            {
                appLibrary.Add(appLibrary2);
            }
            else
            {
                appLibrary.Update(appLibrary2);
            }
            RoadFlow.Platform.Log.Add("发布了流程表单", appLibrary2.Serialize() + "内容:" + text, RoadFlow.Platform.Log.Types.流程相关);
            workFlowForm2.Status = 1;
            workFlowForm.Update(workFlowForm2);
            return("发布成功!");
        }
Exemplo n.º 6
0
        public int Update(RoadFlow.Data.Model.WorkFlowForm model)
        {
            //IL_001a: Unknown result type (might be due to invalid IL or missing references)
            //IL_001f: Unknown result type (might be due to invalid IL or missing references)
            //IL_002b: Expected O, but got Unknown
            //IL_002c: Expected O, but got Unknown
            //IL_003a: Unknown result type (might be due to invalid IL or missing references)
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0050: Expected O, but got Unknown
            //IL_0051: Expected O, but got Unknown
            //IL_005f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0064: Unknown result type (might be due to invalid IL or missing references)
            //IL_0075: Expected O, but got Unknown
            //IL_0076: Expected O, but got Unknown
            //IL_0084: Unknown result type (might be due to invalid IL or missing references)
            //IL_0089: Unknown result type (might be due to invalid IL or missing references)
            //IL_0095: Expected O, but got Unknown
            //IL_0096: Expected O, but got Unknown
            //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b6: Expected O, but got Unknown
            //IL_00b7: Expected O, but got Unknown
            //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d7: Expected O, but got Unknown
            //IL_00d8: Expected O, but got Unknown
            //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fe: Expected O, but got Unknown
            //IL_010b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0110: Unknown result type (might be due to invalid IL or missing references)
            //IL_011b: Expected O, but got Unknown
            //IL_011c: Expected O, but got Unknown
            //IL_0131: Unknown result type (might be due to invalid IL or missing references)
            //IL_0136: Unknown result type (might be due to invalid IL or missing references)
            //IL_0142: Expected O, but got Unknown
            //IL_014f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0154: Unknown result type (might be due to invalid IL or missing references)
            //IL_015f: Expected O, but got Unknown
            //IL_0160: Expected O, but got Unknown
            //IL_0175: Unknown result type (might be due to invalid IL or missing references)
            //IL_017a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0186: Expected O, but got Unknown
            //IL_0193: Unknown result type (might be due to invalid IL or missing references)
            //IL_0198: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a3: Expected O, but got Unknown
            //IL_01a4: Expected O, but got Unknown
            //IL_01ba: Unknown result type (might be due to invalid IL or missing references)
            //IL_01bf: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cb: Expected O, but got Unknown
            //IL_01d8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01dd: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e8: Expected O, but got Unknown
            //IL_01e9: Expected O, but got Unknown
            //IL_01f4: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f9: Unknown result type (might be due to invalid IL or missing references)
            //IL_020a: Expected O, but got Unknown
            //IL_020b: Expected O, but got Unknown
            //IL_021a: Unknown result type (might be due to invalid IL or missing references)
            //IL_021f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0230: Expected O, but got Unknown
            //IL_0231: Expected O, but got Unknown
            string sql = "UPDATE workflowform SET \r\n\t\t\t\tName=@Name,Type=@Type,CreateUserID=@CreateUserID,CreateUserName=@CreateUserName,CreateTime=@CreateTime,LastModifyTime=@LastModifyTime,Html=@Html,SubTableJson=@SubTableJson,EventsJson=@EventsJson,Attribute=@Attribute,Status=@Status\r\n\t\t\t\tWHERE ID=@ID";

            MySqlParameter[] obj = new MySqlParameter[12];
            MySqlParameter   val = new MySqlParameter("@Name", 752, -1);

            ((DbParameter)val).Value = model.Name;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Type", 253, 36);

            ((DbParameter)val2).Value = model.Type;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@CreateUserID", 253, 36);

            ((DbParameter)val3).Value = model.CreateUserID;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@CreateUserName", 253, 50);

            ((DbParameter)val4).Value = model.CreateUserName;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@CreateTime", 12, -1);

            ((DbParameter)val5).Value = model.CreateTime;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@LastModifyTime", 12, -1);

            ((DbParameter)val6).Value = model.LastModifyTime;
            obj[5] = val6;
            _003F val7;

            if (model.Html != null)
            {
                val7 = new MySqlParameter("@Html", 751, -1);
                ((DbParameter)val7).Value = model.Html;
            }
            else
            {
                val7 = new MySqlParameter("@Html", 751, -1);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.SubTableJson != null)
            {
                val8 = new MySqlParameter("@SubTableJson", 751, -1);
                ((DbParameter)val8).Value = model.SubTableJson;
            }
            else
            {
                val8 = new MySqlParameter("@SubTableJson", 751, -1);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.EventsJson != null)
            {
                val9 = new MySqlParameter("@EventsJson", 751, -1);
                ((DbParameter)val9).Value = model.EventsJson;
            }
            else
            {
                val9 = new MySqlParameter("@EventsJson", 751, -1);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.Attribute != null)
            {
                val10 = new MySqlParameter("@Attribute", 751, -1);
                ((DbParameter)val10).Value = model.Attribute;
            }
            else
            {
                val10 = new MySqlParameter("@Attribute", 751, -1);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            MySqlParameter val11 = new MySqlParameter("@Status", 3, 11);

            ((DbParameter)val11).Value = model.Status;
            obj[10] = val11;
            MySqlParameter val12 = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val12).Value = model.ID;
            obj[11] = val12;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 7
0
        public int Add(RoadFlow.Data.Model.WorkFlowForm model)
        {
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0020: Unknown result type (might be due to invalid IL or missing references)
            //IL_0031: Expected O, but got Unknown
            //IL_0032: Expected O, but got Unknown
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0044: Unknown result type (might be due to invalid IL or missing references)
            //IL_0050: Expected O, but got Unknown
            //IL_0051: Expected O, but got Unknown
            //IL_005f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0064: Unknown result type (might be due to invalid IL or missing references)
            //IL_0075: Expected O, but got Unknown
            //IL_0076: Expected O, but got Unknown
            //IL_0084: Unknown result type (might be due to invalid IL or missing references)
            //IL_0089: Unknown result type (might be due to invalid IL or missing references)
            //IL_009a: Expected O, but got Unknown
            //IL_009b: Expected O, but got Unknown
            //IL_00a9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ae: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ba: Expected O, but got Unknown
            //IL_00bb: Expected O, but got Unknown
            //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
            //IL_00db: Expected O, but got Unknown
            //IL_00dc: Expected O, but got Unknown
            //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fc: Expected O, but got Unknown
            //IL_00fd: Expected O, but got Unknown
            //IL_0112: Unknown result type (might be due to invalid IL or missing references)
            //IL_0117: Unknown result type (might be due to invalid IL or missing references)
            //IL_0123: Expected O, but got Unknown
            //IL_0130: Unknown result type (might be due to invalid IL or missing references)
            //IL_0135: Unknown result type (might be due to invalid IL or missing references)
            //IL_0140: Expected O, but got Unknown
            //IL_0141: Expected O, but got Unknown
            //IL_0156: Unknown result type (might be due to invalid IL or missing references)
            //IL_015b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0167: Expected O, but got Unknown
            //IL_0174: Unknown result type (might be due to invalid IL or missing references)
            //IL_0179: Unknown result type (might be due to invalid IL or missing references)
            //IL_0184: Expected O, but got Unknown
            //IL_0185: Expected O, but got Unknown
            //IL_019b: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ac: Expected O, but got Unknown
            //IL_01b9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01be: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c9: Expected O, but got Unknown
            //IL_01ca: Expected O, but got Unknown
            //IL_01e0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e5: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f1: Expected O, but got Unknown
            //IL_01fe: Unknown result type (might be due to invalid IL or missing references)
            //IL_0203: Unknown result type (might be due to invalid IL or missing references)
            //IL_020e: Expected O, but got Unknown
            //IL_020f: Expected O, but got Unknown
            //IL_021a: Unknown result type (might be due to invalid IL or missing references)
            //IL_021f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0230: Expected O, but got Unknown
            //IL_0231: Expected O, but got Unknown
            string sql = "INSERT INTO workflowform\r\n\t\t\t\t(ID,Name,Type,CreateUserID,CreateUserName,CreateTime,LastModifyTime,Html,SubTableJson,EventsJson,Attribute,Status) \r\n\t\t\t\tVALUES(@ID,@Name,@Type,@CreateUserID,@CreateUserName,@CreateTime,@LastModifyTime,@Html,@SubTableJson,@EventsJson,@Attribute,@Status)";

            MySqlParameter[] obj = new MySqlParameter[12];
            MySqlParameter   val = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Name", 752, -1);

            ((DbParameter)val2).Value = model.Name;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Type", 253, 36);

            ((DbParameter)val3).Value = model.Type;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@CreateUserID", 253, 36);

            ((DbParameter)val4).Value = model.CreateUserID;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@CreateUserName", 253, 50);

            ((DbParameter)val5).Value = model.CreateUserName;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@CreateTime", 12, -1);

            ((DbParameter)val6).Value = model.CreateTime;
            obj[5] = val6;
            MySqlParameter val7 = new MySqlParameter("@LastModifyTime", 12, -1);

            ((DbParameter)val7).Value = model.LastModifyTime;
            obj[6] = val7;
            _003F val8;

            if (model.Html != null)
            {
                val8 = new MySqlParameter("@Html", 751, -1);
                ((DbParameter)val8).Value = model.Html;
            }
            else
            {
                val8 = new MySqlParameter("@Html", 751, -1);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.SubTableJson != null)
            {
                val9 = new MySqlParameter("@SubTableJson", 751, -1);
                ((DbParameter)val9).Value = model.SubTableJson;
            }
            else
            {
                val9 = new MySqlParameter("@SubTableJson", 751, -1);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.EventsJson != null)
            {
                val10 = new MySqlParameter("@EventsJson", 751, -1);
                ((DbParameter)val10).Value = model.EventsJson;
            }
            else
            {
                val10 = new MySqlParameter("@EventsJson", 751, -1);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.Attribute != null)
            {
                val11 = new MySqlParameter("@Attribute", 751, -1);
                ((DbParameter)val11).Value = model.Attribute;
            }
            else
            {
                val11 = new MySqlParameter("@Attribute", 751, -1);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            MySqlParameter val12 = new MySqlParameter("@Status", 3, 11);

            ((DbParameter)val12).Value = model.Status;
            obj[11] = val12;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 8
0
        public int Update(RoadFlow.Data.Model.WorkFlowForm model)
        {
            string sql = "UPDATE WorkFlowForm SET \r\n\t\t\t\tName=@Name,Type=@Type,CreateUserID=@CreateUserID,CreateUserName=@CreateUserName,CreateTime=@CreateTime,LastModifyTime=@LastModifyTime,Html=@Html,SubTableJson=@SubTableJson,EventsJson=@EventsJson,Attribute=@Attribute,Status=@Status\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] parameter = new SqlParameter[12]
            {
                new SqlParameter("@Name", SqlDbType.NVarChar, 1000)
                {
                    Value = model.Name
                },
                new SqlParameter("@Type", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.Type
                },
                new SqlParameter("@CreateUserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.CreateUserID
                },
                new SqlParameter("@CreateUserName", SqlDbType.NVarChar, 100)
                {
                    Value = model.CreateUserName
                },
                new SqlParameter("@CreateTime", SqlDbType.DateTime, 8)
                {
                    Value = model.CreateTime
                },
                new SqlParameter("@LastModifyTime", SqlDbType.DateTime, 8)
                {
                    Value = model.LastModifyTime
                },
                (model.Html == null) ? new SqlParameter("@Html", SqlDbType.Text, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Html", SqlDbType.Text, -1)
                {
                    Value = model.Html
                },
                (model.SubTableJson == null) ? new SqlParameter("@SubTableJson", SqlDbType.Text, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@SubTableJson", SqlDbType.Text, -1)
                {
                    Value = model.SubTableJson
                },
                (model.EventsJson == null) ? new SqlParameter("@EventsJson", SqlDbType.Text, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@EventsJson", SqlDbType.Text, -1)
                {
                    Value = model.EventsJson
                },
                (model.Attribute == null) ? new SqlParameter("@Attribute", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Attribute", SqlDbType.VarChar, -1)
                {
                    Value = model.Attribute
                },
                new SqlParameter("@Status", SqlDbType.Int, -1)
                {
                    Value = model.Status
                },
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 9
0
        public int Add(RoadFlow.Data.Model.WorkFlowForm model)
        {
            string sql = "INSERT INTO WorkFlowForm\r\n\t\t\t\t(ID,Name,Type,CreateUserID,CreateUserName,CreateTime,LastModifyTime,Html,SubTableJson,EventsJson,Attribute,Status) \r\n\t\t\t\tVALUES(@ID,@Name,@Type,@CreateUserID,@CreateUserName,@CreateTime,@LastModifyTime,@Html,@SubTableJson,@EventsJson,@Attribute,@Status)";

            SqlParameter[] parameter = new SqlParameter[12]
            {
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                },
                new SqlParameter("@Name", SqlDbType.NVarChar, 1000)
                {
                    Value = model.Name
                },
                new SqlParameter("@Type", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.Type
                },
                new SqlParameter("@CreateUserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.CreateUserID
                },
                new SqlParameter("@CreateUserName", SqlDbType.NVarChar, 100)
                {
                    Value = model.CreateUserName
                },
                new SqlParameter("@CreateTime", SqlDbType.DateTime, 8)
                {
                    Value = model.CreateTime
                },
                new SqlParameter("@LastModifyTime", SqlDbType.DateTime, 8)
                {
                    Value = model.LastModifyTime
                },
                (model.Html == null) ? new SqlParameter("@Html", SqlDbType.Text, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Html", SqlDbType.Text, -1)
                {
                    Value = model.Html
                },
                (model.SubTableJson == null) ? new SqlParameter("@SubTableJson", SqlDbType.Text, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@SubTableJson", SqlDbType.Text, -1)
                {
                    Value = model.SubTableJson
                },
                (model.EventsJson == null) ? new SqlParameter("@EventsJson", SqlDbType.Text, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@EventsJson", SqlDbType.Text, -1)
                {
                    Value = model.EventsJson
                },
                (model.Attribute == null) ? new SqlParameter("@Attribute", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Attribute", SqlDbType.VarChar, -1)
                {
                    Value = model.Attribute
                },
                new SqlParameter("@Status", SqlDbType.Int, -1)
                {
                    Value = model.Status
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }