Пример #1
0
        private List <RoadFlow.Data.Model.HastenLog> DataReaderToList(SqlDataReader dataReader)
        {
            List <RoadFlow.Data.Model.HastenLog> list = new List <RoadFlow.Data.Model.HastenLog>();

            RoadFlow.Data.Model.HastenLog hastenLog = null;
            while (dataReader.Read())
            {
                hastenLog              = new RoadFlow.Data.Model.HastenLog();
                hastenLog.ID           = dataReader.GetGuid(0);
                hastenLog.OthersParams = dataReader.GetString(1);
                hastenLog.Users        = dataReader.GetString(2);
                hastenLog.Types        = dataReader.GetString(3);
                hastenLog.Contents     = dataReader.GetString(4);
                hastenLog.SendUser     = dataReader.GetGuid(5);
                hastenLog.SendUserName = dataReader.GetString(6);
                hastenLog.SendTime     = dataReader.GetDateTime(7);
                list.Add(hastenLog);
            }
            return(list);
        }
Пример #2
0
        public int Update(RoadFlow.Data.Model.HastenLog model)
        {
            string sql = "UPDATE HastenLog SET \r\n\t\t\t\tOthersParams=@OthersParams,Users=@Users,Types=@Types,Contents=@Contents,SendUser=@SendUser,SendUserName=@SendUserName,SendTime=@SendTime\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] parameter = new SqlParameter[8]
            {
                new SqlParameter("@OthersParams", SqlDbType.VarChar, 5000)
                {
                    Value = model.OthersParams
                },
                new SqlParameter("@Users", SqlDbType.VarChar, 5000)
                {
                    Value = model.Users
                },
                new SqlParameter("@Types", SqlDbType.VarChar, 500)
                {
                    Value = model.Types
                },
                new SqlParameter("@Contents", SqlDbType.NVarChar, 1000)
                {
                    Value = model.Contents
                },
                new SqlParameter("@SendUser", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.SendUser
                },
                new SqlParameter("@SendUserName", SqlDbType.NVarChar, 100)
                {
                    Value = model.SendUserName
                },
                new SqlParameter("@SendTime", SqlDbType.DateTime, 8)
                {
                    Value = model.SendTime
                },
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Пример #3
0
        public int Add(RoadFlow.Data.Model.HastenLog model)
        {
            string sql = "INSERT INTO HastenLog\r\n\t\t\t\t(ID,OthersParams,Users,Types,Contents,SendUser,SendUserName,SendTime) \r\n\t\t\t\tVALUES(@ID,@OthersParams,@Users,@Types,@Contents,@SendUser,@SendUserName,@SendTime)";

            SqlParameter[] parameter = new SqlParameter[8]
            {
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                },
                new SqlParameter("@OthersParams", SqlDbType.VarChar, 5000)
                {
                    Value = model.OthersParams
                },
                new SqlParameter("@Users", SqlDbType.VarChar, 5000)
                {
                    Value = model.Users
                },
                new SqlParameter("@Types", SqlDbType.VarChar, 500)
                {
                    Value = model.Types
                },
                new SqlParameter("@Contents", SqlDbType.NVarChar, 1000)
                {
                    Value = model.Contents
                },
                new SqlParameter("@SendUser", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.SendUser
                },
                new SqlParameter("@SendUserName", SqlDbType.NVarChar, 100)
                {
                    Value = model.SendUserName
                },
                new SqlParameter("@SendTime", SqlDbType.DateTime, 8)
                {
                    Value = model.SendTime
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Пример #4
0
        public int Add(RoadFlow.Data.Model.HastenLog model)
        {
            //IL_0015: Unknown result type (might be due to invalid IL or missing references)
            //IL_001a: 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_0035: Unknown result type (might be due to invalid IL or missing references)
            //IL_003a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0046: Expected O, but got Unknown
            //IL_0047: Expected O, but got Unknown
            //IL_0050: Unknown result type (might be due to invalid IL or missing references)
            //IL_0055: Unknown result type (might be due to invalid IL or missing references)
            //IL_0061: Expected O, but got Unknown
            //IL_0062: Expected O, but got Unknown
            //IL_006b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0070: Unknown result type (might be due to invalid IL or missing references)
            //IL_007c: Expected O, but got Unknown
            //IL_007d: Expected O, but got Unknown
            //IL_0086: Unknown result type (might be due to invalid IL or missing references)
            //IL_008b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0097: Expected O, but got Unknown
            //IL_0098: Expected O, but got Unknown
            //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b7: Expected O, but got Unknown
            //IL_00b8: 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_00d2: Expected O, but got Unknown
            //IL_00d3: Expected O, but got Unknown
            //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f2: Expected O, but got Unknown
            //IL_00f3: Expected O, but got Unknown
            string sql = "INSERT INTO HastenLog\r\n\t\t\t\t(ID,OthersParams,Users,Types,Contents,SendUser,SendUserName,SendTime) \r\n\t\t\t\tVALUES(:ID,:OthersParams,:Users,:Types,:Contents,:SendUser,:SendUserName,:SendTime)";

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

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

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

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

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

            ((DbParameter)val5).Value = model.Contents;
            obj[4] = val5;
            OracleParameter val6 = new OracleParameter(":SendUser", 126);

            ((DbParameter)val6).Value = model.SendUser;
            obj[5] = val6;
            OracleParameter val7 = new OracleParameter(":SendUserName", 126);

            ((DbParameter)val7).Value = model.SendUserName;
            obj[6] = val7;
            OracleParameter val8 = new OracleParameter(":SendTime", 106);

            ((DbParameter)val8).Value = model.SendTime;
            obj[7] = val8;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Пример #5
0
        public int Update(RoadFlow.Data.Model.HastenLog model)
        {
            //IL_0015: Unknown result type (might be due to invalid IL or missing references)
            //IL_001a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0026: Expected O, but got Unknown
            //IL_0027: Expected O, but got Unknown
            //IL_0030: Unknown result type (might be due to invalid IL or missing references)
            //IL_0035: Unknown result type (might be due to invalid IL or missing references)
            //IL_0041: Expected O, but got Unknown
            //IL_0042: Expected O, but got Unknown
            //IL_004b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0050: Unknown result type (might be due to invalid IL or missing references)
            //IL_005c: Expected O, but got Unknown
            //IL_005d: Expected O, but got Unknown
            //IL_0066: Unknown result type (might be due to invalid IL or missing references)
            //IL_006b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0077: Expected O, but got Unknown
            //IL_0078: Expected O, but got Unknown
            //IL_0081: Unknown result type (might be due to invalid IL or missing references)
            //IL_0086: Unknown result type (might be due to invalid IL or missing references)
            //IL_0097: Expected O, but got Unknown
            //IL_0098: Expected O, but got Unknown
            //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b2: Expected O, but got Unknown
            //IL_00b3: Expected O, but got Unknown
            //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d2: Expected O, but got Unknown
            //IL_00d3: Expected O, but got Unknown
            //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f2: Expected O, but got Unknown
            //IL_00f3: Expected O, but got Unknown
            string sql = "UPDATE HastenLog SET \r\n\t\t\t\tOthersParams=:OthersParams,Users=:Users,Types=:Types,Contents=:Contents,SendUser=:SendUser,SendUserName=:SendUserName,SendTime=:SendTime\r\n\t\t\t\tWHERE ID=:ID";

            OracleParameter[] obj = new OracleParameter[8];
            OracleParameter   val = new OracleParameter(":OthersParams", 126);

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

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

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

            ((DbParameter)val4).Value = model.Contents;
            obj[3] = val4;
            OracleParameter val5 = new OracleParameter(":SendUser", 126);

            ((DbParameter)val5).Value = model.SendUser;
            obj[4] = val5;
            OracleParameter val6 = new OracleParameter(":SendUserName", 126);

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

            ((DbParameter)val7).Value = model.SendTime;
            obj[6] = val7;
            OracleParameter val8 = new OracleParameter(":ID", 126);

            ((DbParameter)val8).Value = model.ID;
            obj[7] = val8;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Пример #6
0
        public int Update(RoadFlow.Data.Model.HastenLog model)
        {
            //IL_0019: Unknown result type (might be due to invalid IL or missing references)
            //IL_001e: Unknown result type (might be due to invalid IL or missing references)
            //IL_002a: Expected O, but got Unknown
            //IL_002b: 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_0049: Expected O, but got Unknown
            //IL_004a: Expected O, but got Unknown
            //IL_0057: Unknown result type (might be due to invalid IL or missing references)
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0068: Expected O, but got Unknown
            //IL_0069: Expected O, but got Unknown
            //IL_0076: Unknown result type (might be due to invalid IL or missing references)
            //IL_007b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0087: Expected O, but got Unknown
            //IL_0088: Expected O, but got Unknown
            //IL_0096: Unknown result type (might be due to invalid IL or missing references)
            //IL_009b: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ac: Expected O, but got Unknown
            //IL_00ad: Expected O, but got Unknown
            //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cc: Expected O, but got Unknown
            //IL_00cd: Expected O, but got Unknown
            //IL_00d7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ed: Expected O, but got Unknown
            //IL_00ee: Expected O, but got Unknown
            //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
            //IL_0101: Unknown result type (might be due to invalid IL or missing references)
            //IL_0112: Expected O, but got Unknown
            //IL_0113: Expected O, but got Unknown
            string sql = "UPDATE hastenlog SET \r\n\t\t\t\tOthersParams=@OthersParams,Users=@Users,Types=@Types,Contents=@Contents,SendUser=@SendUser,SendUserName=@SendUserName,SendTime=@SendTime\r\n\t\t\t\tWHERE ID=@ID";

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

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

            ((DbParameter)val2).Value = model.Users;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Types", 752, -1);

            ((DbParameter)val3).Value = model.Types;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@Contents", 752, -1);

            ((DbParameter)val4).Value = model.Contents;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@SendUser", 253, 36);

            ((DbParameter)val5).Value = model.SendUser;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@SendUserName", 253, 50);

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

            ((DbParameter)val7).Value = model.SendTime;
            obj[6] = val7;
            MySqlParameter val8 = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val8).Value = model.ID;
            obj[7] = val8;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Пример #7
0
        public int Add(RoadFlow.Data.Model.HastenLog 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_0030: Expected O, but got Unknown
            //IL_0031: Expected O, but got Unknown
            //IL_003e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0043: Unknown result type (might be due to invalid IL or missing references)
            //IL_004f: Expected O, but got Unknown
            //IL_0050: Expected O, but got Unknown
            //IL_005d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0062: Unknown result type (might be due to invalid IL or missing references)
            //IL_006e: Expected O, but got Unknown
            //IL_006f: 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_009b: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ac: Expected O, but got Unknown
            //IL_00ad: Expected O, but got Unknown
            //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d1: Expected O, but got Unknown
            //IL_00d2: Expected O, but got Unknown
            //IL_00e0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e5: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
            //IL_0101: Unknown result type (might be due to invalid IL or missing references)
            //IL_0112: Expected O, but got Unknown
            //IL_0113: Expected O, but got Unknown
            string sql = "INSERT INTO hastenlog\r\n\t\t\t\t(ID,OthersParams,Users,Types,Contents,SendUser,SendUserName,SendTime) \r\n\t\t\t\tVALUES(@ID,@OthersParams,@Users,@Types,@Contents,@SendUser,@SendUserName,@SendTime)";

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

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

            ((DbParameter)val2).Value = model.OthersParams;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Users", 752, -1);

            ((DbParameter)val3).Value = model.Users;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@Types", 752, -1);

            ((DbParameter)val4).Value = model.Types;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@Contents", 752, -1);

            ((DbParameter)val5).Value = model.Contents;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@SendUser", 253, 36);

            ((DbParameter)val6).Value = model.SendUser;
            obj[5] = val6;
            MySqlParameter val7 = new MySqlParameter("@SendUserName", 253, 50);

            ((DbParameter)val7).Value = model.SendUserName;
            obj[6] = val7;
            MySqlParameter val8 = new MySqlParameter("@SendTime", 12, -1);

            ((DbParameter)val8).Value = model.SendTime;
            obj[7] = val8;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Пример #8
0
        public static void Hasten(string types, string users, string contents, RoadFlow.Data.Model.WorkFlowTask task, string othersParams = "")
        {
            if (!users.IsNullOrEmpty() && !types.IsNullOrEmpty() && task != null)
            {
                string[] array = users.Split(',');
                Guid     guid  = Guid.NewGuid();
                List <RoadFlow.Data.Model.WorkFlowTask> list = new WorkFlowTask().GetNextTaskList(task.ID).FindAll((RoadFlow.Data.Model.WorkFlowTask p) => p.Status.In(0, 1));
                string text = "";
                text = ((!(HttpContext.Current.Request.Url != null) || !HttpContext.Current.Request.Url.AbsolutePath.EndsWith(".aspx", StringComparison.CurrentCultureIgnoreCase)) ? "/WorkFlowRun/Index" : "/Platform/WorkFlowRun/Default.aspx");
                string[] array2 = types.Split(',');
                for (int i = 0; i < array2.Length; i++)
                {
                    int test;
                    if (array2[i].IsInt(out test))
                    {
                        string[] array3 = array;
                        foreach (string id in array3)
                        {
                            Guid userGuid;
                            if (Users.RemovePrefix(id).IsGuid(out userGuid))
                            {
                                RoadFlow.Data.Model.WorkFlowTask workFlowTask = list.Find((RoadFlow.Data.Model.WorkFlowTask p) => p.ReceiveID == userGuid);
                                string linkUrl = (workFlowTask == null) ? "" : ("javascript:openApp('" + text + "?flowid=" + workFlowTask.FlowID + "&stepid=" + workFlowTask.StepID + "&instanceid=" + workFlowTask.InstanceID + "&taskid=" + workFlowTask.ID + "&groupid=" + workFlowTask.GroupID + "',0,'" + workFlowTask.Title.Replace1(",", "") + "','tab_" + workFlowTask.ID + "');closeMessage('" + guid + "');");
                                switch (test)
                                {
                                case 1:
                                    SMSLog.SendSMS(new Users().GetMobileNumber(userGuid), contents);
                                    break;

                                case 2:
                                    Email.Send(userGuid, "任务催办", contents);
                                    break;

                                case 3:
                                {
                                    RoadFlow.Data.Model.Users users3 = new Users().Get(userGuid);
                                    if (users3 != null)
                                    {
                                        ShortMessage.Send(users3.ID, users3.Name, "任务催办", contents, 0, linkUrl, task.ID.ToString(), guid.ToString());
                                    }
                                    break;
                                }

                                case 4:
                                {
                                    RoadFlow.Data.Model.Users users2 = new Users().Get(userGuid);
                                    if (users2 != null)
                                    {
                                        new Message().SendText(contents, users2.Account, "", "", 0, new Agents().GetAgentIDByCode("weixinagents_waittasks"), true);
                                    }
                                    break;
                                }
                                }
                            }
                        }
                    }
                }
                RoadFlow.Data.Model.HastenLog hastenLog = new RoadFlow.Data.Model.HastenLog();
                hastenLog.Contents     = contents;
                hastenLog.ID           = Guid.NewGuid();
                hastenLog.SendTime     = DateTimeNew.Now;
                hastenLog.SendUser     = Users.CurrentUserID;
                hastenLog.SendUserName = Users.CurrentUserName;
                hastenLog.OthersParams = (othersParams.IsNullOrEmpty() ? task.ID.ToString() : othersParams);
                hastenLog.Types        = types;
                hastenLog.Users        = users;
                new HastenLog().Add(hastenLog);
            }
        }
Пример #9
0
 public int Update(RoadFlow.Data.Model.HastenLog model)
 {
     return(dataHastenLog.Update(model));
 }
Пример #10
0
 public int Add(RoadFlow.Data.Model.HastenLog model)
 {
     return(dataHastenLog.Add(model));
 }