/// <summary>
 /// 用于向 vSchedulerEmailBackup EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddTovSchedulerEmailBackup(vSchedulerEmailBackup vSchedulerEmailBackup)
 {
     base.AddObject("vSchedulerEmailBackup", vSchedulerEmailBackup);
 }
Пример #2
0
        public UTPCommand UTPCommands(vSchedulerEmailBackup vSchedulerEmailBackupObj, Job jb)
        {
            UTPCommand comm = new UTPCommand();

            //操作类型
            switch (vSchedulerEmailBackupObj.Action)
            {
                case "Billing":
                    comm.ActiveType = ActionType.Billing;
                    break;
            }

            //自动计算用量
            switch (vSchedulerEmailBackupObj.Calc)
            {
                case "True":
                    comm.AutoCalc = CalcUsageBeforeBillingRegister.Yes;
                    break;
                case "False":
                    comm.AutoCalc = CalcUsageBeforeBillingRegister.No;
                    break;
            }

            //公司标识
            comm.Company = vSchedulerEmailBackupObj.Company;

            //算费周期范围
            comm.Cycle = vSchedulerEmailBackupObj.Cycle;

            //镜像复制
            switch (vSchedulerEmailBackupObj.Copy)
            {
                case "True":
                    comm.ShadowCopies = BillingShadowCopies.Yes;
                    break;
                case "False":
                    comm.ShadowCopies = BillingShadowCopies.No;
                    break;
            }

            //账户状态
            if (vSchedulerEmailBackupObj.Status != "All")
            {
                comm.Status = vSchedulerEmailBackupObj.Status;
            }
            //日志
            switch (vSchedulerEmailBackupObj.Trace)
            {
                case "True":
                    comm.Trace = Trace.Yes;
                    break;
                case "False":
                    comm.Trace = Trace.Yes;
                    break;
            }

            //日志数据库连接字符串
            comm.TraceDBConnectionString = vSchedulerEmailBackupObj.TraceTable;

            //日志文件保存路径
            //comm.TraceFilePath=vSchedulerEmailBackupObj.trace

            //日志类型
            switch (vSchedulerEmailBackupObj.TraceType)
            {
                case "File":
                    comm.TraceType = TraceType.File;
                    break;
                case "Table":
                    comm.TraceType = TraceType.Table;
                    break;
                case "None":
                    comm.TraceType = TraceType.None;
                    break;
            }

            //口令
            comm.UTPPassword = vSchedulerEmailBackupObj.UTPPwd;

            //用户名
            comm.UTPUsername = vSchedulerEmailBackupObj.UTPUser;

            //计划标识
            comm.GUID = vSchedulerEmailBackupObj.ScheduleID.ToString();

            //UTP程序路径,保存了UTP EXE文件所在的应用程序路径,此属性值要求包含Utility.exe的全路径。
            comm.UTPPath = "*" + this.GetConfig("UTPPath") + "*";

            //计划标识符
            comm.SID = vSchedulerEmailBackupObj.ScheduleID;

            return comm;
        }
 /// <summary>
 /// 创建新的 vSchedulerEmailBackup 对象。
 /// </summary>
 /// <param name="scheduleID">ScheduleID 属性的初始值。</param>
 public static vSchedulerEmailBackup CreatevSchedulerEmailBackup(global::System.Guid scheduleID)
 {
     vSchedulerEmailBackup vSchedulerEmailBackup = new vSchedulerEmailBackup();
     vSchedulerEmailBackup.ScheduleID = scheduleID;
     return vSchedulerEmailBackup;
 }
Пример #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 "";
            }
        }