Beispiel #1
0
        public void InsertCommand(UTPCommandBuilder builder, string RelateID)
        {
            ServiceDirectDBEntities objDB;
            vUTPCommand             vUTPCommandObj;

            //影响行数标记
            int counts = 0;

            //插入数据
            try
            {
                objDB                      = new ServiceDirectDBEntities();
                vUTPCommandObj             = new vUTPCommand();
                vUTPCommandObj.CommandID   = builder.CommandID;
                vUTPCommandObj.CommandLine = builder.CommandString;
                vUTPCommandObj.RelateID    = RelateID;
                vUTPCommandObj.Sequence    = 1;
                objDB.vUTPCommand.AddObject(vUTPCommandObj);
                counts = objDB.SaveChanges();
            }
            catch (EntitySqlException)
            {
                throw;
            }
        }
Beispiel #2
0
        /// <summary>
        /// 获取命令行
        /// </summary>
        /// <param name="vSchedulerEmailBackupObj">vSchedulerEmailBackup对象</param>
        /// <param name="KeyId">主键值</param>
        /// <returns></returns>
        public string GetJobCommandString(vSchedulerEmailBackup vSchedulerEmailBackupObj, string KeyId, Job jb)
        {
            string     JobCommandString = string.Empty;
            UTPCommand comm             = new UTPCommand();

            try
            {
                //获取UTP命令行
                comm = this.UTPCommands(vSchedulerEmailBackupObj, jb);

                //UTP命令赋值
                UTPCommandBuilder builder = new UTPCommandBuilder(comm);
                JobCommandString = builder.JobCommandString;

                //删除数据
                this.LogicDelete(KeyId);

                //插入数据
                this.InsertCommand(builder, KeyId);
                return(JobCommandString);
            }
            catch (Exception)
            {
                return("");
            }
        }
Beispiel #3
0
        public void InsertCommand(UTPCommandBuilder builder, string RelateID)
        {
            ServiceDirectDBEntities objDB;
            vUTPCommand vUTPCommandObj;

            //影响行数标记
            int counts = 0;

            //插入数据
            try
            {
                objDB = new ServiceDirectDBEntities();
                vUTPCommandObj = new vUTPCommand();
                vUTPCommandObj.CommandID = builder.CommandID;
                vUTPCommandObj.CommandLine = builder.CommandString;
                vUTPCommandObj.RelateID = RelateID;
                vUTPCommandObj.Sequence = 1;
                objDB.vUTPCommand.AddObject(vUTPCommandObj);
                counts = objDB.SaveChanges();
            }
            catch (EntitySqlException)
            {
                throw;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 获取命令行
        /// </summary>
        /// <param name="vSchedulerEmailBackupObj">vSchedulerEmailBackup对象</param>
        /// <param name="KeyId">主键值</param>
        /// <returns></returns>
        public string GetJobCommandString(vSchedulerEmailBackup vSchedulerEmailBackupObj, string KeyId, Job jb)
        {
            string JobCommandString = string.Empty;
            UTPCommand comm = new UTPCommand();
            try
            {
                //获取UTP命令行
                comm = this.UTPCommands(vSchedulerEmailBackupObj, jb);

                //UTP命令赋值
                UTPCommandBuilder builder = new UTPCommandBuilder(comm);
                JobCommandString = builder.JobCommandString;

                //删除数据
                this.LogicDelete(KeyId);

                //插入数据
                this.InsertCommand(builder, KeyId);
                return JobCommandString;
            }
            catch (Exception)
            {
                return "";
            }
        }